mcpbeat Sign in

Doc Format Converter Agent Skill

>- 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.

1.2k tokens
context cost
SKILL.md, read when the skill is used
12
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
109 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 doc-format-converter

What comes with it

117 722 bytes besides the instruction
assets/samples/sample.csv
assets/samples/sample.docx
assets/samples/sample.html
assets/samples/sample.md
assets/samples/sample.pptx
assets/samples/sample.xlsx
metadata.json
references/test-cases.md
scripts/blocks.py
scripts/convert.py
scripts/render.py

The instruction itself

4 sections, as written by the author

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.

Division of labor with the analyzing-* skills

This skill produces files; the built-in analyzing-* skills **answer

questions**. Route accordingly:

  • "What does this PDF say?", "find X in this workbook", "summarize this

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.

  • "Give me this as a PDF/Word doc/slides/markdown file" → this skill.
  • If the user asks content questions *after* a conversion, hand off to the

matching analyzing-* skill on the original file rather than answering

from this skill's intermediate output.

  • Reuse their artifacts when present. If an analyzing-* preprocessor

has 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.

Instructions

  • Identify the input file and the target format the user wants. Targets:

md, html, pdf, docx, pptx, txt. Inputs additionally include

xlsx and csv.

  • Run the converter by the script's path inside this skill's folder —

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.

  • For a folder of files, use batch mode and share the printed summary table

with the user:

   python /app/skills/doc-format-converter/scripts/convert.py --batch DIR --to FORMAT [--out-dir DIR]
  • If the script reports an unsupported conversion, relay its message — it

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).

  • If the script warns that a file's extension doesn't match its content

(content sniffing via magika), tell the user; the converter proceeds using

the detected content type.

  • Return the converted file to the user and briefly state which pipeline was

used (e.g. "docx → HTML via mammoth").

Conversion notes

  • Markdown is the universal intermediate: Office/PDF inputs are extracted with

markitdown, then re-rendered. Some layout (columns, images, footnotes) is

simplified — say so when converting layout-heavy documents.

  • For scanned/image PDFs, this skill's pdf → md route extracts little or

nothing. Run the analyzing-pdf preprocessor instead (its OCR pipeline is

the better extractor) and feed its text artifact into this skill's

renderers.

  • PDF output registers a CJK-capable font automatically (bundled Noto CJK

fonts, falling back to reportlab's built-in CID fonts), so Chinese,

Japanese, and Korean text renders correctly.

  • PPTX output builds one slide per #/## heading with body content as

bullets, overflowing onto continuation slides — it is an outline deck, not

finished design.

  • pdf → pptx and pptx → pdf/docx are deliberately unsupported: the

extraction is too lossy to present as a finished conversion.

Guardrails

  • Never fabricate or "fill in" content the source file does not contain; if

extraction returns nothing, report that instead of inventing text.

  • Do not hand-write conversion code when convert.py supports the pair; only

fall back to custom code if the script fails, and say that you did.

  • Never claim a conversion succeeded without the script's success output.
  • Verification test cases live in references/test-cases.md with fixtures in

assets/samples/ — use them when the user asks to validate the skill.

Other skills for the same job

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

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

2.5k tokens
PDF
by anthropics
vendor ×18

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.

1.8k tokens scripts
PPTX
by JayZeeDesign
×17

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

6.4k tokens scripts
Canvas Design
by anthropics
vendor ×16

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.

3k tokens
PDF
by anthropics
vendor ×12

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.

2k 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
Obsidian Markdown
by ZhanlinCui
×5

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.

2.7k tokens
Obsidian Bases
by ZhanlinCui
×4

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

4.1k tokens

How to use it

Copy the folder

Take microsoft/doc-format-converter 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.