contract-review-pro
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseContract Review Skill
合同审核Skill
Overview
概述
This skill performs contract reviews by adding comments only (no edits to the original text). It follows a four-layer review (entity verification, basic, business, legal) and generates:
- Annotated contract (.docx)
- Contract summary (.docx)
- Consolidated review opinion (.docx)
- Business flowchart (Mermaid + rendered image)
Language rule: detect the contract’s dominant language and output all generated content (comments, summary, opinion, flowchart text) in that language. Use the guidance in references/language.md.
本Skill仅通过添加批注的方式进行合同审核(不修改原文内容)。遵循四层审核模型(主体验证、基础审核、业务审核、法律审核),并生成以下成果:
- 带批注的合同文件(.docx)
- 合同摘要文件(.docx)
- 综合审核意见文件(.docx)
- 业务流程图(Mermaid代码 + 渲染图片)
语言规则:识别合同的主导语言,所有生成内容(批注、摘要、意见、流程图文本)均使用该语言输出。请遵循**references/language.md**中的指引。
Workflow
工作流程
- Unpack the contract (.docx) for XML operations
- Read contract text (pandoc or XML)
- Extract and verify contracting parties (Layer 0)
- Execute three-layer clause review (Layer 1–3)
- Add comments to the document
- Generate contract summary
- Generate consolidated opinion
- Generate business flowchart and render image
- Repack to .docx
- 解压合同文件(.docx)以进行XML操作
- 读取合同文本(使用pandoc或XML方式)
- 提取并验证合同主体(第0层)
- 执行三层条款审核(第1-3层)
- 为文档添加批注
- 生成合同摘要
- 生成综合审核意见
- 生成业务流程图并渲染为图片
- 重新打包为.docx格式
Output Naming
输出命名规则
- Output directory: for Chinese or
审核结果:{ContractName}for EnglishReview_Result_{ContractName} - Reviewed contract: for Chinese or
{ContractName}_审核版.docxfor English{ContractName}_Reviewed.docx - Review report: for Chinese or
审核报告.txtfor EnglishReview_Report.txt
- 输出目录:中文合同使用,英文合同使用
审核结果:{合同名称}Review_Result_{ContractName} - 审核后合同:中文合同使用,英文合同使用
{合同名称}_审核版.docx{ContractName}_Reviewed.docx - 审核报告:中文合同使用,英文合同使用
审核报告.txtReview_Report.txt
Comment Principles
批注原则
- Comments only: do not modify the original text or formatting
- Precise anchoring: comment should target specific clauses/paragraphs
- Structured content: each comment includes issue type, risk reason, and revision suggestion
- Risk level: carried by reviewer name; do not include a “risk level” line in comment body
- Output language: use labels in the contract’s language (see )
references/language.md
Comment example (English):
[Issue Type] Payment Terms
[Risk Reason] The total amount is stated as USD 100,000 in Section 3.2, but the payment clause lists USD 1,000,000 in Section 5.1. This inconsistency may cause disputes.
[Revision Suggestion] Align the total amount across clauses and clarify whether tax is included.- 仅添加批注:不得修改原文文本或格式
- 精准锚定:批注需指向具体条款/段落
- 结构化内容:每条批注需包含问题类型、风险原因、修订建议
- 风险等级:通过审核人名称标识,不得在批注正文中添加“风险等级”条目
- 输出语言:使用合同对应语言的标签(详见)
references/language.md
英文批注示例:
[Issue Type] Payment Terms
[Risk Reason] The total amount is stated as USD 100,000 in Section 3.2, but the payment clause lists USD 1,000,000 in Section 5.1. This inconsistency may cause disputes.
[Revision Suggestion] Align the total amount across clauses and clarify whether tax is included.Review Standards
审核标准
Use the four-layer review model and the detailed checklist in references/checklist.md.
采用四层审核模型,并遵循**references/checklist.md**中的详细检查清单。
Layer 0: Entity verification (subject authenticity)
第0层:主体验证(主体真实性)
- Extract all contracting parties (full legal names, credit codes, legal representatives)
- Verify each entity's registered name accuracy and business registration status
- Verification tool priority:
- If an MCP tool for business registration lookup is available in the current environment (e.g., enterprise info query, company lookup, 企业查询, 工商查询), use it to query each party's name or Unified Social Credit Code.
- If no such MCP tool is available, use Web Search to look up "[entity name] 工商登记信息" or "[entity name] business registration".
- Record the verification source (MCP tool name / Web Search) in the comment.
- 提取所有合同主体(完整法定名称、信用代码、法定代表人)
- 验证每个主体的注册名称准确性及工商登记状态
- 验证工具优先级:
- 若当前环境中有用于工商信息查询的MCP工具(如企业查询、工商查询),使用该工具查询主体名称或统一社会信用代码。
- 若无此类MCP工具,使用Web Search搜索“[主体名称] 工商登记信息”或“[entity name] business registration”。
- 在批注中记录验证来源(MCP工具名称 / Web Search)。
Layer 1: Basic (text quality)
第1层:基础审核(文本质量)
- Accuracy of numbers, dates, terms
- Consistent numbering and references
- Clarity and lack of ambiguity
- Formatting and punctuation quality
- 数字、日期、术语的准确性
- 编号与引用的一致性
- 表述清晰无歧义
- 格式与标点规范
Layer 2: Business terms
第2层:业务条款审核
- Scope, deliverables, quantity/specs
- Pricing and payment schedule
- Delivery/acceptance procedures
- Rights/obligations and performance guarantees
- 业务范围、交付成果、数量/规格
- 定价与付款计划
- 交付/验收流程
- 权利/义务与履约担保
Layer 3: Legal terms
第3层:法律条款审核
- Effectiveness and term/termination
- Liability/penalties and remedies
- Dispute resolution and governing law
- Confidentiality, force majeure, IP, notice, authorization
Risk levels (encoded in reviewer name):
- 🔴 High: core business ambiguity (price, scope, rights/obligations)
- 🟡 Medium: material but non-core ambiguity
- 🔵 Low: minimal practical impact
- 合同生效与期限/终止
- 责任/违约金与救济措施
- 争议解决与管辖法律
- 保密、不可抗力、知识产权、通知、授权
风险等级(通过审核人名称标识):
- 🔴 高风险:核心业务歧义(价格、范围、权利义务)
- 🟡 中风险:重要但非核心歧义
- 🔵 低风险:实际影响极小
Contract Summary
合同摘要
Generate a structured, objective summary in the contract’s language.
- See references/summary.md (English template)
- Use references/language.md for language selection and Chinese labels
Output file: for Chinese or for English (default font: 仿宋; adjust if language requires)
合同概要.docxContract_Summary.docx生成结构化、客观的合同摘要,语言与合同一致。
- 参考**references/summary.md**(英文模板)
- 语言选择及中文标签遵循**references/language.md**
输出文件:中文合同使用,英文合同使用(默认字体:仿宋;可根据语言调整)
合同概要.docxContract_Summary.docxConsolidated Opinion
综合审核意见
Generate a concise, two-paragraph response for the business team in the contract’s language.
- See references/opinion.md
Output file: for Chinese or for English (default font: 仿宋; adjust if language requires)
综合审核意见.docxConsolidated_Opinion.docx为业务团队生成简洁的两段式回复,语言与合同一致。
- 参考**references/opinion.md**
输出文件:中文合同使用,英文合同使用(默认字体:仿宋;可根据语言调整)
综合审核意见.docxConsolidated_Opinion.docxBusiness Flowchart (Mermaid)
业务流程图(Mermaid)
Generate Mermaid flowchart per requirements and render to image.
- See references/flowchart.md
Outputs:
business_flowchart.mmdbusiness_flowchart.png
li## Technical Notes
Core workflow:
- Unpack → 2. Entity verification → 3. Add comments → 4. Summary → 5. Opinion → 6. Flowchart → 7. Repack
API & implementation details:
- references/technical.md
根据要求生成Mermaid流程图并渲染为图片。
- 参考**references/flowchart.md**
输出成果:
business_flowchart.mmdbusiness_flowchart.png
Dependencies
技术说明
- Python 3.9+ (3.10+ recommended)
- pandoc (system install)
- defusedxml
- Mermaid CLI () for rendering
mmdc - python-docx for rich text output
核心工作流程:
- 解压 → 2. 主体验证 → 3. 添加批注 → 4. 生成摘要 → 5. 生成意见 → 6. 生成流程图 → 7. 重新打包
API与实现细节:
- references/technical.md
Troubleshooting (Short)
依赖项
- Comments missing in Word: run and re-save
doc.verify_comments() - find_paragraph fails: shorten search text; confirm actual paragraph text
- Mermaid render fails: ensure installed; use Chrome path or Puppeteer config
mmdc
- Python 3.9+(推荐3.10+)
- pandoc(系统级安装)
- defusedxml
- Mermaid CLI ()(用于渲染)
mmdc - python-docx(用于富文本输出)
Examples
快速故障排查
See references/examples.md for a full workflow example.
- Word中缺失批注:运行后重新保存
doc.verify_comments() - find_paragraph执行失败:缩短搜索文本;确认段落实际内容
- Mermaid渲染失败:确保已安装;使用Chrome路径或配置Puppeteer
mmdc
Important Rules
示例
- Never alter original contract text
- Entity verification (Layer 0) must complete before clause review (Layers 1–3)
- Review all four layers, do not skip items
- Ensure risk level is accurate and consistent
- Keep comments precise, professional, and actionable
- Flowchart must come strictly from the contract text
- Summary is objective only; no risk analysis
- Opinion only reflects findings already identified
完整工作流程示例请参考**references/examples.md**
License
重要规则
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2026 JiCheng
Licensed under the Apache License, Version 2.0. See repository root .
LICENSE- 绝对不得修改原合同文本
- 必须完成第0层主体验证后,方可进行第1-3层条款审核
- 需覆盖全部四层审核,不得遗漏项目
- 确保风险等级准确且一致
- 批注需精准、专业且具备可操作性
- 流程图必须严格基于合同文本生成
- 摘要仅需客观陈述,不得包含风险分析
- 审核意见仅反映已识别的问题
—
许可证
—
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2026 JiCheng
基于Apache License, Version 2.0许可。请查看仓库根目录下的文件。
LICENSE