adeu-redlining
Skill175 starsChanged 9 days agoMITView on GitHub
Use this skill when reviewing, editing, redlining, or negotiating an existing Microsoft Word document (.docx) — including proposing edits as tracked changes, accepting or rejecting existing tracked changes, replying to comments, comparing two versions, sanitizing author metadata, or finalizing a contract for distribution. Use whenever the user mentions redlines, track changes, contract review, .docx editing, or a Word document they want changed, even if they don't name a specific tool. Do NOT use for creating a Word document from scratch with no source file — use the docx skill for that.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Read a contract intelligently, including its defined terms and cross-references
- Very specific: line 26
If the user wants a fresh Word document built from nothing, defer to the docx skill instead.
- Very specific: line 32
MCP tools available: If you see Adeu MCP tools in the session (read_docx, process_document_batch, accept_all_changes, diff_docx_files, …
- Distinctive: line 40
Do not present these as options to the user mid-task.
- Distinctive: line 44
Every redlining task follows the same tight loop:
- Very specific: line 47
Triage / review existing redlines & comments: call read_docx(file_path=..., mode="changes") to get the compact ledger of every Chg:N and …
- Very specific: line 48
Locate specific clauses or terms: call read_docx(file_path=..., search_query="...", search_case_sensitive=false) (or search_regex=true with …
- Very specific: line 49
Navigate structure or read sections: call read_docx(file_path=..., mode="outline"), then read bounded page windows (page=1 or page="1-8", …
- Very specific: line 52
Sub-clause surgical edits: keep target_text to the shortest unique phrase (5–20 words around the changed words) rather than replacing …
- Very specific: line 55
Manual / inline formatting mode: when the user asks for strikethrough deletions and underlined insertions instead of Word Track Changes, …
- Very specific: line 64
Batches apply sequentially: If edit 1 renames X → Y, a later edit in the same batch touching that span must target Y, not the original X.
- Very specific: line 66
Plain replacement text in
new_text: Never write {++, {--, {>>, or {== into new_text. - Distinctive: line 97
Do not load these during normal MCP tasks.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adeu — Tracked-Changes Redlining for .docx
Adeu is a Virtual DOM for Word documents. It translates .docx into LLM-friendly Markdown with CriticMarkup for tracked changes, lets you propose edits as native Word w:ins/w:del revisions, and writes the result back without destroying formatting, comments, or document structure.
When to use this skill
The user is working with an existing .docx and wants you to:
- Propose edits that show up as Word Track Changes
- Accept, reject, or reply to existing tracked changes and comments
- Compare two versions of a document
- Strip author metadata and lock a document for distribution
- Read a contract intelligently, including its defined terms and cross-references
If the user wants a fresh Word document built from nothing, defer to the docx skill instead.
Execution path — pick once, then forget
Adeu runs in two modes. Pick the first that applies and stop:
- MCP tools available. If you see Adeu MCP tools in the session (
read_docx,process_document_batch,accept_all_changes,diff_docx_files,finalize_document), use them directly. This file contains everything needed for standard MCP operations; only loadreferences/mcp-tools.mdwhen you need edge-case parameter details. - Bash available, no MCP tools. Shell out to the Python CLI:
uvx adeu <subcommand>. This is the only CLI Adeu ships — there is no Node CLI. Loadreferences/cli-fallback.mdfor the command surface and the JSON shapeadeu applyexpects. - Neither available. Tell the user. Suggested install lines, in this order:
- Claude Code plugin (covers everything):
/plugin marketplace add dealfluence/adeuthen/plugin install adeu-redlining@adeu-skills - Node MCP server (recommended for most users, zero Python required):
npx -y @adeu/mcp-server - Python MCP server (required for Live MS Word integration on Windows, and for
protection_mode="encrypt"onfinalize_document):uvx --from "adeu[mcp]" adeu-server - Python CLI only (for scripted/headless pipelines):
uv tool install adeu
- Claude Code plugin (covers everything):
Do not present these as options to the user mid-task. Pick the available path and proceed.
Core workflow
Every redlining task follows the same tight loop:
- Read targeted slices first. Choose the fastest
read_docxmode for the task instead ofpage="all":- Triage / review existing redlines & comments: call
read_docx(file_path=..., mode="changes")to get the compact ledger of everyChg:NandCom:Nwith author, page, and snippet in one call. - Locate specific clauses or terms: call
read_docx(file_path=..., search_query="...", search_case_sensitive=false)(orsearch_regex=truewith alternation like"indemnif|liabilit|terminat"). - Navigate structure or read sections: call
read_docx(file_path=..., mode="outline"), then read bounded page windows (page=1orpage="1-8", continuing withpage="9-16"when the footer indicates more pages). - Compare two
.docxfiles into a redline: the whole task is one call,diff_docx_files(original_path=..., modified_path=..., output_path=..., author_name=...). It writes every difference as native tracked changes, all or nothing, and refuses anoutput_paththat names either input. A compare redline always comes from this call (oradeu diff v1 v2 -o out.docxon the CLI); a hand-builtprocess_document_batchloses changes the diff engine catches.
- Triage / review existing redlines & comments: call
- Apply all changes in one batch. Send every edit and review action in a single
process_document_batchcall (or oneadeu applyinvocation).- Sub-clause surgical edits: keep
target_textto the shortest unique phrase (5–20 words around the changed words) rather than replacing entire multi-sentence paragraphs. - Sequential evaluation: each edit in
changesevaluates against the document state produced by preceding edits in the same batch. - Output path: pass
output_pathexplicitly when requested. Whenoutput_pathis omitted, files ending in_processed,_redlined,.redline,-redline,_markup, or.markedupdate in place; other files save to<stem>_processed.docx. - Manual / inline formatting mode: when the user asks for strikethrough deletions and underlined insertions instead of Word Track Changes, pass
markup_mode="manual"onprocess_document_batch(or--manualonadeu apply). This mode produces the markup and its margin comments natively; it replaces scripting python-docx, which breaks the package. - Word-level redlines on commented edits: pass
commented_change_granularity="word"onprocess_document_batch(or--commented-change-granularity wordonadeu apply) when minimal word-level Track Changes are preferred on commentedmodifyedits (wrapped by one spanning comment).
- Sub-clause surgical edits: keep
- Finish from the batch receipt.
process_document_batchreturns per-edit*Preview (CriticMarkup):*, minted**IDs:**(Chg:N,Com:N),**Part:**when an edit landed in a header, footer or notes,Applied Actions, andDocument State(remaining tracked changes and comments). Treat a clean batch receipt as final verification — skip any extra post-batchread_docxcall unless you need to inspect surrounding prose not shown in the receipt.
The MCP tool salvages by default (partial=true): valid edits apply, and the response LEADS with PARTIAL: applied K of N listing each failed edit with its diagnostics and nearest-match candidates. Fix only those and send them as a follow-up batch. Pass partial=false when a half-applied batch would be worse than none (dependent edits, a negotiated package). The CLI adeu apply is the reverse: all-or-nothing unless you pass --partial.
Critical gotchas
- IDs are session-bound. Change IDs (
Chg:12) and comment IDs (Com:5) come fromread_docx(e.g.mode="changes") or from the**IDs:**line of the immediately precedingprocess_document_batchreceipt. Never guess IDs. - Batches apply sequentially. If edit 1 renames
X → Y, a later edit in the same batch touching that span must targetY, not the originalX. target_textmust be unique by default.match_mode: "strict"(default) requires a single match. Add 3–8 words of surrounding context to disambiguate, or setmatch_mode: "first"or"all". Setregex: truefor regex matching; capture groups expand via$1,$2(or\1,\2) innew_text.- Plain replacement text in
new_text. Never write{++,{--,{>>, or{==intonew_text. Use thecommentfield on the edit to attach a margin comment (a string, or a list[{"text": "...", "author": "..."}]to attach multiple comments with optional per-comment authors). new_textMarkdown dialect. Supports headings (#through######),**bold**,_italic_(underscores only),\n\nfor paragraph breaks, and Markdown pipe tables (| Col 1 | Col 2 |\n|---|---|\n| A | B |) to insert native Word tables. Empty string""deletestarget_text; omittingnew_textwithcommentannotates without changing text. Empty table cells emit{#cell:<id>}— pass that token astarget_textto fill one.- Restructure whole paragraphs. To split, merge, or reorder paragraphs, target the complete paragraph(s) and give the complete new paragraphs in
new_text. A\n\ninserted into the middle of an existing paragraph becomes a tracked paragraph mark, which many reviewers and redline readers display as an untracked edit. - The top of page 1 may be the page header. Headers and footers repeat on every page, so headings and tables cannot be added there (the batch refuses and names the first body paragraph to use instead). Anchor document-top insertions such as an executive summary on the first body paragraph shown by
mode="outline", withmatch_mode="first"if that text recurs. - Read-only appendix & structural markers. Anything inside
<!-- READONLY_BOUNDARY_START -->(defined terms, cross-reference targets, diagnostic summaries) is read-only projection metadata. Plain-texttarget_textin the body resolves automatically across hyperlinks ([text](url)), cross-references ([~text~](#_Ref...)), and bookmarks ({#_BookmarkName}), preserving them when kept intact. clean_viewtoggles the projected state.clean_view=false(default) projects raw text with pending tracked changes as CriticMarkup;clean_view=trueprojects the accepted state. Note thatprocess_document_batchmatchestarget_textagainst the clean/accepted state so you can edit cleanly across existing changes.- Page indexing.
page="1-8"reads up to 8 pages at a time; check theContinues on page X of Yfooter to see if more pages follow.pagealso accepts a page or range (page=4orpage="4-5") alongsidesearch_query.
Edit types — complete schema reference
Pass changes as a list of objects to process_document_batch(original_docx_path, author_name, changes, output_path?, partial?, markup_mode?, commented_change_granularity?):
type | Purpose | Fields |
modify | Search-and-replace as a tracked change | target_text (req), new_text (req unless comment set; "" deletes), comment? (str | [{text, author?}]), match_mode? ("strict" | "first" | "all"), regex? (bool) |
accept | Finalize an existing tracked change by ID | target_id (req, e.g. "Chg:12"), comment?, part? ("body" | "header" | "footer" | "footnotes" | "endnotes" or "word/header1.xml") |
reject | Revert an existing tracked change by ID | target_id (req, e.g. "Chg:12"), comment?, part? |
reply | Reply to an existing comment thread | target_id (req, e.g. "Com:5"), text (req) |
set_field | Fill or toggle a content control (CC:N) | field (req, e.g. "CC:3" or tag/alias), value (req), match_mode?, comment? |
insert_row | Insert a table row above/below an anchor | target_text (req, cell text in anchor row), position ("above" | "below"), cells (string[] left-to-right), comment? |
delete_row | Delete a table row containing anchor text | target_text (req, cell text in row to delete), comment? |
Other MCP tools:
read_docx(file_path, mode="full"|"outline"|"changes"|"appendix"|"fields", page?, force?, search_query?, search_regex?, search_case_sensitive?, max_matches?, match_offset?, full_paragraph?, changes_author?, changes_offset?, fields_offset?, clean_view?)diff_docx_files(original_path, modified_path, compare_clean=true, output_path?, author_name?)— returns the text diff; withoutput_pathit also writes the redlined.docx(all or nothing, never over an input).apply_text_revision(file_path, revised_text, output_path?, author?, allow_major_deletions?)— rewrites a whole document from revised clean text into native tracked changes behind a clean-text verification gate.accept_all_changes(docx_path, output_path?, remove_comments=true)— accepts all tracked changes (remove_comments=falsekeeps comments).finalize_document(file_path, output_path?, sanitize_mode="full"|"keep-markup", accept_all?, protection_mode?, author?)
Reference loading (on demand only)
Do not load these during normal MCP tasks; consult them only when their specific trigger applies:
references/mcp-tools.md— consult only for content-control lock overrides (ignore_control_locks,ignore_document_protection,allow_untracked_writes) orfinalize_documentencryption details.references/cli-fallback.md— load only when MCP tools are absent and you must useuvx adeuvia Bash.references/criticmarkup.md— load only when interpreting unusual projection markers ([^fn-3],{#_BookmarkName},[~text~](#_Ref...)).
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.

