{"id":"d67d3ce2-4bd4-4d95-ab7d-f74ccd04438b","shortId":"fs45wM","kind":"skill","title":"lovstudio-review-doc","tagline":"Review and annotate documents/contracts — output annotated docx with comments or tracked changes. Core: contract review (risk clauses, rights imbalance, vague wording, missing clauses); also general document review (grammar, logic, formatting). 批阅文档/合同 — 审阅任意文档并以批注或修订模式输出带标注的 doc","description":"# review-doc — Review & Annotate Documents / 批阅文档与合同\n\nAI-powered document and contract review. Outputs annotated docx with comments\nand/or tracked changes.\n\n审阅文档或合同，AI 进行审查分析，将审查意见以批注（comment）或修订模式\n（track changes）写回文档，输出带批注的 docx。\n\n## When to Use\n\n- User provides a document for review, annotation, or audit\n  用户提供文档要求审阅、审查、批注、批阅\n- Contract/agreement review: risk clauses, rights imbalance, vague wording, missing clauses\n  合同/协议审查：识别风险条款、权利义务失衡、模糊表述、缺失条款\n- General document review: grammar, logic, formatting, completeness\n  通用文档审阅：语法、逻辑、格式、内容完整性\n- Supports .docx input / 当前支持 .docx 格式输入\n\n## Workflow\n\n### Step 1: Extract text\n\nExtract paragraph text and indices / 用脚本提取段落文本和索引：\n\n    python3 lovstudio-review-doc/scripts/annotate_docx.py extract --input <path.docx>\n\nOutputs JSON array, each item has `index` (paragraph number) and `text`.\nIncludes text inside tracked changes (`<w:ins>`) — e.g. counterparty revisions\nvisible in Track Changes mode.\n输出 JSON 数组，每项含 `index`（段落序号）和 `text`（含修订追踪内容）。\n\n**Important:** If the document has tracked changes (e.g. Schedule A added via\nTrack Changes), these paragraphs are now included in extraction. Always review\nthe full extracted output before generating annotations.\n如果文档包含修订追踪内容（如对方以 Track Changes 添加的附件），这些段落\n现已包含在提取结果中。\n\n### Step 2: Ask the user\n\n**IMPORTANT: Use `AskUserQuestion` BEFORE generating annotations.**\n\n    Review mode / 审阅模式确认\n\n    ━━━ Review type / 审阅类型 ━━━\n    a) Contract review — risk clauses, rights, vague wording, missing clauses\n       合同/协议审查 — 风险条款、权利义务、模糊表述、缺失条款\n    b) General document review — grammar, logic, formatting, completeness\n       通用文档审阅 — 语法、逻辑、格式、内容完整性\n\n    ━━━ Annotation mode / 批注方式 ━━━\n    a) Comments only (default) — add comments alongside text, no changes\n       批注模式（默认） — 在原文旁加 comment，不改原文\n    b) Track changes — directly modify text, recipient can accept/reject\n       修订模式 — 用 track changes 直接改原文，对方可逐条接受/拒绝\n    c) Comments + track changes — comments for analysis, revisions for suggestions\n       批注 + 修订 — 批注写分析意见，修订写建议改法\n\n    ━━━ Author name / 批注者署名 ━━━\n    Default \"手工川\", customizable\n\n### Step 3: AI Review\n\nReview the extracted text. For contract review, focus on:\n\n根据提取的文本进行审查。对于合同审查，重点关注：\n\n1. **Risk clauses / 风险条款** — one-sided rights, disclaimers, force majeure abuse\n2. **Rights imbalance / 权利义务失衡** — disproportionate obligations, inadequate consideration\n3. **Vague wording / 模糊表述** — \"reasonable\", \"appropriate\" without objective criteria\n4. **Missing clauses / 缺失条款** — dispute resolution, post-termination obligations, IP ownership\n5. **Terms & amounts / 期限与金额** — unreasonable durations or amounts\n6. **Legal compliance / 法律合规** — governing law, arbitration clauses\n\n生成 annotations JSON，格式：\n\n    {\n      \"comments\": [\n        {\n          \"paragraph\": 18,\n          \"text\": \"【风险】Sourced Deal 认定...\",\n          \"author\": \"手工川\"\n        }\n      ],\n      \"revisions\": [\n        {\n          \"paragraph\": 12,\n          \"old\": \"terminates automatically\",\n          \"new\": \"terminates automatically, provided that...\",\n          \"author\": \"手工川\"\n        }\n      ]\n    }\n\nAnnotation text format / 批注文本格式规范：\n- Lead with tag / 以标签开头：`【风险/Risk】`、`【建议/Suggestion】`、`【缺失/Missing】`、`【模糊/Vague】`、`【注意/Note】`\n- Concise, 1-3 sentences per annotation / 简明扼要，每条批注控制在 1-3 句话\n- Provide concrete revision direction when suggesting changes / 有建议时给出具体修改方向\n- Match the document language — Chinese docs get Chinese annotations, English docs get English, mixed docs get bilingual / 批注语言跟随文档语言\n\n### Step 4: Apply annotations\n\n将 JSON 写入临时文件，调用脚本：\n\n    python3 lovstudio-review-doc/scripts/annotate_docx.py annotate \\\n      --input <原文.docx> \\\n      --annotations <annotations.json> \\\n      --output <输出路径.docx>\n\n### Step 5: Output naming\n\n输出文件名规范：`手工川-{原文件名}-审阅-{YYYY-MM-DD}-v0.1.docx`\n\n放在原文件同目录下。\n\n## CLI Reference\n\n    python3 annotate_docx.py extract --input <path.docx>\n    python3 annotate_docx.py annotate --input <path.docx> --annotations <json> --output <path.docx>\n\n| Subcommand | Argument | Description |\n|------------|----------|-------------|\n| `extract` | `--input` | 输入 docx 路径 |\n| `annotate` | `--input` | 输入 docx 路径 |\n| `annotate` | `--annotations` | JSON 批注文件路径 |\n| `annotate` | `--output` | 输出 docx 路径 |\n\n## Comment JSON Fields\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `paragraph` | Yes | 0-based 段落索引 |\n| `text` | Yes | 批注内容 |\n| `author` | No | 批注者署名（默认 \"Reviewer\"） |\n| `start` | No | 字符偏移起始位置（精确高亮） |\n| `end` | No | 字符偏移结束位置 |\n\n## Revision JSON Fields\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `paragraph` | Yes | 0-based 段落索引 |\n| `old` | Yes | 要替换的原文 |\n| `new` | Yes | 修改后的文本 |\n| `author` | No | 修订者署名 |\n\n## Caveats\n\n- **Revisions match per-run**: `old` text in revisions must match a single\n  `<w:r>` (run) in the paragraph. If the target text is split across multiple\n  runs (common with smart quotes, spell-check, or mixed formatting), the\n  revision will be skipped. Workaround: match a substring within one run, or\n  use a comment instead.\n  修订的 `old` 文本必须完整匹配段落中的单个 run。如果目标文本跨 run，修订会\n  被跳过。可改用批注替代。\n- **Pre-existing comments**: the script auto-detects max existing comment ID\n  and starts new IDs after it. No manual ID management needed.\n  脚本自动检测已有批注的最大 ID，新批注从其后开始编号。\n\n## Dependencies\n\n    pip install python-docx --break-system-packages","tags":["review","doc","skills","lovstudio","agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"capabilities":["skill","source-lovstudio","skill-review-doc","topic-agent-skills","topic-ai-coding-assistant","topic-cjk","topic-claude-code","topic-cursor","topic-gemini-cli","topic-markdown-to-docx","topic-markdown-to-pdf"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/lovstudio/skills/review-doc","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add lovstudio/skills","source_repo":"https://github.com/lovstudio/skills","install_from":"skills.sh"}},"qualityScore":"0.477","qualityRationale":"deterministic score 0.48 from registry signals: · indexed on github topic:agent-skills · 54 github stars · SKILL.md body (5,316 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:57:49.399Z","embedding":null,"createdAt":"2026-04-18T22:19:07.030Z","updatedAt":"2026-05-18T18:57:49.399Z","lastSeenAt":"2026-05-18T18:57:49.399Z","tsv":"'-3':431,438 '/missing':424 '/note':428 '/risk':420 '/scripts/annotate_docx.py':138,479 '/suggestion':422 '/vague':426 '0':544,570 '1':124,327,430,437 '12':400 '18':390 '2':212,339 '3':312,347 '4':356,467 '5':368,489 '6':376 'abus':338 'accept/reject':283 'across':606 'ad':184 'add':264 'ai':47,62,313 'ai-pow':46 'alongsid':266 'also':28 'alway':195 'amount':370,375 'analysi':297 'and/or':58 'annot':7,10,43,54,81,203,221,257,385,411,434,456,469,480,484,510,512,522,527,528,531 'annotate_docx.py':505,509 'appli':468 'appropri':352 'arbitr':382 'argument':515 'array':143 'ask':213 'askuserquest':218 'audit':83 'author':305,396,409,550,579 'auto':652 'auto-detect':651 'automat':403,406 'b':244,275 'base':545,571 'bilingu':464 'break':679 'break-system-packag':678 'c':291 'caveat':582 'chang':16,60,68,156,163,180,187,207,269,277,287,294,446 'check':615 'chines':452,455 'claus':21,27,91,97,232,237,329,358,383 'cli':502 'comment':13,57,65,261,265,273,292,295,388,536,634,648,656 'common':609 'complet':110,251 'complianc':378 'concis':429 'concret':441 'consider':346 'contract':18,51,229,320 'contract/agreement':88 'core':17 'counterparti':158 'criteria':355 'customiz':310 'dd':499 'deal':394 'default':263,308 'depend':672 'descript':516,541,567 'detect':653 'direct':278,443 'disclaim':335 'disproportion':343 'disput':360 'doc':4,38,41,137,453,458,462,478 'document':30,44,49,78,105,177,246,450 'documents/contracts':8 'docx':11,55,71,117,120,483,487,520,525,534,677 'durat':373 'e.g':157,181 'end':559 'english':457,460 'exist':647,655 'extract':125,127,139,194,199,317,506,517 'field':538,539,564,565 'focus':322 'forc':336 'format':34,109,250,413,618 'full':198 'general':29,104,245 'generat':202,220 'get':454,459,463 'govern':380 'grammar':32,107,248 'id':657,661,666,670 'imbal':23,93,341 'import':174,216 'inadequ':345 'includ':152,192 'index':147,169 'indic':131 'input':118,140,481,507,511,518,523 'insid':154 'instal':674 'instead':635 'ip':366 'item':145 'json':142,166,386,471,529,537,563 'languag':451 'law':381 'lead':415 'legal':377 'logic':33,108,249 'lovstudio':2,135,476 'lovstudio-review-doc':1,134,475 'majeur':337 'manag':667 'manual':665 'match':448,584,593,625 'max':654 'miss':26,96,236,357 'mix':461,617 'mm':498 'mode':164,223,258 'modifi':279 'multipl':607 'must':592 'name':306,491 'need':668 'new':404,576,660 'number':149 'object':354 'oblig':344,365 'old':401,573,588,637 'one':332,629 'one-sid':331 'output':9,53,141,200,485,490,513,532 'ownership':367 'packag':681 'paragraph':128,148,189,389,399,542,568,599 'per':433,586 'per-run':585 'pip':673 'post':363 'post-termin':362 'power':48 'pre':646 'pre-exist':645 'provid':76,407,440 'python':676 'python-docx':675 'python3':133,474,504,508 'quot':612 'reason':351 'recipi':281 'refer':503 'requir':540,566 'resolut':361 'review':3,5,19,31,40,42,52,80,89,106,136,196,222,225,230,247,314,315,321,477,554 'review-doc':39 'revis':159,298,398,442,562,583,591,620 'right':22,92,233,334,340 'risk':20,90,231,328 'run':587,596,608,630,639,641 'schedul':182 'script':650 'sentenc':432 'side':333 'singl':595 'skill' 'skill-review-doc' 'skip':623 'smart':611 'sourc':393 'source-lovstudio' 'spell':614 'spell-check':613 'split':605 'start':555,659 'step':123,211,311,466,488 'subcommand':514 'substr':627 'suggest':300,445 'support':116 'system':680 'tag':417 'target':602 'term':369 'termin':364,402,405 'text':126,129,151,153,172,267,280,318,391,412,547,589,603 'topic-agent-skills' 'topic-ai-coding-assistant' 'topic-cjk' 'topic-claude-code' 'topic-cursor' 'topic-gemini-cli' 'topic-markdown-to-docx' 'topic-markdown-to-pdf' 'track':15,59,67,155,162,179,186,206,276,286,293 'type':226 'unreason':372 'use':74,217,632 'user':75,215 'v0.1.docx':500 'vagu':24,94,234,348 'via':185 'visibl':160 'within':628 'without':353 'word':25,95,235,349 'workaround':624 'workflow':122 'yes':543,548,569,574,577 'yyyi':497 'yyyy-mm-dd':496 '不改原文':274 '以标签开头':418 '修改后的文本':578 '修订':302 '修订会':642 '修订写建议改法':304 '修订模式':284 '修订的':636 '修订者署名':581 '内容完整性':115,256 '写入临时文件':472 '写回文档':69 '协议审查':99,239 '原文':482 '原文件名':494 '句话':439 '可改用批注替代':644 '合同':36,98,238 '含修订追踪内容':173 '和':171 '在原文旁加':272 '如对方以':205 '如果文档包含修订追踪内容':204 '如果目标文本跨':640 '字符偏移结束位置':561 '字符偏移起始位置':557 '审查':85 '审阅':495 '审阅任意文档并以批注或修订模式输出带标注的':37 '审阅文档或合同':61 '审阅模式确认':224 '审阅类型':227 '对于合同审查':325 '对方可逐条接受':289 '将':470 '将审查意见以批注':64 '建议':421 '当前支持':119 '或修订模式':66 '手工川':309,397,410,493 '批注':86,301 '批注内容':549 '批注写分析意见':303 '批注文件路径':530 '批注文本格式规范':414 '批注方式':259 '批注模式':270 '批注者署名':307,552 '批注语言跟随文档语言':465 '批阅':87 '批阅文档':35 '批阅文档与合同':45 '拒绝':290 '放在原文件同目录下':501 '数组':167 '文本必须完整匹配段落中的单个':638 '新批注从其后开始编号':671 '有建议时给出具体修改方向':447 '期限与金额':371 '权利义务':241 '权利义务失衡':101,342 '根据提取的文本进行审查':324 '格式':114,255,387 '格式输入':121 '模糊':425 '模糊表述':102,242,350 '段落序号':170 '段落索引':546,572 '每条批注控制在':436 '每项含':168 '法律合规':379 '注意':427 '添加的附件':208 '现已包含在提取结果中':210 '生成':384 '用':285 '用户提供文档要求审阅':84 '用脚本提取段落文本和索引':132 '直接改原文':288 '简明扼要':435 '精确高亮':558 '缺失':423 '缺失条款':103,243,359 '脚本自动检测已有批注的最大':669 '被跳过':643 '要替换的原文':575 '认定':395 '识别风险条款':100 '语法':112,253 '调用脚本':473 '路径':521,526,535 '输入':519,524 '输出':165,533 '输出带批注的':70 '输出文件名规范':492 '输出路径':486 '这些段落':209 '进行审查分析':63 '通用文档审阅':111,252 '逻辑':113,254 '重点关注':326 '风险':392,419 '风险条款':240,330 '默认':271,553","prices":[{"id":"9ff54846-9bdf-4a2c-98cd-1ea7b7b9441a","listingId":"d67d3ce2-4bd4-4d95-ab7d-f74ccd04438b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"lovstudio","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:19:07.030Z"}],"sources":[{"listingId":"d67d3ce2-4bd4-4d95-ab7d-f74ccd04438b","source":"github","sourceId":"lovstudio/skills/review-doc","sourceUrl":"https://github.com/lovstudio/skills/tree/main/skills/review-doc","isPrimary":false,"firstSeenAt":"2026-04-18T22:19:07.030Z","lastSeenAt":"2026-05-18T18:57:49.399Z"}],"details":{"listingId":"d67d3ce2-4bd4-4d95-ab7d-f74ccd04438b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"lovstudio","slug":"review-doc","github":{"repo":"lovstudio/skills","stars":54,"topics":["agent-skills","ai-coding-assistant","cjk","claude-code","cursor","gemini-cli","markdown-to-docx","markdown-to-pdf"],"license":"mit","html_url":"https://github.com/lovstudio/skills","pushed_at":"2026-05-17T09:28:31Z","description":"Top-level index for the Lovstudio skills ecosystem","skill_md_sha":"98352be0b17e8898f97d2e6cd12bb0f48e3785cd","skill_md_path":"skills/review-doc/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/lovstudio/skills/tree/main/skills/review-doc"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"lovstudio-review-doc","license":"MIT","description":"Review and annotate documents/contracts — output annotated docx with comments or tracked changes. Core: contract review (risk clauses, rights imbalance, vague wording, missing clauses); also general document review (grammar, logic, formatting). 批阅文档/合同 — 审阅任意文档并以批注或修订模式输出带标注的 docx。 核心场景：合同/协议审查（风险条款、权利义务、模糊表述、缺失条款）， 也支持通用文档审阅（语法、逻辑、格式）。 Trigger when: user asks to \"审阅\", \"批阅\", \"批注\", \"review\", \"审查合同\", \"review contract\", \"review agreement\", \"annotate document\", \"check contract\", \"合同审查\", \"文档批注\", or provides a document (.docx) for review.","compatibility":"Requires Python 3.8+ and python-docx (`pip install python-docx`). Cross-platform: macOS, Windows, Linux."},"skills_sh_url":"https://skills.sh/lovstudio/skills/review-doc"},"updatedAt":"2026-05-18T18:57:49.399Z"}}