md-to-pdf
Skill2 starsChanged 5 months agoMITView on GitHub
Convert a markdown file to a typography-styled PDF. Use when the user asks to "PDF this", "make a PDF", "convert to PDF", "print this letter / doc", or wants any markdown rendered for sharing outside the terminal (email, DM, print). Wraps a pandoc + Chrome-headless pipeline with two style presets. Single source of truth — never re-implement the pandoc + chrome flow inline.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- hasan-jilani/claude-skillstheir own version, first seen Nov 16, 2026
- cuitao2046/skillstheir own version, first seen Nov 15, 2026
- StevenZhao666/hermes-kitstheir own version, first seen Nov 8, 2026
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
- sanoakr/ai-skillstheir own version, first seen Oct 20, 2026
- wearekanso/agent-skillstheir own version, first seen Oct 20, 2026
Used with
Projects with it also use skill-creator.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- Mathews-Tom/armory★ 340same name
- huangserva/servasyy_skills★ 168same name
- hamzafarooq/claude-code-starter★ 145same name
- madebyecho/agent-skills★ 8same name
- wearekanso/agent-skills★ 8same name
- allenyan513/open-investor-skills★ 5same name
- TbusOS/sky-skills★ 3same name
- StevenZhao666/hermes-kits★ 2same name
- cuitao2046/skills★ 1same name
- luochang212/skills★ 1same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- classifySkill
- critical-qaSkill
- house-styleSkill
- literature-loopSkill
- marginal-contributionSkill
- ship-webSkill
- trp2Skill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
If genuinely ambiguous, ask before running.
- Very specific: line 34
If the user named the artifact a "letter" / "draft" / "essay" / "post" / "writeup" → letter.
- Very specific: line 35
If they named it a "memo" / "report" / "status" / "brief" / "notes" → memo.
- Very specific: line 36
If unclear, default to letter.
- Very specific: line 48
Don't pass --keep-html unless the user explicitly wants the HTML intermediate (they almost never do).
- Distinctive: line 60
Do NOT narrate the pandoc/Chrome pipeline internals.
- Distinctive: line 66
Don't re-implement the pandoc + Chrome pipeline inline.
- Distinctive: line 67
Don't add a third style preset on the fly without asking — preset additions belong in the script, not in conversation.
- Distinctive: line 68
Don't preview the HTML or open the PDF unless the user asks.
- Distinctive: line 69
Don't suggest LaTeX-based alternatives ("we could use XeLaTeX / wkhtmltopdf") — the Chrome path is the load-bearing one because it's the …
- Distinctive: line 81
Don't troubleshoot pandoc or Chrome internals beyond this — escalate to the user.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
md-to-pdf — markdown → typography-styled PDF
When invoked: User wants a markdown file rendered to PDF for sharing or reading outside the terminal — correspondence, memos, drafts, anything where Telegram-DM / VS-Code-preview readability is insufficient.
Why this exists: On 2026-04-27 (letter-to-a partner incident) Claude rebuilt the pandoc + Chrome-headless pipeline inline — wrote a temp CSS file, tracked down pandoc's path, debugged Chrome's Windows-path quirks, cleaned up intermediates manually. Will called it out: "that should be offloaded to a tool somehow." This skill is that tool. Do not re-implement the pipeline inline. Call the script.
Step 1 — Locate the markdown source
The input is whatever markdown file the user wants rendered. If the user pointed at a specific path, use it. If they said "this letter" / "the draft" / "the doc we just worked on", use the most recent .md file we just wrote or edited in this conversation.
If genuinely ambiguous, ask before running. One question beats one wrong PDF.
Step 2 — Pick a style
Two presets, both letter-size paper:
letter(default): serif body (Georgia / Iowan Old Style / Palatino), sans-serif headings, 11.5pt at 0.9″×1″ margins. For correspondence, long-form drafts, anything that benefits from bookish typography. Use this unless the user explicitly says otherwise.memo: sans-serif throughout, 10.5pt at 0.7″×0.8″ margins, tighter line-height. For internal memos, status reports, dense reference docs.
If the user named the artifact a "letter" / "draft" / "essay" / "post" / "writeup" → letter.
If they named it a "memo" / "report" / "status" / "brief" / "notes" → memo.
If unclear, default to letter.
Step 3 — Run the script
~/.claude/scripts/md-to-pdf.sh <input.md> [--style letter|memo] [--output <path.pdf>] [--keep-html]Output defaults to <input-dir>/<input-basename>.pdf (same directory as the source, same basename). Don't pass --output unless the user wants a different location.
Don't pass --keep-html unless the user explicitly wants the HTML intermediate (they almost never do).
Step 4 — Report
Tell the user:
- Where the PDF landed (full path).
- Style used (letter / memo).
- Size in KB (a sanity signal — anything under 5KB or over 5MB is suspect).
- One line on what the user can do next ("open in your PDF reader" / "drag into Telegram / email" — match the use case the user mentioned).
Do NOT narrate the pandoc/Chrome pipeline internals. The user doesn't care about pandoc's path or Chrome's headless flags — those are implementation details now living in the script.
Don't
- Don't re-implement the pandoc + Chrome pipeline inline. The whole point of this skill is consolidation.
- Don't add a third style preset on the fly without asking — preset additions belong in the script, not in conversation.
- Don't preview the HTML or open the PDF unless the user asks. The user knows where their files are.
- Don't suggest LaTeX-based alternatives ("we could use XeLaTeX / wkhtmltopdf") — the Chrome path is the load-bearing one because it's the only path we've validated end-to-end on this machine.
If the script fails
Check in order:
pandoc not found→ the script auto-detects pandoc at~/AppData/Local/Pandoc/pandocand/c/Program Files/Pandoc/pandoc.exe. If neither exists, tell the user pandoc needs to be installed.Chrome not found→ similar, looks at standard Windows + macOS paths.Access is deniedwriting PDF → the output path probably has a permissions issue or the file is open in a viewer. Suggest the user close any open instance and retry.- Empty/tiny PDF (<5KB) → the markdown was empty or the HTML conversion silently failed. Re-run with
--keep-htmland inspect the intermediate.
Don't troubleshoot pandoc or Chrome internals beyond this — escalate to the user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

