contract-review
律师助理与法律助手、项目管理专家在审核合同、排查条款风险时必备。自动执行基础、商业、法律三层审查,仅添加批注不改原文,一键生成带批注合同、审查摘要、综合意见及业务流程图,让合同风控与业务梳理更高效专业。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- contract-review
- description
- 律师助理与法律助手、项目管理专家在审核合同、排查条款风险时必备。自动执行基础、商业、法律三层审查,仅添加批注不改原文,一键生成带批注合同、审查摘要、综合意见及业务流程图,让合同风控与业务梳理更高效专业。
02 资源文件 26
- 许可证LICENSE.txt11.1 KB
- 参考文档references/checklist.md5.3 KB
- 参考文档references/examples.md5.5 KB
- 参考文档references/flowchart.md1.8 KB
- 参考文档references/language.md2.0 KB
- 参考文档references/opinion.md1.3 KB
- 参考文档references/summary.md2.8 KB
- 参考文档references/technical.md2.7 KB
- 脚本scripts/__init__.py50 B
- 脚本scripts/contract_analyzer.py9.2 KB
- 脚本scripts/document.py11.3 KB
- 脚本scripts/error_handling.py16.3 KB
- 脚本scripts/mermaid_renderer.py6.9 KB
- 脚本scripts/ooxml/__init__.py189 B
- 脚本scripts/ooxml/pack.py3.5 KB
- 脚本scripts/ooxml/unpack.py1.1 KB
- 脚本scripts/ooxml/validate.py1.7 KB
- 脚本scripts/ooxml/validation/__init__.py433 B
- 脚本scripts/ooxml/validation/base.py1.5 KB
- 脚本scripts/ooxml/validation/docx.py311 B
- 脚本scripts/ooxml/validation/pptx.py274 B
- 脚本scripts/ooxml/validation/redlining.py217 B
- 脚本scripts/opinion_renderer.py4.2 KB
- 脚本scripts/summary_renderer.py9.1 KB
- 脚本scripts/utilities.py3.1 KB
- 脚本scripts/workflow.py59.2 KB
03 SKILL.md 正文
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 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 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.
- 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. 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
mmdcinstalled; 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
04 同仓库更多 Skills
writing-dna-skill
从至少 20 篇完整文章中蒸馏可复用的写作 DNA,分析语言、文章结构、选题逻辑、素材策略、认知框架和视觉风格,并生成 Writing-DNA.md;按该 DNA 写作时会读取全部蒸馏产物和 5 篇相关原文。用于中英文作者、账号、品牌或出版物的风格分析与一致性写作。 Distill reusable Writing DNA from at least 20 complete articles for Chinese or English authors, publications, brands, and accounts; use for language, structure, topic logic, source strategy, cognitive-frame, and visual-style analysis.
ub-quality-gates
Uncle Bob 编程纪律与确定性质量门工具链。写代码或改代码时使用:先让它能跑,再让它正确,最后守纪律。 当用户要求 /ub-mode、需要代码质量门禁、CRAP 评分、重复代码检测、变异测试、 或抱怨代码难懂/难测/有重复时触发。覆盖 Clojure/Java/Go/TypeScript/Rust/Python。
tweet-composer
Score and optimize tweets based on X's real open-source ranking algorithm. Analyzes draft tweets against the actual ranking code — not generic tips. Use when: composing tweets, optimizing drafts for reach, planning threads, analyzing why a tweet performed well/poorly, or asking for posting strategy advice.
short-video-scripter
Use when the user asks to "script this short video", "write a TikTok / Reels / Shorts script", "给这条抖音或视频号视频写脚本", or "fix the hook — viewers drop off in the first seconds"; produces timestamped beat-sheet scripts on the retention-gate model (0-2s hook / 2-5s confirmation / 5-15s payoff / loop-or-CTA) with per-scene script lines, on-screen text for muted viewing, asset keywords, and 9:16 format-param rows per platform norm card for TikTok, Reels, Shorts, 抖音, and 视频号 — plus 2-3 hook options from named hook families and an AI-content disclosure line by default on realistic synthetic media. Spec-only: rendering, TTS, and publishing stay with the user's own tools — no pipelines, no upload automation. Not for creator video briefs — use brief-generator; long-form video SEO belongs to content-writer. 短视频脚本/抖音分镜/开头钩子/竖屏9:16
remotion-video-master
Remotion 视频编程大师 — 用 React 组件以编程方式创建 MP4 视频。支持动画、字幕、音乐可视化、 AI 配音(TTS)与场景自动配时。触发词:用代码做视频、编程视频、React 视频、Remotion、 /remotion-video。适用场景:程序化视频(批量生成、数据驱动如年度总结、音乐可视化、自动字幕)、 教程讲解视频(技术概念可视化如 CNN 与算法、分层递进讲解、AI 配音教程)、 3D 视频(产品展示与模型动画、卡通角色讲解、3D 数据可视化、Logo 动画)。
short-videos
Produce 90-second universal short-video scripts (HeyGen / Instagram Reels / LinkedIn Video / YouTube Shorts) and standalone LinkedIn posts using native Hermes tools. No Claude Code dependency.