redline
Skill0 starsChanged 32 days agoMITView on GitHub
Mark up a Word contract with genuine tracked changes and margin comments, making the minimum change each instruction needs while keeping the document's own formatting, numbering and defined terms. Includes a standard-library script that applies replace, insert, delete, comment, new-paragraph and delete-paragraph edits to a .docx as Word revisions by a named author, and prints the accepted text to check. Use for "mark up", "redline", "tracked changes", "send back our changes", "fix it" after a review or scenario test, or any edit to a contract the other side or the client will compare.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- dcbruck/claude-skillstheir own version, first seen Oct 20, 2026
- thatmike1/claude-skillstheir own version, first seen Oct 13, 2026
- ArchAstro/redlinetheir own version, first seen Aug 9, 2026
- canta2899/claude-redlinetheir own version, first seen Jul 13, 2026
- TGPSKI/redlinetheir own version, first seen Jun 30, 2026
- yiyaw-lab/agent-armortheir own version, first seen Jun 22, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- thatmike1/claude-skills★ 10same name
- ArchAstro/redline★ 4same name
- dcbruck/claude-skills★ 1same name
- TGPSKI/redline★ 1same name
- yiyaw-lab/agent-armor★ 1same name
- canta2899/claude-redline★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- adversarial-reviewSkill
- business-saleSkill
- business-setupSkill
- cite-checkSkill
- contract-reviewSkill
- disputesSkill
- doc-auditSkill
- draft-contractSkill
- employment-checkSkill
- fundraisingSkill
- ip-brandSkill
- jurisdiction-adaptSkill
- law-auSkill
- law-change-impactSkill
- law-nzSkill
- law-ukSkill
- law-usSkill
- lease-reviewSkill
- legal-adviceSkill
- legal-health-checkSkill
- legal-researchSkill
- marketing-complianceSkill
- nda-triageSkill
- privacy-complianceSkill
- scenario-testSkill
- sprintlaw-modeSkill
- website-complianceSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Every consequential change: If you change a defined term, a party name, a period or a clause number, find and fix every place it is used, …
- Very specific: line 29
Write edits.json as a list of operations.
- Distinctive: line 46
Prefer word-level edits. Replace a whole clause only when more than half of it changes.
- Very specific: line 60
Read the --show-accepted output end to end: does each changed sentence read correctly with the change accepted?
- Very specific: line 61
Run doc-audit on the output (it reads the accepted text) to catch broken cross-references or definitions.
- Distinctive: line 62
If LibreOffice is available, render to PDF and look at the changed pages to confirm the numbering and formatting held.
- Very specific: line 73
When the user says "fix it" (or "fix 1 and 3") after contract-review, scenario-test or adversarial-review: apply exactly those fixes as …
- Distinctive: line 79
If the input is a PDF, convert it first and warn that the conversion may have altered numbering or layout.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Redline
A mark-up is a negotiation document. The other side reads every change, so each one should be necessary, small, precisely placed and explained in words that persuade rather than lecture. Retyping a clause to change three words, reformatting paragraphs, or quietly fixing things nobody asked about all slow the deal and erode trust. Plain text pasted into an email is not a mark-up: deliver a .docx with real tracked changes.
Non-negotiables
- Minimum change (P12 in
sprintlaw-mode). Change only what the instruction requires, plus the consequential changes needed to keep the document consistent. - The document's own style. Its defined terms, capitalisation, numbering, spelling and voice, even where house style would differ.
- Every consequential change. If you change a defined term, a party name, a period or a clause number, find and fix every place it is used, including schedules and cross-references.
- Two audiences for comments. Comments the counterparty will see explain the change in neutral, persuasive terms. Internal notes for the client (risk, fallback, what we will concede) never go in the counterparty version.
- Never send it. Producing the file is fine; sending it to anyone needs an explicit yes (P14).
Step 1. Locate everything the instruction touches
Read the whole document. For each instruction, list every clause it affects: the operative clause, definitions, cross-references, schedules, survival and order-of-precedence clauses, execution blocks. Extract the text with numbering first if the file is .docx (for example render to PDF with LibreOffice and extract text, or run doc-audit, which reconstructs Word numbering), because clause numbers in plain text extractions are often missing.
Step 2. Write the edit list
Write edits.json as a list of operations. Make each find string long enough to be unique in the document, and copy it exactly from the document text.
[
{"op": "replace", "find": "within 60 days of the date of invoice", "replace": "within 14 days of the date of invoice",
"comment": "Shorter payment terms reflect the upfront costs of the Services."},
{"op": "insert", "after": "acting reasonably", "text": " and in good faith"},
{"op": "delete", "find": ", in its absolute discretion,", "comment": "Variations should require agreement."},
{"op": "comment", "find": "best endeavours", "comment": "Please confirm the standard intended. We suggest reasonable endeavours."},
{"op": "insert_paragraph", "after_paragraph": "The Supplier must maintain", "text": "The Supplier must notify the Customer within 48 hours of becoming aware of any Security Incident.",
"comment": "Adds a notification timeframe."},
{"op": "delete_paragraph", "paragraph": "The Customer must not engage any person", "comment": "Non-solicitation is not appropriate for this engagement."}
]Optional keys: "occurrence": 2 (the nth match across the document), "para_contains": "..." (only search paragraphs containing that text).
Prefer word-level edits. Replace a whole clause only when more than half of it changes.
Step 3. Apply
python3 scripts/redline.py IN.docx edits.json OUT.docx --author "<name>" --initials <XX> --show-acceptedThe script reports each operation as OK or FAIL with the reason. It never guesses: an edit whose text is not found, or that crosses a field, hyperlink or existing tracked change, is skipped. Fix the find string (or split the edit) and re-run on the original file.
New paragraphs copy the anchor paragraph's style and numbering, so insert after a sibling at the right level.
Step 4. Check
- Read the
--show-acceptedoutput end to end: does each changed sentence read correctly with the change accepted? - Run
doc-auditon the output (it reads the accepted text) to catch broken cross-references or definitions. - If LibreOffice is available, render to PDF and look at the changed pages to confirm the numbering and formatting held.
Step 5. Deliver
- The marked-up .docx (and a clean version with changes accepted, if useful).
- A numbered list of changes, each with clause number and a one-line reason.
- Anything you deliberately did not change, and why.
- Internal notes for the client separately from the document.
"Fix it" after a review or scenario test
When the user says "fix it" (or "fix 1 and 3") after contract-review, scenario-test or adversarial-review: apply exactly those fixes as tracked changes to the latest version, update affected cross-references, and say in two or three lines what changed and which issues or scenarios are now handled.
Limits
- The script handles text in ordinary runs, including inside existing insertions. It does not edit inside fields, content controls, text boxes, footnotes, headers or footers; make those edits by hand and say so.
- Tracked changes record what changed, not why. The comments carry the why.
- If the input is a PDF, convert it first and warn that the conversion may have altered numbering or layout; never return a "mark-up" of a PDF as if it were the original Word file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

