Converts documents and URLs to markdown via tiered fallback (MCP markitdown, native tools, user notice). Use when a skill must ingest PDF, DOCX, or URL content.
npx skills add https://github.com/athola/claude-night-market --skill document-conversion
Convert documents and URLs to markdown using a three-tier
fallback strategy. This skill is infrastructure: consumer
skills reference it via dependency rather than reimplementing
conversion logic.
markdown for downstream processing
Identify the document type from the URI before converting.
| Extension | Format | Tier 1 | Tier 2 |
|-----------|--------|--------|--------|
| .pdf | PDF | Yes | Read tool (pages) |
| .docx, .doc | Word | Yes | None |
| .pptx, .ppt | PowerPoint | Yes | None |
| .xlsx, .xls | Excel | Yes | None |
| .html, .htm | HTML | Yes | WebFetch |
| .csv | CSV | Yes | Read tool |
| .json | JSON | Yes | Read tool |
| .xml | XML | Yes | Read tool |
| .png, .jpg, .jpeg, .gif, .webp | Image | Yes | Read tool (visual) |
| .mp3, .wav, .m4a | Audio | Yes | None |
| .zip | Archive | Yes | None |
| .epub | E-book | Yes | None |
See modules/format-matrix.md for quality comparison
across tiers.
To convert a document to markdown:
1. DETECT -- Identify format from URI extension or context
2. TRY -- Tier 1: MCP markitdown (best quality)
3. DEGRADE -- Tier 2: native Claude Code tools (if Tier 1 fails)
4. INFORM -- Tier 3: tell user what's needed (if no coverage)
5. SANITIZE -- Apply content-sanitization (external content)
Call the convert_to_markdown MCP tool with the document URI.
See modules/uri-construction.md for URI formatting rules.
If the tool is available and succeeds, you have the best
possible conversion. Proceed to the SANITIZE step.
If the tool is not available (not found, connection error)
or fails, proceed to Tier 2.
Use built-in tools as format-specific fallbacks.
See modules/fallback-tiers.md for per-format instructions.
Supported in Tier 2: PDF, HTML, images, CSV, JSON, XML.
Not supported in Tier 2: DOCX, PPTX, XLSX, audio,
archives, e-books. Proceed to Tier 3 for these.
When neither Tier 1 nor Tier 2 can handle the format:
> I cannot convert this {format} file without the markitdown
> MCP server. To enable conversion, add this to .mcp.json:
>
> `json
> {
> "mcpServers": {
> "markitdown": {
> "type": "stdio",
> "command": "uvx",
> "args": ["markitdown-mcp"]
> }
> }
> }
> `
>
> Alternatively, convert the file to PDF or HTML first,
> which I can read with built-in tools.
All converted content is external. Apply the
leyline:content-sanitization checklist:
Consumer skills depend on this skill and reference the
protocol by name:
dependencies:
- leyline:document-conversion
Then in their workflow: "Convert the document using the
leyline:document-conversion protocol."
modules/format-matrix.mdmodules/fallback-tiers.mdmodules/uri-construction.mdfirst; Tier 2 (native tools) only if Tier 1 is unavailable or
fails; Tier 3 (user notification with install instructions) only
if Tier 2 has no coverage for the format
--- EXTERNAL CONTENT [source: <tool>] --- boundary markers
and truncated to 2000 words per section before being passed
downstream
Tier 2 coverage, the exact Tier 3 user notification template is
shown including the .mcp.json snippet
conversion; unknown extension surfaced to the user rather than
passed to converters blindly
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
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.
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
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.
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.
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.
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.
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.
Take athola/document-conversion 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.