doc-to-markdown

doc-to-markdown is a skill for Claude Code from daymade/claude-code-skills. It costs 136 tokens per session (2,135 once invoked), scanned A, original, MIT.

A document-conversion process that turns DOCX, PDF, and PPTX files into cleaned-up Markdown. Markdown is plain text with simple symbols for headings, lists, links, and other formatting.

In plain words
What is it for?
Creating draft or final Markdown from PDFs, Word documents, and presentations, with automatic cleanup and optional media folders. It also supports spreadsheet conversion and includes tests for the conversion scripts.
Why use it?
It fixes common conversion problems such as broken tables, unwanted document noise, OCR errors, repeated headers, watermarks, and unusable image paths.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the daymade-docs plugin — 10 skills shipped together

Good fit Creating draft or final Markdown from PDFs, Word documents, and presentations, with automatic cleanup and optional media folders. It also supports spreadsheet conversion and includes tests for the conversion scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/daymade/claude-code-skills/doc-to-markdown
About the project

Claude Code Skills Marketplace is a collection and marketplace of skills, plugins, agents, and instructions that extend Claude Code with specialized development workflows. It is for developers who want to install existing workflows or create, validate, and package their own Claude Code skills.

daymade/claude-code-skills · 1,381 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add daymade/claude-code-skills --skill doc-to-markdown
Clone the repo
git clone --depth 1 https://github.com/daymade/claude-code-skills

Made for: Claude Code.

Or install daymade-docs, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-to-markdown

README.md
[![agentmods](https://agentmods.dev/badge/skills/daymade/claude-code-skills/doc-to-markdown.svg)](https://agentmods.dev/skills/daymade/claude-code-skills/doc-to-markdown)
Your own site
<a href="https://agentmods.dev/skills/daymade/claude-code-skills/doc-to-markdown"><img src="https://agentmods.dev/badge/skills/daymade/claude-code-skills/doc-to-markdown.svg" alt="Measured on agentmods" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 13 Apr 2026
  • Snyk pass 13 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00136 $0.02135
Opus 5 $0.00068 $0.01068
Sonnet 5 $0.00027 $0.00427
Haiku 4.5 $0.00014 $0.00214

Measured 8d ago against content hash 0e7b9a8e620f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

doc-to-markdown scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/convert_path.py, scripts/convert.py, scripts/extract_pdf_images.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

daymade-docs/doc-to-markdown/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Doc to Markdown

Convert documents to high-quality markdown with intelligent multi-tool orchestration and automatic DOCX post-processing.

Architecture: Pandoc (best-in-class extraction) + 8 post-processing fixes (our value-add).

Quick Start

# DOCX → Markdown (one command, zero manual fixes)
uv run --with pymupdf4llm --with markitdown scripts/convert.py document.docx -o output.md --assets-dir ./media

# PDF → Markdown
uv run --with pymupdf4llm --with markitdown scripts/convert.py document.pdf -o output.md

# Run tests
uv run --with pytest pytest scripts/test_convert.py -v

Dual Mode

Mode Speed Quality Use Case
Quick (default) Fast Good Drafts, simple documents
Heavy Slower Best Final documents, complex layouts

Tool Selection

Format Quick Mode Heavy Mode
PDF pymupdf4llm pymupdf4llm + markitdown
DOCX pandoc + post-processing pandoc + markitdown
PPTX markitdown markitdown + pandoc
XLSX markitdown markitdown

DOCX Post-Processing (automatic)

When converting DOCX via pandoc, 8 cleanups are applied automatically:

Problem Fix Test coverage
Grid tables (+:---+) Single-column → blockquote, multi-column → pipe table TestPostprocessPipeline
Simple tables ( ---- ----) Multi-column images → pipe table with captions TestSimpleTable
Image path nesting (media/media/) Flatten to media/, absolute → relative test_stats_tracking
Pandoc attributes ({width="..."}) Removed test_pandoc_attributes_removed
CJK bold spacing (**粗体**中文) Add space around ** for CJK bold spans TestCjkBoldSpacing (15 cases)
Indented dashed code blocks → fenced ``` with language detection test_code_block_with_language
Escaped brackets (\[...\]) [...] test_escaped_brackets_fixed
Double-bracket links ([[text]](url)) [text](url) test_double_bracket_links_fixed

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 206 lines · 136 tokens per session scan A 0e7b9a8e620f

Subscribe to this mod's changes

doc-to-markdown is a skill published in the GitHub repository daymade/claude-code-skills (1,381 stars, last pushed yesterday), licensed MIT. It adds 136 tokens to every session and 2,135 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.