{"id":"f8a7ffb2-b8f1-4fb1-9da0-0bf99f4b198f","shortId":"kWpmYJ","kind":"skill","title":"legal-redline-tools","tagline":"Generate tracked-changes Word docs and redline PDFs from a contract review — the same deliverables lawyers actually send.","description":"# Contract Review & Redline Skill\n\nYou are a contract review assistant that analyzes legal agreements and produces structured redlines using legal-redline-tools.\n\n## Workflow\n\n1. **Read the contract** — Extract full text from the .docx\n2. **Analyze provisions** — Identify problematic terms, missing protections, and market departures\n3. **Generate redlines** — Output a JSON array of proposed changes\n4. **Produce deliverables** — Use legal-redline-tools to generate .docx with tracked changes, PDFs, and markdown\n\n## Redline JSON Format\n\nEach redline is a dict with these fields:\n\n### Required fields\n\n- `type`: One of `\"replace\"`, `\"delete\"`, `\"insert_after\"`, `\"add_section\"`\n- Type-specific:\n  - `replace`: `old` (text to find), `new` (replacement text)\n  - `delete`: `text` (text to remove)\n  - `insert_after`: `anchor` (text to insert after), `text` (new text)\n  - `add_section`: `text` (new section content), `after_section` (section reference to insert after), optionally `new_section_number`\n\n### Optional metadata fields\n\n- `section`: Contract section reference (e.g. \"7.2\", \"11.3(a)\")\n- `title`: Human-readable title (e.g. \"Liability Cap\", \"Change of Control\")\n- `tier`: Priority 1-3 (1=non-starter, 2=important, 3=desirable)\n- `rationale`: Why this change is proposed (internal only — never shown to counterparty)\n- `walkaway`: Fall-back position if counterparty rejects (internal only)\n- `precedent`: Market standard or comparable deal reference (internal only)\n\n## Analysis Framework\n\nWhen reviewing a contract, evaluate each provision against:\n\n### Risk Categories\n- **Liability** — caps, uncapped indemnities, consequential damages waivers\n- **Termination** — convenience clauses, cure periods, material breach definitions\n- **IP/Data** — ownership, licenses, data protection, audit rights\n- **Financial** — payment terms, fee changes, minimum commitments\n- **Dispute** — arbitration venue/rules, governing law, jury waiver\n- **Change of control** — assignment restrictions, M&A triggers\n- **Operational** — SLAs, force majeure, insurance requirements\n\n### Tier Classification\n- **Tier 1 (Non-Starters):** Issues that create unacceptable risk. The deal cannot proceed without these changes.\n- **Tier 2 (Important):** Significant issues that should be negotiated but aren't dealbreakers alone.\n- **Tier 3 (Desirable):** Improvements that strengthen position but can be conceded in trades.\n\n## Producing Output\n\nAfter generating the redlines JSON array, use the Python API:\n\n```python\nimport json\nfrom legal_redline import (\n    apply_redlines, render_redline_pdf, generate_summary_pdf,\n    generate_memo_pdf, generate_markdown, scan_document\n)\n\n# Load redlines\nredlines = [...]  # your generated redlines\n\n# 1. Tracked-changes .docx (for counterparty)\napply_redlines(\"original.docx\", \"redlined.docx\", redlines, author=\"Author Name\")\n\n# 2. Full-document redline PDF (for counterparty)\nrender_redline_pdf(\"original.docx\", redlines, \"redline.pdf\",\n                   header_text=\"Proposed Redlines\")\n\n# 3. Summary PDF — external (for counterparty, clean)\ngenerate_summary_pdf(redlines, \"summary.pdf\",\n                     doc_title=\"Agreement Title\",\n                     doc_parties=\"Party A / Party B\",\n                     mode=\"external\")\n\n# 4. Internal memo PDF (for your team only — includes tiers, rationale, walkaway)\ngenerate_memo_pdf(redlines, \"memo.pdf\",\n                  doc_title=\"Agreement Title\",\n                  doc_parties=\"Party A / Party B\")\n\n# 5. Markdown (for PRs, docs, or AI pipelines)\nmd = generate_markdown(redlines, doc_title=\"Agreement Title\", mode=\"internal\")\n```\n\n## Text Matching Rules\n\nThe `old`, `text`, and `anchor` fields must **exactly match** text in the document. Tips:\n\n- Copy text directly from the .docx — don't paraphrase\n- Include enough surrounding text to be unique (avoid matching the wrong instance)\n- Watch for smart quotes, em-dashes, and special characters in the document\n- If a passage spans formatting changes (bold to normal), the text still matches as plain text\n- Test with `scan_document()` first to find placeholders and verify text\n\n## Cross-Agreement Workflows\n\nWhen reviewing multiple related agreements:\n\n```python\nfrom legal_redline import compare_agreements, format_comparison_report, remap_redlines\n\n# Compare redlines across agreements for consistency\nresult = compare_agreements({\n    \"msa\": msa_redlines,\n    \"sow\": sow_redlines,\n    \"dpa\": dpa_redlines,\n})\nreport = format_comparison_report(result)\n\n# Remap redlines from one document version to another\nupdated, report = remap_redlines(\"old.docx\", \"new.docx\", redlines)\n```\n\n## Example Redline\n\n```json\n[\n    {\n        \"type\": \"replace\",\n        \"old\": \"aggregate liability shall not exceed twenty percent (20%) of the fees paid during the twelve (12) month period\",\n        \"new\": \"aggregate liability shall not exceed one hundred percent (100%) of the fees paid during the twelve (12) month period, or Two Hundred Fifty Thousand US Dollars ($250,000), whichever is greater\",\n        \"section\": \"11.3\",\n        \"title\": \"Liability Cap\",\n        \"tier\": 1,\n        \"rationale\": \"20% cap is well below market standard for B2B SaaS (typically 100% of fees or 12-month fees). Creates asymmetric risk allocation.\",\n        \"walkaway\": \"Accept 50% floor if counterparty insists, but push for $250K minimum.\",\n        \"precedent\": \"Industry standard is 100% of trailing 12-month fees.\"\n    },\n    {\n        \"type\": \"delete\",\n        \"text\": \"Company may terminate this Agreement immediately upon written notice if there is a material change in Partner's business\",\n        \"section\": \"13.5\",\n        \"title\": \"Delete Unilateral Termination\",\n        \"tier\": 1,\n        \"rationale\": \"Vague 'material change' standard allows arbitrary termination. M&A, fundraising, or pivots could all qualify.\"\n    },\n    {\n        \"type\": \"add_section\",\n        \"after_section\": \"Section 16.6\",\n        \"text\": \"BPA Precedence Guardrail. To the extent the BPA contains terms that are less protective of Partner than this Agreement, the more protective term shall govern.\",\n        \"new_section_number\": \"16.7\",\n        \"title\": \"BPA Precedence Guardrail\",\n        \"tier\": 2,\n        \"rationale\": \"BPA 'takes precedence' over tri-party per Section 5 references. This ensures key protections aren't overridden.\"\n    }\n]\n```","tags":["legal","redline","tools","evolsb","agent-skills","agent-tools","ai-tools","claude","contract-analysis","contract-review","docx","legal-ai"],"capabilities":["skill","source-evolsb","skill-legal-redline-tools","topic-agent-skills","topic-agent-tools","topic-ai-tools","topic-claude","topic-contract-analysis","topic-contract-review","topic-docx","topic-legal","topic-legal-ai","topic-legal-tech","topic-pdf","topic-pdf-generation"],"categories":["legal-redline-tools"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/evolsb/legal-redline-tools","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add evolsb/legal-redline-tools","source_repo":"https://github.com/evolsb/legal-redline-tools","install_from":"skills.sh"}},"qualityScore":"0.459","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 18 github stars · SKILL.md body (6,334 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-04-22T19:06:23.505Z","embedding":null,"createdAt":"2026-04-19T00:39:57.841Z","updatedAt":"2026-04-22T19:06:23.505Z","lastSeenAt":"2026-04-22T19:06:23.505Z","tsv":"'-3':186 '000':665 '1':48,185,187,291,374,675,750 '100':646,688,715 '11.3':170,670 '12':634,654,692,718 '13.5':744 '16.6':773 '16.7':803 '2':58,191,308,389,809 '20':626,677 '250':664 '250k':709 '3':69,193,322,407 '4':79,431 '5':458,820 '50':701 '7.2':169 'accept':700 'across':577 'actual':22 'add':116,144,768 'aggreg':619,638 'agreement':37,421,450,472,556,562,569,578,583,728,793 'ai':464 'alloc':698 'allow':756 'alon':320 'analysi':226 'analyz':35,59 'anchor':136,483 'anoth':605 'api':345 'appli':353,381 'arbitr':268 'arbitrari':757 'aren':317,826 'array':75,341 'assign':277 'assist':33 'asymmetr':696 'audit':258 'author':386,387 'avoid':509 'b':428,457 'b2b':685 'back':210 'bold':533 'bpa':775,782,805,811 'breach':251 'busi':742 'cannot':302 'cap':179,239,673,678 'categori':237 'chang':8,78,92,180,198,264,274,306,377,532,738,754 'charact':523 'classif':289 'claus':247 'clean':413 'commit':266 'compani':724 'compar':221,568,575,582 'comparison':571,595 'conced':331 'consequenti':242 'consist':580 'contain':783 'content':149 'contract':16,24,31,51,165,231 'control':182,276 'conveni':246 'copi':493 'could':764 'counterparti':206,213,380,396,412,704 'creat':297,695 'cross':555 'cross-agr':554 'cure':248 'damag':243 'dash':520 'data':256 'deal':222,301 'dealbreak':319 'definit':252 'delet':113,129,722,746 'deliver':20,81 'departur':68 'desir':194,323 'dict':103 'direct':495 'disput':267 'doc':10,419,423,448,452,462,470 'document':367,392,491,526,546,602 'docx':57,89,378,498 'dollar':663 'dpa':590,591 'e.g':168,177 'em':519 'em-dash':518 'enough':503 'ensur':823 'evalu':232 'exact':486 'exampl':613 'exceed':623,642 'extent':780 'extern':410,430 'extract':52 'fall':209 'fall-back':208 'fee':263,629,649,690,694,720 'field':106,108,163,484 'fifti':660 'financi':260 'find':125,549 'first':547 'floor':702 'forc':284 'format':98,531,570,594 'framework':227 'full':53,391 'full-docu':390 'fundrais':761 'generat':5,70,88,337,358,361,364,372,414,443,467 'govern':270,799 'greater':668 'guardrail':777,807 'header':403 'human':174 'human-read':173 'hundr':644,659 'identifi':61 'immedi':729 'import':192,309,347,352,567 'improv':324 'includ':439,502 'indemn':241 'industri':712 'insert':114,134,139,155 'insist':705 'instanc':513 'insur':286 'intern':201,215,224,432,475 'ip/data':253 'issu':295,311 'json':74,97,340,348,615 'juri':272 'key':824 'law':271 'lawyer':21 'legal':2,36,44,84,350,565 'legal-redline-tool':1,43,83 'less':787 'liabil':178,238,620,639,672 'licens':255 'load':368 'm':279,759 'majeur':285 'markdown':95,365,459,468 'market':67,218,682 'match':477,487,510,539 'materi':250,737,753 'may':725 'md':466 'memo':362,433,444 'memo.pdf':447 'metadata':162 'minimum':265,710 'miss':64 'mode':429,474 'month':635,655,693,719 'msa':584,585 'multipl':560 'must':485 'name':388 'negoti':315 'never':203 'new':126,142,147,158,637,800 'new.docx':611 'non':189,293 'non-start':188,292 'normal':535 'notic':732 'number':160,802 'old':122,480,618 'old.docx':610 'one':110,601,643 'oper':282 'option':157,161 'original.docx':383,400 'output':72,335 'overridden':828 'ownership':254 'paid':630,650 'paraphras':501 'parti':424,425,427,453,454,456,817 'partner':740,790 'passag':529 'payment':261 'pdf':357,360,363,394,399,409,416,434,445 'pdfs':13,93 'per':818 'percent':625,645 'period':249,636,656 'pipelin':465 'pivot':763 'placehold':550 'plain':541 'posit':211,327 'preced':217,711,776,806,813 'prioriti':184 'problemat':62 'proceed':303 'produc':39,80,334 'propos':77,200,405 'protect':65,257,788,796,825 'provis':60,234 'prs':461 'push':707 'python':344,346,563 'qualifi':766 'quot':517 'rational':195,441,676,751,810 'read':49 'readabl':175 'redlin':3,12,26,41,45,71,85,96,100,339,351,354,356,369,370,373,382,385,393,398,401,406,417,446,469,566,574,576,586,589,592,599,609,612,614 'redline.pdf':402 'redlined.docx':384 'refer':153,167,223,821 'reject':214 'relat':561 'remap':573,598,608 'remov':133 'render':355,397 'replac':112,121,127,617 'report':572,593,596,607 'requir':107,287 'restrict':278 'result':581,597 'review':17,25,32,229,559 'right':259 'risk':236,299,697 'rule':478 'saa':686 'scan':366,545 'section':117,145,148,151,152,159,164,166,669,743,769,771,772,801,819 'send':23 'shall':621,640,798 'shown':204 'signific':310 'skill':27 'skill-legal-redline-tools' 'slas':283 'smart':516 'source-evolsb' 'sow':587,588 'span':530 'special':522 'specif':120 'standard':219,683,713,755 'starter':190,294 'still':538 'strengthen':326 'structur':40 'summari':359,408,415 'summary.pdf':418 'surround':504 'take':812 'team':437 'term':63,262,784,797 'termin':245,726,748,758 'test':543 'text':54,123,128,130,131,137,141,143,146,404,476,481,488,494,505,537,542,553,723,774 'thousand':661 'tier':183,288,290,307,321,440,674,749,808 'tip':492 'titl':172,176,420,422,449,451,471,473,671,745,804 'tool':4,46,86 'topic-agent-skills' 'topic-agent-tools' 'topic-ai-tools' 'topic-claude' 'topic-contract-analysis' 'topic-contract-review' 'topic-docx' 'topic-legal' 'topic-legal-ai' 'topic-legal-tech' 'topic-pdf' 'topic-pdf-generation' 'track':7,91,376 'tracked-chang':6,375 'trade':333 'trail':717 'tri':816 'tri-parti':815 'trigger':281 'twelv':633,653 'twenti':624 'two':658 'type':109,119,616,721,767 'type-specif':118 'typic':687 'unaccept':298 'uncap':240 'unilater':747 'uniqu':508 'updat':606 'upon':730 'us':662 'use':42,82,342 'vagu':752 'venue/rules':269 'verifi':552 'version':603 'waiver':244,273 'walkaway':207,442,699 'watch':514 'well':680 'whichev':666 'without':304 'word':9 'workflow':47,557 'written':731 'wrong':512","prices":[{"id":"c8eaed3c-6b1c-4a14-b957-eb260c5202cb","listingId":"f8a7ffb2-b8f1-4fb1-9da0-0bf99f4b198f","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"evolsb","category":"legal-redline-tools","install_from":"skills.sh"},"createdAt":"2026-04-19T00:39:57.841Z"}],"sources":[{"listingId":"f8a7ffb2-b8f1-4fb1-9da0-0bf99f4b198f","source":"github","sourceId":"evolsb/legal-redline-tools","sourceUrl":"https://github.com/evolsb/legal-redline-tools","isPrimary":false,"firstSeenAt":"2026-04-19T00:39:57.841Z","lastSeenAt":"2026-04-22T19:06:23.505Z"}],"details":{"listingId":"f8a7ffb2-b8f1-4fb1-9da0-0bf99f4b198f","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"evolsb","slug":"legal-redline-tools","github":{"repo":"evolsb/legal-redline-tools","stars":18,"topics":["agent-skills","agent-tools","ai-tools","claude","contract-analysis","contract-review","docx","legal","legal-ai","legal-tech","pdf","pdf-generation","python","python-docx","redline","redlines","tracked-changes","word"],"license":"mit","html_url":"https://github.com/evolsb/legal-redline-tools","pushed_at":"2026-03-10T19:36:14Z","description":"Generate tracked-changes Word docs and redline PDFs from a contract review — the same deliverables lawyers actually send.","skill_md_sha":"29b971fab264528345d16ef7fbcdc0ccb35d776d","skill_md_path":"skill.md","default_branch":"main","skill_tree_url":"https://github.com/evolsb/legal-redline-tools"},"layout":"root","source":"github","category":"legal-redline-tools","frontmatter":{},"skills_sh_url":"https://skills.sh/evolsb/legal-redline-tools"},"updatedAt":"2026-04-22T19:06:23.505Z"}}