一键导入
claude-review
Agentic contract review using superdoc-redlines. Spawns parallel sub-agents for comprehensive document review with tracked changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Agentic contract review using superdoc-redlines. Spawns parallel sub-agents for comprehensive document review with tracked changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | claude-review |
| description | Agentic contract review using superdoc-redlines. Spawns parallel sub-agents for comprehensive document review with tracked changes. |
| allowed-tools | ["Read","Write","Edit","Grep","Glob","Bash","Task"] |
Agentic contract review skill that uses the superdoc-redlines library to review and amend legal documents with tracked changes. For large documents (>50K tokens), spawns parallel sub-agents for comprehensive coverage.
/claude-review [--single-agent|--multi-agent] <document> <instructions>
Arguments:
--single-agent (optional) - Force single-agent workflow regardless of document size--multi-agent (optional) - Force multi-agent workflow regardless of document size<document> - Path to the DOCX file to review<instructions> - Review instructions (e.g., "Convert from UK to Singapore jurisdiction")Examples:
/claude-review contract.docx Convert from UK to Singapore law
/claude-review --multi-agent contract.docx Convert from UK to Singapore law
/claude-review --single-agent large-contract.docx Review warranties only
/claude-review ./contracts/bta.docx Review warranties and update statutory references
/claude-review "Business Transfer Agreement.docx" Adapt for Singapore jurisdiction, update all UK statutes
This skill reads $ARGUMENTS for the document path and instructions.
Parse arguments as follows:
--single-agent or --multi-agent (if present, remove from arguments)If arguments are missing, prompt the user for:
Workflow Override:
--single-agent or --multi-agent, that workflow MUST be usedPriority 1 - User Override (if specified):
--single-agent flag: Use single-agent workflow--multi-agent flag: Use multi-agent workflowPriority 2 - Automatic Selection (if no flag): Based on document size, choose the appropriate workflow:
| Document Size | Workflow | Reason |
|---|---|---|
| < 50K tokens | Single-agent | Direct review per CONTRACT-REVIEW-SKILL.md |
| >= 50K tokens | Multi-agent | Orchestrator + sub-agents per CONTRACT-REVIEW-AGENTIC-SKILL.md |
CRITICAL: User-specified workflow flags override automatic selection.
cd /home/tyc/ross-ide-contract/superdoc-redlines
node superdoc-redline.mjs read --input "<document>" --stats-only
Verify the document exists and get statistics:
blockCount - Number of blocksestimatedTokens - Token estimaterecommendedChunks - Suggested chunk countnode superdoc-redline.mjs extract --input "<document>" --output "<document>-ir.json"
This creates the block ID mapping needed for edits.
CRITICAL: If user specified --single-agent or --multi-agent flag, use that workflow regardless of document size.
Otherwise, use automatic selection:
If estimatedTokens < 50,000: Use single-agent workflow
<document>-edits.jsonIf estimatedTokens >= 50,000: Use multi-agent workflow
merged-edits.jsonRead all chunks to build the Context Document:
# Read each chunk until hasMore: false
node superdoc-redline.mjs read --input "<document>" --chunk 0 --max-tokens 10000
node superdoc-redline.mjs read --input "<document>" --chunk 1 --max-tokens 10000
# ... continue
Build Context Document with:
Process each chunk with full Context Document, drafting exact amendments.
Task({
subagent_type: "general-purpose",
description: "Review [section] blocks b[start]-b[end]",
prompt: "[Sub-agent prompt with Context Document and block range]"
})
edits-[section].jsonnode superdoc-redline.mjs merge \
edits-*.json \
-o merged-edits.json \
-c combine \
-v "<document>"
# Validate
node superdoc-redline.mjs validate --input "<document>" --edits "<edits-file>"
# Apply with track changes
node superdoc-redline.mjs apply \
--input "<document>" \
--output "<document>-amended.docx" \
--edits "<edits-file>" \
--author-name "AI Legal Counsel"
Report to user:
The detailed methodology is documented in:
superdoc-redlines/CONTRACT-REVIEW-SKILL.mdsuperdoc-redlines/CONTRACT-REVIEW-AGENTIC-SKILL.mdsuperdoc-redlines/README.mdsuperdoc-redlines/SKILL.mdWhen spawning sub-agents for multi-agent workflow, use this template:
You are a contract review sub-agent. Review your assigned section and produce an edits JSON file.
## Assignment
- Block Range: b[START] to b[END]
- Section: [SECTION_NAME]
- Output: edits-[section].json
## Review Instructions
[USER_INSTRUCTIONS]
## Context Document
[FULL_CONTEXT_DOCUMENT]
## Procedure
1. Read your assigned chunks:
```bash
cd /home/tyc/ross-ide-contract/superdoc-redlines
node superdoc-redline.mjs read --input "[DOCUMENT]" --chunk [N] --max-tokens 10000
For each block in your range, assess amendments needed based on:
Draft EXACT replacement text (not vague directions)
Create edits file:
{
"version": "0.2.0",
"agent": "[AGENT_ID]",
"blockRange": { "start": "b[START]", "end": "b[END]" },
"edits": [...]
}
Save to: edits-[section].json
## Working Directory
All commands should be run from:
/home/tyc/ross-ide-contract/superdoc-redlines
## Output Files
| File | Purpose |
|------|---------|
| `<document>-ir.json` | Extracted document structure with block IDs |
| `<document>-context.md` | Context Document (for multi-agent) |
| `edits-*.json` | Edit files from each agent |
| `merged-edits.json` | Combined edits (multi-agent only) |
| `<document>-amended.docx` | Final output with tracked changes |
## Error Handling
- If document doesn't exist: Report error, ask for correct path
- If sub-agent fails: Re-spawn for remaining blocks or process directly
- If merge conflicts: Review and resolve, re-merge with appropriate strategy
- If validation fails: Identify and fix problematic edits, re-validate