microsoft/doc-format-converter
>- Use this skill whenever the user asks to convert a document or file from one format to another — Markdown, HTML, PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), CSV, or plain text (e.g. "turn this Word doc into a PDF", "make slides from this markdown", "save this page as markdown"). Only for producing a converted file as a deliverable. Do NOT use this skill to answer questions about a document's content — the analyzing-* skills handle that. Run the bundled scripts/convert.py instead of writing ad-hoc conversion code, BEFORE attempting any conversion yourself.
npx skills add https://github.com/microsoft/cat-agent-skills --skill doc-format-converter
Convert documents between formats using the bundled scripts/convert.py. It
works fully offline with libraries already present in the sandbox
(markitdown, mammoth, markdownify, reportlab, python-docx, python-pptx,
pdfplumber, beautifulsoup4, magika) and routes each conversion through the
highest-fidelity pipeline available.
This skill produces files; the built-in analyzing-* skills **answer
questions**. Route accordingly:
deck" → use analyzing-pdf / analyzing-xlsx / analyzing-pptx etc.,
not this skill. In particular, never use convert.py as a substitute
extraction path for PDF question-answering — analyzing-pdf owns that.
matching analyzing-* skill on the original file rather than answering
from this skill's intermediate output.
analyzing-* preprocessorhas already produced a converted.md for the source file, feed that to
convert.py as Markdown input (convert.py converted.md --to pptx)
instead of re-extracting the original — it is a high-quality extraction
with page markers and pipe tables.
md, html, pdf, docx, pptx, txt. Inputs additionally include
xlsx and csv.
typically /app/skills/doc-format-converter/ — so it works regardless of
the current working directory:
python /app/skills/doc-format-converter/scripts/convert.py INPUT --to FORMAT [-o OUTPUT]
It prints the output path on success. If -o is omitted, the output lands
next to the input with the new extension.
with the user:
python /app/skills/doc-format-converter/scripts/convert.py --batch DIR --to FORMAT [--out-dir DIR]
prints the full support matrix. Offer the nearest supported route (e.g.
PDF → slides is unsupported; offer PDF → Markdown, let the user edit, then
Markdown → PPTX).
(content sniffing via magika), tell the user; the converter proceeds using
the detected content type.
used (e.g. "docx → HTML via mammoth").
markitdown, then re-rendered. Some layout (columns, images, footnotes) is
simplified — say so when converting layout-heavy documents.
nothing. Run the analyzing-pdf preprocessor instead (its OCR pipeline is
the better extractor) and feed its text artifact into this skill's
renderers.
fonts, falling back to reportlab's built-in CID fonts), so Chinese,
Japanese, and Korean text renders correctly.
#/## heading with body content asbullets, overflowing onto continuation slides — it is an outline deck, not
finished design.
pdf → pptx and pptx → pdf/docx are deliberately unsupported: theextraction is too lossy to present as a finished conversion.
extraction returns nothing, report that instead of inventing text.
convert.py supports the pair; onlyfall back to custom code if the script fails, and say that you did.
references/test-cases.md with fixtures inassets/samples/ — use them when the user asks to validate the skill.
Take microsoft/doc-format-converter from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
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.