{"id":"contract-review","name":"contract-review","summary":"原文を変えずにコメントベースの問題注釈を追加する契約レビュースキル。","body":"# Contract Review Skill\n\n## Overview\n\nThis 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:\n\n- Annotated contract (.docx)\n- Contract summary (.docx)\n- Consolidated review opinion (.docx)\n- Business flowchart (Mermaid + rendered image)\n\n**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)**.\n\n## Workflow\n\n1. Unpack the contract (.docx) for XML operations\n2. Read contract text (pandoc or XML)\n3. Execute three-layer review\n4. Add comments to the document\n5. Generate contract summary\n6. Generate consolidated opinion\n7. Generate business flowchart and render image\n8. Repack to .docx\n\n## Output Naming\n\n- Output directory: `审核结果：{ContractName}` for Chinese or `Review_Result_{ContractName}` for English\n- Reviewed contract: `{ContractName}_审核版.docx` for Chinese or `{ContractName}_Reviewed.docx` for English\n- Review report: `审核报告.txt` for Chinese or `Review_Report.txt` for English\n\n## Comment Principles\n\n- **Comments only**: do not modify the original text or formatting\n- **Precise anchoring**: comment should target specific clauses/paragraphs\n- **Structured content**: each comment includes issue type, risk reason, and revision suggestion\n- **Risk level**: carried by reviewer name; do **not** include a “risk level” line in comment body\n- **Output language**: use labels in the contract’s language (see `references/language.md`)\n\n**Comment example (English):**\n```\n[Issue Type] Payment Terms\n[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.\n[Revision Suggestion] Align the total amount across clauses and clarify whether tax is included.\n```\n\n## Review Standards\n\nUse the three-layer review model and the detailed checklist in **[references/checklist.md](references/checklist.md)**.\n\n### Layer 1: Basic (text quality)\n- Accuracy of numbers, dates, terms\n- Consistent numbering and references\n- Clarity and lack of ambiguity\n- Formatting and punctuation quality\n\n### Layer 2: Business terms\n- Scope, deliverables, quantity/specs\n- Pricing and payment schedule\n- Delivery/acceptance procedures\n- Rights/obligations and performance guarantees\n\n### Layer 3: Legal terms\n- Effectiveness and term/termination\n- Liability/penalties and remedies\n- Dispute resolution and governing law\n- Confidentiality, force majeure, IP, notice, authorization\n\n**Risk levels (encoded in reviewer name):**\n- 🔴 High: core business ambiguity (price, scope, rights/obligations)\n- 🟡 Medium: material but non-core ambiguity\n- 🔵 Low: minimal practical impact\n\n## Contract Summary\n\nGenerate a structured, objective summary in the contract’s language.\n- See **[references/summary.md](references/summary.md)** (English template)\n- Use **[references/language.md](references/language.md)** for language selection and Chinese labels\n\nOutput file: `合同概要.docx` for Chinese or `Contract_Summary.docx` for English (default font: 仿宋; adjust if language requires)\n\n## Consolidated Opinion\n\nGenerate a concise, two-paragraph response for the business team in the contract’s language.\n- See **[references/opinion.md](references/opinion.md)**\n\nOutput file: `综合审核意见.docx` for Chinese or `Consolidated_Opinion.docx` for English (default font: 仿宋; adjust if language requires)\n\n## Business Flowchart (Mermaid)\n\nGenerate Mermaid flowchart per requirements and render to image.\n- See **[references/flowchart.md](references/flowchart.md)**\n\nOutputs:\n- `business_flowchart.mmd`\n- `business_flowchart.png`\n\nli## Technical Notes\n\nCore workflow:\n1. Unpack → 2. Add comments → 3. Summary → 4. Opinion → 5. Flowchart → 6. Repack\n\nAPI & implementation details:\n- **[references/technical.md](references/technical.md)**\n\n## Dependencies\n\n- Python 3.9+ (3.10+ recommended)\n- pandoc (system install)\n- defusedxml\n- Mermaid CLI (`mmdc`) for rendering\n- python-docx for rich text output\n\n## Troubleshooting (Short)\n\n- **Comments missing in Word**: run `doc.verify_comments()` and re-save\n- **find_paragraph fails**: shorten search text; confirm actual paragraph text\n- **Mermaid render fails**: ensure `mmdc` installed; use Chrome path or Puppeteer config\n\n## Examples\n\nSee **[references/examples.md](references/examples.md)** for a full workflow example.\n\n## Important Rules\n\n1. Never alter original contract text\n2. Review all three layers, do not skip items\n3. Ensure risk level is accurate and consistent\n4. Keep comments precise, professional, and actionable\n5. Flowchart must come strictly from the contract text\n6. Summary is objective only; no risk analysis\n7. Opinion only reflects findings already identified","author":"@anbeime","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/anbeime/skill/tree/main/skills/legal-assistant-skills-main/contract-review","license":"Apache-2.0","category":"document","lang":"en","tokens":1153,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"LICENSE.txt","size":11357,"sha256":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"},{"path":"references/checklist.md","size":5420,"sha256":"e8a6937778b159c184b7f09283fac3e7dbe061fada827ba785e9a3525817848b"},{"path":"references/examples.md","size":5621,"sha256":"01f999f1b8684980cc8a9fdb000d4240821df142595af3f606ac27aae19ac817"},{"path":"references/flowchart.md","size":1822,"sha256":"fec0411b55e3f88263ad27abce8b7e8d17a820f3c9aa7f93e99509d251ffe230"},{"path":"references/language.md","size":2017,"sha256":"250a7316c186be4b6f6722eb301ac03676d0afa436741462d2cd2f1d01fc1608"},{"path":"references/opinion.md","size":1375,"sha256":"ac4f2b4627e1718227edca98c0615db2d5f289dca4d14fdb2559bb206e8df9d6"},{"path":"references/summary.md","size":2912,"sha256":"619e7da0c57b8df62b4ba5be2684562ce0efea557df73d832d2c830dded3d567"},{"path":"references/technical.md","size":2716,"sha256":"138a278a48b2d3088071df13fe384dfb5931cfacf2e51d294e11ef5822320d26"},{"path":"scripts/contract_analyzer.py","size":9418,"sha256":"0c3be7d28fa9110f4a56ed7cc05ca51a57ead05db2af2af3566dc8629ae647c7"},{"path":"scripts/document.py","size":11550,"sha256":"4ee7fdb867e382ee9642f5b055d0163c0147d70dff678e6063b5a1c2b81d49f2"},{"path":"scripts/error_handling.py","size":16670,"sha256":"004c20472cb888d56c67aa5a22573021b27396ae2dfbddc7221f0d262cb4e677"},{"path":"scripts/__init__.py","size":50,"sha256":"a256c3ead4fc1ea9d078676f1e8c6f3dbe21ff2f09acff91390a7e68494808d8"},{"path":"scripts/mermaid_renderer.py","size":7086,"sha256":"18f5f122434e69fba99816e6d494a93c22d1899832d1a8ec6fbc6f85ee2ad9d6"},{"path":"scripts/ooxml/__init__.py","size":189,"sha256":"32fd9ef9b8d83357a14138dc63b0e0ab191a659aa0cdad2a583ae9fdaa9413ff"},{"path":"scripts/ooxml/pack.py","size":3544,"sha256":"3879cfd6d9379f0dea3747988a3dab512e6c3dc3a0a105a787f202832fb6d456"},{"path":"scripts/ooxml/unpack.py","size":1100,"sha256":"1061dbd8fef887ded13572449bd0c4f09b25c08c2c68e22c7d9355b8552ee24a"},{"path":"scripts/ooxml/validate.py","size":1734,"sha256":"b37810d96f1a9dd629fd59c38e880cd9253a6642d0a13175a623899ba4e83247"},{"path":"scripts/ooxml/validation/base.py","size":1497,"sha256":"854d377f562aaa95613f045239dcec23584f6c631e1afcf805b9e224c9083bc2"},{"path":"scripts/ooxml/validation/docx.py","size":311,"sha256":"8bfb39c3ee0dd105dc8e49d9e52436c6a46569d9d720a581fa4354bd041aa8f7"},{"path":"scripts/ooxml/validation/__init__.py","size":433,"sha256":"d4a8c7c415dcd140c96fbf654896d3d05b3d736b0db5bc46c1618b8703c90f71"},{"path":"scripts/ooxml/validation/pptx.py","size":274,"sha256":"ec1c923a29b62725a6a467a51aa90ad8eb33b87b85b2c052d155a2fab77d7fa7"},{"path":"scripts/ooxml/validation/redlining.py","size":217,"sha256":"c7a573c402c119a56df5588276dc7dc86cf3fbc79076193f4c887d0173e201bc"},{"path":"scripts/opinion_renderer.py","size":4280,"sha256":"f66b732ae402b4f316128fd1cfc6265584eb618d633b1786b7f89507d22300f2"},{"path":"scripts/summary_renderer.py","size":9350,"sha256":"ae52aa8712e986f72c3453402ed7721919bfa38c84460bc707bb99f72f65dc53"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[{"code":"net.endpoints","kind":"exfiltration","excerpt":"schemas.openxmlformats.org","message":"bundled scripts reach 1 external host(s)","severity":"warn"}],"scannedAt":"2026-08-22","hasScripts":true,"networkEndpoints":["schemas.openxmlformats.org"]}}