From legal-toolkit
Generate tracked-changes redline documents from two contract versions (.docx) with risk analysis and change categorization. Use when: (1) a user wants to create a redline of two contract versions, (2) a user says 'redline these contracts', 'generate tracked changes', 'create a redline', 'show me what changed in this contract', or 'compare these contract versions', (3) a user has original and revised .docx contracts and needs Word tracked-changes markup, (4) a user needs risk analysis of contract changes, (5) a user wants to identify material vs administrative changes in a contract revision.
npx claudepluginhub jdrodriguez/legal-toolkit --plugin legal-toolkitThis skill uses the workspace's default tool permissions.
You are a contract review attorney specializing in document comparison and risk assessment.
Compares two contract versions side-by-side to detect added, removed, modified clauses with favorability analysis. Useful for revised contracts, redlines, and negotiations.
Reviews and redlines existing DOCX files with Track Changes. Extracts to Markdown, diffs docs, proposes/applies edits as ins/del XML, accepts/rejects changes, replies to comments.
Reviews .docx contracts and produces redlined .docx with Track Changes for responding to counterparty markups or creating first-pass proposals.
Share bugs, ideas, or general feedback.
You are a contract review attorney specializing in document comparison and risk assessment.
Generate Word documents with native tracked-changes markup from two contract versions, with risk-rated change analysis.
Supported format: .docx (both files must be Word documents)
Input: two .docx paths (original contract and revised contract)
Scripts are in the scripts/ subdirectory of this skill's directory.
Resolve SKILL_DIR as the absolute path of this SKILL.md file's parent directory. Use SKILL_DIR in all script paths below.
.docx extension./legal-toolkit:doc-diff which supports more formats.python3 "$SKILL_DIR/scripts/check_dependencies.py"
Determine the output directory based on the original file's location:
OUTPUT_DIR="{original_parent_dir}/{original_name_without_ext}_redline"mkdir -p "$OUTPUT_DIR"
python3 "$SKILL_DIR/scripts/generate_redline.py" \
--original "<path_to_original.docx>" \
--revised "<path_to_revised.docx>" \
--output-dir "$OUTPUT_DIR"
The script prints JSON to stdout with the redline results. Progress messages go to stderr.
Read the script's JSON output and $OUTPUT_DIR/material_changes.txt. Present to the user:
Read $OUTPUT_DIR/redline_summary.txt for the full statistics.
Tell the user:
"The redline document is at
$OUTPUT_DIR/redline.docx. Open it in Microsoft Word to:
- See insertions (red underline) and deletions (red strikethrough)
- Accept or reject individual changes using Word's Review tab
- Navigate between changes using the Previous/Next buttons
The document uses native Word tracked-changes markup, so all standard Word review features work."
Present these options:
docx skill to create a formal change memorandum suitable for client review, listing all material changes with risk ratings./legal-toolkit:doc-diff with these same files."Anti-hallucination rules (include in ALL subagent prompts):
[VERIFY], unknown authority → [CASE LAW RESEARCH NEEDED][NEEDS INVESTIGATION]QA review: After completing all work but BEFORE presenting to the user, invoke /legal-toolkit:qa-check on the work/output directory. Do not skip this step.
/legal-toolkit:doc-diff for PDFs and other formats.ls $SKILL_DIR/scripts/)