mcpbeat Sign in

Redlining Content Agent Skill

Use when the user asks to redline, track changes, or compare differences in a file. Compares an uploaded .docx or .pdf against a provided .dotx/.docx template and returns a redlined .docx where every textual difference is a Word tracked change (insertion/deletion) authored by "Copilot Studio AI". No visual conversion — built directly on the template.

20k tokens
context cost
the whole folder, loaded on every use
6
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
64 d ago
last touched
this folder, not the whole repository

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/cat-agent-skills --skill redlining-content

What comes with it

77 215 bytes besides the instruction
assets/template.docx
metadata.json
references/docx-submissions.md
references/pdf-submissions.md
scripts/redline.py

The instruction itself

7 sections, as written by the author

Redlining Content Skill

Reimplements "Word Compare" for the new Copilot Studio orchestrator. The

template is already a perfect Word document, so the output is the template

body with revisions injected as OOXML <w:ins> / <w:del> elements. Accepting

all changes yields the submission's wording; rejecting all keeps the template.

Changes are authored by Copilot Studio AI and the output has Track

Changes turned on so Word keeps tracking any further human edits.

Requirements

  • lxml (always)
  • pdfplumber (PDF submissions; pypdfium2 used as a fallback)

All are present in the Copilot Studio sandbox — no pip install required.

.docx/.dotx handling is pure lxml + standard library.

Inputs

  • Template — the canonical baseline. Bundled with this skill in

assets/ (any single .dotx/.docx file — the name doesn't matter) and

used automatically. A different template (.dotx or .docx) may be

supplied explicitly to override it.

  • Submission — the user-uploaded file to compare against the template,

either a .docx or a .pdf.

Steps

  • Run from this skill's directory:

python scripts/redline.py <submission.docx|.pdf> [output.docx]

The bundled template in assets/ is auto-discovered and used as the

baseline (whatever its file name).

To override the template explicitly, pass it via --template:

python scripts/redline.py --template <template.dotx|.docx> <submission.docx|.pdf> [output.docx]

  • Return the output .docx to the user. Output defaults to the submission

name with a _redlined.docx suffix.

How it works

One shared engine, two input readers — the only thing that differs by file

type is how the submission's words are read:

  • .docx / .dotxread_docx_words() (paragraph text from

word/document.xml).

  • .pdfread_pdf_words() (text extraction only — never converted to

DOCX; uses pdfplumber, then pypdfium2).

Both produce a single flat word list fed into the same pipeline:

  • Word-level diff over the whole document. The template's words and the

submission's words are each flattened into one stream and compared once with

difflib.SequenceMatcher. PDF line-wrapping and paragraph boundaries are

therefore irrelevant — only real word differences matter.

  • Each template word is mapped back to its source paragraph. Paragraphs with no

changes are kept byte-for-byte (all formatting preserved); only changed

paragraphs are rebuilt, with differing words wrapped in <w:ins> / <w:del>.

  • Tables. For .docx submissions, template tables are diffed against the

submission's tables cell by cell (aligned by position: table → row →

cell), with <w:ins> / <w:del> injected directly into each cell while its

<w:tcPr> (width, borders, shading) is preserved. For .pdf submissions

there is no table structure to align, so template tables pass through

untouched and their words are stripped from the extracted text so they aren't

flagged as insertions.

  • Writes the output zip: replaces word/document.xml, adds <w:trackChanges/>

to settings.xml, and converts the .dotx main-part content type to the

.docx one so the result opens as a normal document.

Per-input guidance

See the focused reference docs:

  • references/docx-submissions.md.docx handling, high-fidelity path.
  • references/pdf-submissions.md.pdf handling, why text is extracted (not

converted), the word-level diff, and table handling.

v1 limitations

  • Inside a *changed* paragraph, intra-run character formatting (bold/italic

on individual words) is simplified to the paragraph's base formatting.

Unchanged paragraphs keep all formatting exactly.

  • Tables: .docx table cells are diffed and redlined (aligned by position);

cells are matched by position, so inserted/deleted rows or columns and nested

tables are not tracked, and multiple paragraphs in one cell collapse to one.

.pdf tables are not diffed (passed through unchanged).

  • A brand-new paragraph in the submission is tracked as inserted words at

the nearest template position; a hard paragraph break may not be recreated.

  • Matching is by visible text; curly quotes/apostrophes are compared literally.

Other skills for the same job

different authors, same section of the catalogue
DOCX
by anthropics
vendor ×16

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

7k tokens
PDF
by anthropics
vendor ×16

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

13k tokens scripts
PPTX
by JayZeeDesign
×15

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

308k tokens scripts
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
PDF
by anthropics
vendor ×10

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

15k tokens scripts
DOCX
by w95
×6

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

5k tokens
PPTX
by w95
×4

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.

2k tokens
Obsidian Markdown
by ZhanlinCui
×3

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

3k tokens

How to use it

Copy the folder

Take microsoft/redlining-content from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip. Without those the skill loads but fails at the first command.