mcpbeat

Contract Review

anbeime/contract-review

Contract review skill that adds comment-based issue annotations without changing original text. Enforces a three-layer review (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.

43k tokens
context cost
the whole folder, loaded on every use
27
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
4658
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/anbeime/skill --skill contract-review

What comes with it

164 660 bytes besides the instruction
LICENSE.txt
references/checklist.md
references/examples.md
references/flowchart.md
references/language.md
references/opinion.md
references/summary.md
references/technical.md
scripts/__init__.py
scripts/contract_analyzer.py
scripts/document.py
scripts/error_handling.py
scripts/mermaid_renderer.py
scripts/ooxml/__init__.py
scripts/ooxml/pack.py
scripts/ooxml/unpack.py
scripts/ooxml/validate.py
scripts/ooxml/validation/__init__.py
scripts/ooxml/validation/base.py
scripts/ooxml/validation/docx.py
scripts/ooxml/validation/pptx.py
scripts/ooxml/validation/redlining.py
scripts/opinion_renderer.py
scripts/summary_renderer.py
scripts/utilities.py
scripts/workflow.py

The instruction itself

16 sections, as written by the author

Contract Review Skill

Overview

This skill performs contract reviews by adding comments only (no edits to the original text). It follows a three-layer review (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)
  • Execute three-layer review
  • 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 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 three-layer review model and the detailed checklist in references/checklist.md.

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
  • 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.

  • See 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

Outputs:

  • business_flowchart.mmd
  • business_flowchart.png

li## Technical Notes

Core workflow:

  • Unpack → 2. Add comments → 3. Summary → 4. Opinion → 5. Flowchart → 6. Repack

API & implementation details:

  • 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 for a full workflow example.

Important Rules

  • Never alter original contract text
  • Review all three 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

How to use it

Copy the folder

Take anbeime/contract-review from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.