contract-review-revise
by @baichenwzj
专业合同审查与修改系统,集成 Legal Document Review Agent,提供风险识别、法律分析、修改建议及自动文档更新功能。
clawhub install contract-review-revise📖 About This Skill
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
.docx (Word documents)Step 2: Initiate Review
#### Mode A: Quick Review (AI Review) AI automatically:
#### 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:Step 5: Auto-Modify Contract
AI will modify the contract based on client confirmation:python-docx library to modify Word files_revised.docx)🔧 Technical Implementation
Dependencies
from docx import Document
import os
Legal Document Review Agent Integration
agents/legal-document-review.mdsessions_spawn to launch sub-AgentCore Functions
1. Contract Reading - Usepython-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 listsSupported Contract Types
📝 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:
📚 Legal Basis
Review references major laws and regulations:
💡 Best Practices
1. Before Review
2. During Review
3. After Review
4. After Modification
🎯 Review Checklist
Compensation Clauses
Pricing Clauses
Breach of Contract Responsibilities
Goods/Service Disposal
Dispute Resolution
Protective Clauses
Version: 1.0.0 Author: 虾米 🦐 Last Updated: 2026-04-28 Integrated: Legal Document Review Agent (Professional Legal Review)