md2pdf
Skill15 starsChanged 2 months agoMITView on GitHub
Convert Markdown files to professional PDFs using marknest — a Rust-powered CLI that handles single files, entire folders, ZIP archives, and even GitHub repository URLs. Use this skill whenever the user wants to turn .md files into PDFs, generate printable documentation, export markdown as PDF, batch-convert a docs folder, or create styled PDF reports from markdown. Also trigger when the user mentions "markdown to PDF", "md to pdf", "export as PDF", "print markdown", "PDF from README", "convert docs to PDF", or asks to make markdown files look professional/printable. This skill covers theming, table of contents generation, Mermaid diagram rendering, LaTeX math support, and custom styling — so use it even if the user asks for "pretty PDFs", "styled documentation", or "PDF with diagrams and math".
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- cy070812/md2pdf-skilltheir own version, first seen Sep 10, 2026
- enkr1/claude-code-skillstheir own version, first seen Jul 14, 2026
- tanpenggood/skillstheir own version, first seen May 14, 2026
- kaiye/skillstheir own version, first seen Mar 3, 2026
- Qubity-dev/claude-skillstheir own version, first seen Mar 2, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- kaiye/skills★ 19same name
- enkr1/claude-code-skills★ 1same name
- tanpenggood/skills★ 1same name
- cy070812/md2pdf-skill★ 0same name
- Qubity-dev/claude-skills★ 0same name
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.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 106
If the markdown contains Mermaid code blocks, enable rendering:
- Distinctive: line 114
If the markdown contains LaTeX math expressions:
- Distinctive: line 147
Before converting, you can validate markdown files to catch broken links and rendering issues:
- Distinctive: line 170
When the user asks to convert markdown to PDF, follow this logic:
- Very specific: line 178
If the user has a .marknest.toml config file in their project, marknest will pick it up automatically — no need to pass flags that are …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Marknest: Markdown to PDF Converter
You are helping the user convert Markdown files into professional PDFs using marknest, a fast Rust-powered CLI tool.
Why marknest?
marknest handles everything needed for high-quality PDF output from Markdown: embedded images, Mermaid diagrams, LaTeX math, syntax-highlighted code blocks, table of contents, and multiple built-in themes. It works locally with no cloud dependencies — all rendering assets are vendored. It accepts single files, folders, ZIP archives, and GitHub URLs as input.
Requirements
marknest requires Chromium for PDF rendering (Mermaid diagrams, math, and HTML-to-PDF conversion). Before running any conversion, ensure Chromium is installed:
# Check if Chromium/Chrome is available
npx playwright install chromiumThis only needs to be done once. If the user already has Chrome or Chromium installed on their system, marknest will detect and use it automatically.
Installation
Prefer npx (zero-install):
# Option 1: Use npx (no install needed, recommended)
npx marknest convert ...
# Option 2: Install globally via npm
npm install -g marknest
# Option 3: Install via Cargo (if Rust toolchain is available)
cargo install marknestCore Commands
Single file conversion
npx marknest convert README.md -o README.pdfBatch conversion (folder)
npx marknest convert ./docs --all --out-dir ./pdfFrom GitHub URL
npx marknest convert https://github.com/user/repo/blob/main/docs/guide.md -o guide.pdfFrom ZIP archive
npx marknest convert ./docs.zip --all --out-dir ./pdfStyling & Themes
marknest has four built-in themes. Choose one that fits the user's needs:
| Theme | Best for |
default | General purpose, clean look |
github | GitHub-flavored markdown appearance |
docs | Technical documentation |
plain | Minimal, no frills |
npx marknest convert README.md -o README.pdf --theme githubFor custom styling, use --css:
npx marknest convert README.md -o README.pdf --css custom.cssAdvanced Features
Table of Contents
npx marknest convert README.md -o README.pdf --tocMermaid Diagrams
If the markdown contains Mermaid code blocks, enable rendering:
npx marknest convert README.md -o README.pdf --mermaid autoLaTeX Math
If the markdown contains LaTeX math expressions:
npx marknest convert README.md -o README.pdf --math autoPage Layout
# Landscape orientation
npx marknest convert README.md -o README.pdf --landscape
# Custom page size
npx marknest convert README.md -o README.pdf --page-size letter
# Custom margins (pixels)
npx marknest convert README.md -o README.pdf --margin-top 40 --margin-bottom 40PDF Metadata
npx marknest convert README.md -o README.pdf --title "Project Guide" --author "Team"Header/Footer Templates
npx marknest convert README.md -o README.pdf --header-template header.htmlValidation
Before converting, you can validate markdown files to catch broken links and rendering issues:
npx marknest validate README.md
npx marknest validate ./docs --all --strictCombining Multiple Options
A typical full-featured conversion command:
npx marknest convert README.md -o README.pdf \
--theme github \
--toc \
--mermaid auto \
--math auto \
--title "Project Documentation" \
--author "Team Name"Decision Guide
When the user asks to convert markdown to PDF, follow this logic:
- Identify the input: Single file? Folder? ZIP? GitHub URL?
- Ask about styling (if not specified): Theme preference? TOC needed?
- Check for special content: Does the markdown have Mermaid diagrams or LaTeX math? If yes, add
--mermaid autoand/or--math auto. - Determine output: Single PDF (
-o) or batch (--out-dir)? - Run the command and verify the output file exists.
If the user has a .marknest.toml config file in their project, marknest will pick it up automatically — no need to pass flags that are already configured there.
Troubleshooting
| Issue | Solution |
| "Browser not found" | Run npx playwright install chromium |
| "Playwright runtime package was not found" | Run npm ci --prefix <path shown in error>, or set MARKNEST_PLAYWRIGHT_RUNTIME_DIR to a directory containing the playwright runtime |
| Mermaid diagrams not rendering | Add --mermaid auto flag |
| Math equations not rendering | Add --math auto flag |
| Images missing in PDF | Check relative paths; marknest resolves them from the workspace root |
| Permission denied on output | Check write permissions on the output directory |
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.

