← Back to Skills Marketplace
baichenwzj

contract-review-revise

by baichen · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
68
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install contract-review-revise
Description
专业合同审查与修改系统,集成 Legal Document Review Agent,提供风险识别、法律分析、修改建议及自动文档更新功能。
README (SKILL.md)

Contract Review & Revise Skill

Contract Review & Revise Skill - Professional legal document review and modification system with Legal Document Review Agent

🎯 Overview

A professional-grade contract review and revision system integrated with Legal Document Review Agent:

  1. Smart Review - AI quickly identifies risky clauses
  2. Professional Review - Legal Document Review Agent provides in-depth legal analysis (lawyer-level)
  3. Comprehensive Report - Combines both review results for complete recommendations
  4. Client Confirmation - Supports selective acceptance of modifications
  5. Auto-Modification - Uses python-docx to modify Word files
  6. Comparison List - Generates detailed modification comparison documents

📁 Skill Structure

skills/contract-review-revise/
├── SKILL.md                 # Skill documentation
└── agents/
    └── legal-document-review.md  # Legal Document Review Agent

📋 Usage Workflow

Step 1: Upload Contract File

  • Supported Format: .docx (Word documents)
  • Specify file path
  • Specify review perspective (Party A/Party B/Neutral)
  • Specify review mode:
    • Quick Review - AI-only review (suitable for simple contracts)
    • Professional Review - AI + Legal Document Review Agent (recommended for important contracts)

Step 2: Initiate Review

Mode A: Quick Review (AI Review)

AI automatically:

  • Reads the full contract
  • Identifies key clauses (compensation, exemption, pricing, breach of contract, etc.)
  • Analyzes legal risks
  • Classifies by risk level

Mode B: Professional Review (AI + Legal Document Review Agent) ⭐ Recommended

  1. AI Preliminary Review - Quickly identifies obvious issues
  2. Launch Legal Document Review Agent
    • Review perspective: Party A/Party B/Neutral
    • Focus areas: Compensation clauses, deductible rates, price adjustments, late fees, goods disposal rights, dispute jurisdiction, etc.
    • Output format: Risk level + Clause location + Issue description + Modification suggestion + Legal basis
  3. Combine Reports - Synthesize AI and Legal Agent recommendations

Step 3: Generate Review Report

Output format:

=== Contract Review Report ===

🔴 HIGH RISK CLAUSES (Must Modify)
| Clause | Issue | Risk Level | AI Suggestion | Legal Agent Suggestion | Combined Recommendation |
|---|---|---|---|---|---|
| 5.1.1 | Compensation cap $100 | 🔴 High | Remove cap | Remove cap | ✅ Remove cap, compensate based on actual loss |

🟡 MEDIUM RISK CLAUSES (Recommended to Modify)
| Clause | Issue | Risk Level | AI Suggestion | Legal Agent Suggestion | Combined Recommendation |
|---|---|---|---|---|---|
| 13.4 | Jurisdiction: Defendant's location | 🟡 Medium | Plaintiff's location | Arbitration | ✅ Plaintiff's location or arbitration |

🟢 MISSING PROTECTIVE CLAUSES (Strongly Recommended to Add)
| Clause | Suggested Content | Reason | Source |
|---|---|---|---|
| New Clause 14 | Party B's Qualification and Compliance Responsibility | Prevent losses due to Party B's qualification issues | Legal Agent |

Step 4: Client Confirmation

Client can:

  • Accept All - Modify all clauses directly
  • Accept Partially - Selectively accept certain modifications
  • Reject Some - Keep original clauses
  • Request New Changes - Add additional modification requirements
  • View Detailed Reasons - Understand legal basis for each modification

Step 5: Auto-Modify Contract

AI will modify the contract based on client confirmation:

  • Use python-docx library to modify Word files
  • Maintain original formatting and layout
  • Save as new version (e.g., _revised.docx)
  • Generate modification comparison list

🔧 Technical Implementation

Dependencies

from docx import Document
import os

Legal Document Review Agent Integration

  • Agent File: agents/legal-document-review.md
  • Launch Method: Use sessions_spawn to launch sub-Agent
  • Review Focus:
    • Reasonableness of compensation clauses
    • Excessive deductible rates
    • Fairness of price adjustment rights
    • Late fees and punitive clauses
    • Reasonableness of goods disposal rights
    • Favorability of dispute jurisdiction to client
    • Missing protective clauses
  • Output Format:
    • Risk level (High/Medium/Low)
    • Clause location
    • Issue description
    • Modification suggestions
    • Legal basis (if applicable)

Core Functions

  1. Contract Reading - Use python-docx to read Word files
  2. Clause Identification - Identify key clauses via keyword matching
  3. AI Risk Analysis - Assess risk levels based on legal knowledge and experience
  4. Legal Agent Invocation - Launch legal-document-review Agent for professional review
  5. Report Fusion - Synthesize AI and Legal Agent recommendations
  6. Modification Suggestions - Provide specific modification text
  7. File Modification - Use python-docx to modify and save files
  8. Comparison Generation - Generate Markdown-format modification comparison lists

Supported Contract Types

  • Service contracts ( warehousing, logistics, technology, consulting, etc.)
  • Procurement contracts
  • Sales contracts
  • Lease agreements
  • Cooperation agreements
  • Employment contracts
  • Other commercial contracts

📝 Usage Examples

Example 1: Review Warehousing Contract (Professional Review Mode)

Please professionally review D:\Contracts\Warehousing_Agreement.docx from Party A's perspective

AI will automatically:

  1. Read the contract file
  2. Launch Legal Document Review Agent for in-depth review
  3. Generate comprehensive review report
  4. Wait for client confirmation

Example 2: Review Technology Cooperation Agreement (Quick Review Mode)

Please quickly review E:\Projects\Technology_Cooperation.docx from Party B's perspective

Example 3: Review Important Contract (Professional Review + Deep Analysis)

Please professionally review E:\Projects\Important_Agreement.docx from Party A's perspective, focusing on compensation clauses and breach of contract responsibilities

⚠️ Important Notes

  1. Legal Disclaimer

    • Review suggestions provided by this skill are for reference only
    • Does not constitute formal legal advice
    • Important contracts should be reviewed by a qualified attorney
    • Legal Document Review Agent suggestions do not replace professional legal counsel
  2. File Safety

    • Original file will be backed up before modification
    • New version will be generated without overwriting the original
    • Client should confirm modifications independently
  3. Format Preservation

    • Original formatting and layout will be maintained as much as possible
    • Some complex formatting may be affected
    • Manual review recommended after modification
  4. Language Support

    • Primary support: Chinese contracts
    • Also supports: English contracts
    • Other languages: Can be reviewed but recommendations may be less specific
  5. Legal Agent Limitations

    • Legal Document Review Agent can only analyze text, cannot directly modify Word files
    • AI assistant must perform file modifications based on Agent's suggestions
    • Agent review takes some time (typically 1-2 minutes)

🚀 Future Extensions

Future enhancements may include:

  • Support for PDF contracts (requires OCR or parsing)
  • Multi-language contract review
  • Integration with legal databases (citing specific legal provisions)
  • Batch review of multiple contracts
  • Generation of negotiation scripts and supplementary agreements
  • History tracking and version comparison
  • Multi-model Legal Agent comparison (multiple legal Agents reviewing simultaneously)

📚 Legal Basis

Review references major laws and regulations:

  • Civil Code of the People's Republic of China
  • Contract Law of the People's Republic of China
  • Consumer Rights Protection Law of the People's Republic of China
  • Company Law of the People's Republic of China
  • Industry-specific regulations

💡 Best Practices

1. Before Review

  • Clearly specify review perspective (Party A/Party B/Neutral)
  • Provide contract background and business objectives
  • Specify special focus areas
  • Choose "Professional Review" mode for important contracts

2. During Review

  • Focus on core clauses: compensation, exemption, pricing, breach of contract responsibilities
  • Identify unreasonable content in standard clauses
  • Check for missing protective clauses
  • Review Legal Agent's detailed analysis

3. After Review

  • Communic modification recommendations thoroughly with client
  • Explain modification reasons and legal basis
  • Generate clear modification comparison lists
  • Compare AI and Legal Agent recommendation differences

4. After Modification

  • Manually check modification content
  • Confirm formatting and layout correctness
  • Save multiple versions for easy comparison
  • Retain review report as reference

🎯 Review Checklist

Compensation Clauses

  • Is compensation cap reasonable?
  • Is deductible rate too high?
  • Is compensation calculation method clear?
  • Is payment method clear (cash/system credit)?

Pricing Clauses

  • Is price adjustment right fair?
  • Is price adjustment notice period reasonable?
  • Is there a price protection mechanism?

Breach of Contract Responsibilities

  • Is penalty too high?
  • Is late fee rate reasonable?
  • Are punitive clauses reasonable?
  • Are breach termination conditions clear?

Goods/Service Disposal

  • Is prior notice required for disposal?
  • Is notice period reasonable?
  • Is disposal proceeds ownership clear?

Dispute Resolution

  • Is jurisdiction/arbitration institution fair?
  • Is governing law clear?
  • Is dispute resolution cost reasonable?

Protective Clauses

  • Qualification and compliance responsibility
  • Subcontracting restrictions
  • Inspection rights and inventory management
  • Post-termination handling
  • Service Level Agreement (SLA)

Version: 1.0.0
Author: 虾米 🦐
Last Updated: 2026-04-28
Integrated: Legal Document Review Agent (Professional Legal Review)

Usage Guidance
This skill appears internally consistent for contract review and auto-modification, but before installing: 1) Confirm the agent environment has Python and the python-docx library (or provide an install step) to avoid runtime errors. 2) Understand that the skill will read and write files at paths you provide — do not feed sensitive/confidential contracts unless you trust the runtime environment and storage. 3) The skill launches a sub-agent (sessions_spawn); verify your platform allows that and review what that sub-agent can access. 4) Treat outputs as attorney-assistive only — follow the SKILL.md rule to have a licensed attorney review and approve any legal changes. 5) Test on non-sensitive sample documents first to confirm behavior (format preservation, file naming, and comparison reports). If you need the skill to run in an environment without Python or with restricted file access, request an install spec or a version that uses approved platform tools.
Capability Analysis
Type: OpenClaw Skill Name: contract-review-revise Version: 1.0.1 The skill bundle provides a framework for legal contract review and automated modification of .docx files using the `python-docx` and `os` modules (SKILL.md). While the behavior is aligned with the stated purpose and includes safety features like saving revised versions separately, it is classified as suspicious due to its high-risk capabilities involving local file system access and document modification, which are explicitly flagged as suspicious indicators in the review criteria. The complexity of the sub-agent orchestration (agents/legal-document-review.md) and the potential for insecure code generation by the AI agent when interacting with the file system further contribute to this classification, although no intentional malice or data exfiltration was detected.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
Name, description, and instructions all align: the skill focuses on reviewing .docx contracts, producing reports, and optionally modifying Word files. It references python-docx and a sub‑agent for deeper review — these are consistent with the stated capabilities.
Instruction Scope
SKILL.md instructs the agent to read user-specified file paths, identify clauses, synthesize reports, launch a Legal Document Review sub‑agent, and write revised .docx files. This stays within the declared purpose, but it implies filesystem read/write access to arbitrary user-supplied documents (sensitive data) and autonomous spawning of a sub‑agent (sessions_spawn).
Install Mechanism
Instruction-only skill — no install spec. The docs import python-docx but do not declare how/where it will be installed. This is not malicious but may cause runtime failures if python-docx (or an appropriate Python runtime) is not present in the agent environment.
Credentials
The skill requests no environment variables or external credentials, which is proportionate. However, it will handle potentially privileged/confidential documents (read/write), so the main concern is data sensitivity and ensuring the runtime environment and storage are secure.
Persistence & Privilege
always is false and the skill does not request permanent platform-wide privileges or modify other skills. Autonomous invocation and sub‑agent spawning are permitted by defaults; nothing here elevates persistence or privileges beyond normal skill behavior.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install contract-review-revise
  3. After installation, invoke the skill by name or use /contract-review-revise
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- SKILL.md has been fully translated from Chinese to English, making the documentation accessible to a wider audience. - All instructions, workflows, usage examples, and notices are now in English. - No code or logic changes have been made; only documentation text has been updated. - The skill's core features and workflow remain unchanged.
v1.0.0
Contract Review & Revise Skill 1.0.0 - Initial release of a professional contract review and revision system integrating the Legal Document Review Agent. - Supports intelligent AI review as well as deep legal analysis (lawyer-level) for Word (.docx) contracts. - Outputs comprehensive risk analysis reports with actionable revision advice and legal bases. - Enables client selection and confirmation of suggested revisions, with automatic document modification and side-by-side change logs. - Focuses on major commercial contract types; primarily supports Chinese documents. - Ensures file backup, versioning, and maintains formatting as much as possible.
Metadata
Slug contract-review-revise
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is contract-review-revise?

专业合同审查与修改系统,集成 Legal Document Review Agent,提供风险识别、法律分析、修改建议及自动文档更新功能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install contract-review-revise?

Run "/install contract-review-revise" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is contract-review-revise free?

Yes, contract-review-revise is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does contract-review-revise support?

contract-review-revise is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created contract-review-revise?

It is built and maintained by baichen (@baichenwzj); the current version is v1.0.1.

💬 Comments