contract-review-pro
Professional-grade contract review skill that adds comment-based issue annotations without changing original text. Enforces a four-layer review (entity verification, basic, business, legal), writes structured comments (issue type, risk reason, revision suggestion) with risk level
Install
npx skills add https://github.com/lovstudio/skills/tree/main/skills/contract-review-pro
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lovstudio-skills@llmmart
git clone https://github.com/lovstudio/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lovstudio/skills collection as a plugin from our marketplace. Git is the plain clone.
README
合同批注专家 · Contract Reviewer
Professional-grade contract review skill. Adds comment-based issue annotations without modifying the original text. Enforces a four-layer review methodology and produces a full review deliverable.
专业级合同审阅 skill。只加批注、不改原文;四层方法论审查,并生成完整的审核交付物。
What you get / 产出
Annotated contract (.docx) — inline comments anchored to specific clauses
Contract summary (.docx) — key terms, amounts, parties at a glance
Consolidated review opinion (.docx) — prioritized issue list with recommendations
Business flowchart — Mermaid source + rendered image
批注版合同(.docx) — 精准锚定条款的批注
合同摘要(.docx) — 关键条款 / 金额 / 主体一览
综合审核意见(.docx) — 按优先级排序的问题清单与建议
业务流程图 — Mermaid 源码 + 渲染图
Four-layer methodology / 四层方法论
- Entity verification — 主体核验:确认签约方资质
- Basic review — 基础审查:标题、日期、条款编号、引用一致性
- Business review — 业务审查:商业条款合理性与内部一致性
- Legal review — 法务审查:风险条款、责任分配、争议解决
Language
Output language follows the contract's dominant language (detected automatically). All comments, summary, opinion, and flowchart labels are generated in the detected language.
输出语言跟随合同主导语言自动适配。
Install
npx skills add lovstudio/contract-review-pro-skill --all -g
See also
review-doc— lightweight daily version for general document reviewreview-doc— 日常轻量版,适用于普通文档审阅
License
MIT — content adapted from jicheng's contract-review methodology.
Skill manifest
合同批注专家 · Contract Reviewer
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.
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
Output Naming
- Output directory:
审核结果:{ContractName}for Chinese orReview_Result_{ContractName}for English - Reviewed contract:
{ContractName}_审核版.docxfor Chinese or{ContractName}_Reviewed.docxfor English - Review report:
审核报告.txtfor Chinese orReview_Report.txtfor English
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.
Review Standards
Use the four-layer review model and the detailed checklist in references/checklist.md.
Layer 0: Entity verification (subject authenticity)
- 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.
Layer 1: Basic (text quality)
- Accuracy of numbers, dates, terms
- Consistent numbering and references
- Clarity and lack of ambiguity
- Formatting and punctuation quality
Layer 2: Business terms
- Scope, deliverables, quantity/specs
- Pricing and payment schedule
- Delivery/acceptance procedures
- Rights/obligations and performance guarantees
Layer 3: Legal terms
- 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: 合同概要.docx for Chinese or Contract_Summary.docx for English (default font: 仿宋; adjust if language requires)
Consolidated Opinion
Generate a concise, two-paragraph response for the business team in the contract’s language.
Output file: 综合审核意见.docx for Chinese or Consolidated_Opinion.docx for English (default font: 仿宋; adjust if language requires)
Business Flowchart (Mermaid)
Generate Mermaid flowchart per requirements and render to image.
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:
Dependencies
- Python 3.9+ (3.10+ recommended)
- pandoc (system install)
- defusedxml
- Mermaid CLI (
mmdc) for rendering - python-docx for rich text output
Troubleshooting (Short)
- Comments missing in Word: run
doc.verify_comments()and re-save - find_paragraph fails: shorten search text; confirm actual paragraph text
- Mermaid render fails: ensure
mmdcinstalled; use Chrome path or Puppeteer config
Examples
See references/examples.md for a full workflow example.
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
License
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2026 JiCheng
Licensed under the Apache License, Version 2.0. See repository root LICENSE.
通用反馈闭环
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
- 先判断意见是
task-specific(仅本次)还是reusable(可跨任务复用)。 task-specific只修改当前任务,不改 Skill。reusable先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。- 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
reusable修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
Files (skills)
-
references
-
checklist.md 6.8 KB
Loading… -
examples.md 5.7 KB
Loading… -
flowchart.md 1.8 KB
Loading… -
language.md 2.2 KB
Loading… -
opinion.md 1.4 KB
Loading… -
summary.md 2.9 KB
Loading… -
technical.md 2.7 KB
Loading…
-
-
scripts
-
ooxml
-
validation
-
base.py 1.5 KB
Loading… -
docx.py 324 B
Loading… -
pptx.py 286 B
Loading… -
redlining.py 228 B
Loading… -
__init__.py 448 B
Loading…
-
-
pack.py 3.6 KB
Loading… -
unpack.py 1.1 KB
Loading… -
validate.py 1.7 KB
Loading… -
__init__.py 195 B
Loading…
-
-
contract_analyzer.py 9.5 KB
Loading… -
document.py 11.6 KB
Loading… -
error_handling.py 16.8 KB
Loading… -
mermaid_renderer.py 7.1 KB
Loading… -
opinion_renderer.py 4.3 KB
Loading… -
summary_renderer.py 9.4 KB
Loading… -
utilities.py 3.1 KB
Loading… -
workflow.py 60.6 KB
Loading… -
__init__.py 51 B
Loading…
-
-
CHANGELOG.md 317 B
Loading… -
README.md 2 KB
# 合同批注专家 · Contract Reviewer  Professional-grade contract review skill. Adds comment-based issue annotations without modifying the original text. Enforces a four-layer review methodology and produces a full review deliverable. 专业级合同审阅 skill。只加批注、不改原文;四层方法论审查,并生成完整的审核交付物。 ## What you get / 产出 - **Annotated contract (.docx)** — inline comments anchored to specific clauses - **Contract summary (.docx)** — key terms, amounts, parties at a glance - **Consolidated review opinion (.docx)** — prioritized issue list with recommendations - **Business flowchart** — Mermaid source + rendered image - **批注版合同(.docx)** — 精准锚定条款的批注 - **合同摘要(.docx)** — 关键条款 / 金额 / 主体一览 - **综合审核意见(.docx)** — 按优先级排序的问题清单与建议 - **业务流程图** — Mermaid 源码 + 渲染图 ## Four-layer methodology / 四层方法论 0. **Entity verification** — 主体核验:确认签约方资质 1. **Basic review** — 基础审查:标题、日期、条款编号、引用一致性 2. **Business review** — 业务审查:商业条款合理性与内部一致性 3. **Legal review** — 法务审查:风险条款、责任分配、争议解决 ## Language Output language follows the contract's dominant language (detected automatically). All comments, summary, opinion, and flowchart labels are generated in the detected language. 输出语言跟随合同主导语言自动适配。 ## Install ```bash npx skills add lovstudio/contract-review-pro-skill --all -g ``` ## See also - [`review-doc`](https://github.com/lovstudio/review-doc-skill) — lightweight daily version for general document review - [`review-doc`](https://github.com/lovstudio/review-doc-skill) — 日常轻量版,适用于普通文档审阅 ## License MIT — content adapted from jicheng's contract-review methodology. -
SKILL.md 7.2 KB
--- name: contract-review-pro description: "Professional-grade contract review skill that adds comment-based issue annotations without changing original text. Enforces a four-layer review (entity verification, basic, business, legal), writes structured comments (issue type, risk reason, revision suggestion) with risk level encoded via reviewer name, and generates a contract summary, consolidated opinion, and Mermaid business flowchart (with rendered image). Output language must follow the contract’s language." metadata: version: "0.2.0" --- # 合同批注专家 · Contract Reviewer ## 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](references/language.md)**. ## Workflow 1. Unpack the contract (.docx) for XML operations 2. Read contract text (pandoc or XML) 3. Extract and verify contracting parties (Layer 0) 4. Execute three-layer clause review (Layer 1–3) 5. Add comments to the document 6. Generate contract summary 7. Generate consolidated opinion 8. Generate business flowchart and render image 9. Repack to .docx ## Output Naming - Output directory: `审核结果:{ContractName}` for Chinese or `Review_Result_{ContractName}` for English - Reviewed contract: `{ContractName}_审核版.docx` for Chinese or `{ContractName}_Reviewed.docx` for English - Review report: `审核报告.txt` for Chinese or `Review_Report.txt` for English ## 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. ``` ## 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) - 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:** 1. 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. 2. If no such MCP tool is available, use Web Search to look up "[entity name] 工商登记信息" or "[entity name] business registration". 3. Record the verification source (MCP tool name / Web Search) in the comment. ### Layer 1: Basic (text quality) - Accuracy of numbers, dates, terms - Consistent numbering and references - Clarity and lack of ambiguity - Formatting and punctuation quality ### Layer 2: Business terms - Scope, deliverables, quantity/specs - Pricing and payment schedule - Delivery/acceptance procedures - Rights/obligations and performance guarantees ### Layer 3: Legal terms - 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](references/summary.md)** (English template) - Use **[references/language.md](references/language.md)** for language selection and Chinese labels Output file: `合同概要.docx` for Chinese or `Contract_Summary.docx` for English (default font: 仿宋; adjust if language requires) ## Consolidated Opinion Generate a concise, two-paragraph response for the business team in the contract’s language. - See **[references/opinion.md](references/opinion.md)** Output file: `综合审核意见.docx` for Chinese or `Consolidated_Opinion.docx` for English (default font: 仿宋; adjust if language requires) ## Business Flowchart (Mermaid) Generate Mermaid flowchart per requirements and render to image. - See **[references/flowchart.md](references/flowchart.md)** Outputs: - `business_flowchart.mmd` - `business_flowchart.png` li## Technical Notes Core workflow: 1. Unpack → 2. Entity verification → 3. Add comments → 4. Summary → 5. Opinion → 6. Flowchart → 7. Repack API & implementation details: - **[references/technical.md](references/technical.md)** ## Dependencies - Python 3.9+ (3.10+ recommended) - pandoc (system install) - defusedxml - Mermaid CLI (`mmdc`) for rendering - python-docx for rich text output ## Troubleshooting (Short) - **Comments missing in Word**: run `doc.verify_comments()` and re-save - **find_paragraph fails**: shorten search text; confirm actual paragraph text - **Mermaid render fails**: ensure `mmdc` installed; use Chrome path or Puppeteer config ## Examples See **[references/examples.md](references/examples.md)** for a full workflow example. ## Important Rules 1. Never alter original contract text 2. Entity verification (Layer 0) must complete before clause review (Layers 1–3) 3. Review all four layers, do not skip items 4. Ensure risk level is accurate and consistent 5. Keep comments precise, professional, and actionable 6. Flowchart must come strictly from the contract text 7. Summary is objective only; no risk analysis 8. Opinion only reflects findings already identified ## License SPDX-License-Identifier: Apache-2.0 Copyright (c) 2026 JiCheng Licensed under the Apache License, Version 2.0. See repository root `LICENSE`. ## 通用反馈闭环 用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行: 1. 先判断意见是 `task-specific`(仅本次)还是 `reusable`(可跨任务复用)。 2. `task-specific` 只修改当前任务,不改 Skill。 3. `reusable` 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。 4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。 5. `reusable` 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.