Contract Review logo

Contract Review

CommunityPopular
anbeime
contract-review

律师助理与法律助手、项目管理专家在审核合同、排查条款风险时必备。自动执行基础、商业、法律三层审查,仅添加批注不改原文,一键生成带批注合同、审查摘要、综合意见及业务流程图,让合同风控与业务梳理更高效专业。

Overview

Publisheranbeime
Repositoryskill
Skill namecontract-review
Stars
6.9K
Forks
645
Bundled files
25
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 25 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by anbeime on GitHub. Read the source before you install it.

Installation

Install the Contract Review AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/anbeime/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/skills/legal-assistant-skills-main/contract-review .claude/skills/contract-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Contract Review in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Contract Review on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Contract Review is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

  1. Unpack the contract (.docx) for XML operations
  2. Read contract text (pandoc or XML)
  3. Execute three-layer review
  4. Add comments to the document
  5. Generate contract summary
  6. Generate consolidated opinion
  7. Generate business flowchart and render image
  8. 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

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.

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.mmd
  • business_flowchart.png

li## Technical Notes

Core workflow:

  1. Unpack → 2. Add comments → 3. Summary → 4. Opinion → 5. Flowchart → 6. 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 mmdc installed; use Chrome path or Puppeteer config

Examples

See references/examples.md for a full workflow example.

Important Rules

  1. Never alter original contract text
  2. Review all three layers, do not skip items
  3. Ensure risk level is accurate and consistent
  4. Keep comments precise, professional, and actionable
  5. Flowchart must come strictly from the contract text
  6. Summary is objective only; no risk analysis
  7. Opinion only reflects findings already identified

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Contract Review AI skill do?

律师助理与法律助手、项目管理专家在审核合同、排查条款风险时必备。自动执行基础、商业、法律三层审查,仅添加批注不改原文,一键生成带批注合同、审查摘要、综合意见及业务流程图,让合同风控与业务梳理更高效专业。

Why use Contract Review on TypingMind?

Because you install it once and use it with any model. Contract Review is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Contract Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/anbeime/skill/tree/main/skills/legal-assistant-skills-main/contract-review. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Contract Review?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Contract Review?

As many as you like. As long as a model supports skills, you can use Contract Review with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Contract Review AI skill free?

It is published on GitHub by anbeime. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇