Convert any markdown file to a clean PDF. An agent skill from hamzafarooq/claude-code-starter.

MITAuto-check passedDocuments & Office

Install Md To PDF

skills CLI
$ npx skills add hamzafarooq/claude-code-starter --skill md-to-pdf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hamzafarooq/claude-code-starter md-to-pdf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hamzafarooq/claude-code-starter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/md-to-pdf .claude/skills/md-to-pdf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
md-to-pdf
GitHub stars
145
Token cost
~598 tokens
SKILL.md length
184 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Convert any markdown file to a clean PDF. An agent skill from hamzafarooq/claude-code-starter.

  • Works in 4 steps: Confirm the input file → Convert markdown to styled HTML → Print HTML to PDF using Chrome → …
  • Asked to make a PDF from a .md file
  • SKILL.md covers Step 1 — Confirm the input file, Step 2 — Convert markdown to…, Step 3 — Print HTML to PDF… and Step 4 — Clean up and confirm, plus 2 more sections
  • Calls pandoc and brew

What it does

Md To PDF is an agent skill from hamzafarooq/claude-code-starter. Convert any markdown file to a clean PDF. Use when asked to make a PDF from a .md file, export a document, or convert markdown to PDF.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering PDF and Markdown. It works with Pandoc. The licence is MIT.

When your agent uses it

  • Asked to make a PDF from a .md file
  • Export a document
  • Convert markdown to PDF

Example prompts

  • “/md-to-pdf”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Confirm the input file
  2. Convert markdown to styled HTML
  3. Print HTML to PDF using Chrome
  4. Clean up and confirm

What it can do on your machine

Read from SKILL.md and the folder at commit 172c531. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pandoc
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Md To PDF loads about 598 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 184 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~598

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hamzafarooq/claude-code-starter at commit 172c531, republished under its MIT licence (© hamzafarooq). 184 words, ~598 tokens.

Download SKILL.mdSave it as .claude/skills/md-to-pdf/SKILL.md (or your agent's skills folder).
name
md-to-pdf
description
Convert any markdown file to a clean PDF. Use when asked to make a PDF from a .md file, export a document, or convert markdown to PDF.

When the user asks to convert a markdown file to PDF, follow these steps exactly:

Step 1 — Confirm the input file

Ask the user for the path to the .md file if not already provided. Confirm the output PDF path (default: same folder, same name, .pdf extension).

Step 2 — Convert markdown to styled HTML

Run this command (replace INPUT and OUTPUT paths):

bash
pandoc "INPUT.md" \
  -o "OUTPUT.html" \
  --standalone \
  --metadata title="Document" \
  --css=/dev/stdin <<'EOF'
body { font-family: "Helvetica Neue", Arial, sans-serif; max-width: 800px; margin: 40px auto; padding: 0 40px; font-size: 13px; line-height: 1.7; color: #1a1a1a; }
h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
h2 { font-size: 16px; font-weight: 700; margin-top: 32px; border-bottom: 1px solid #e0e0e0; padding-bottom: 6px; }
strong { font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 12px; }
th { background: #f5f5f5; padding: 8px; text-align: left; border: 1px solid #ddd; }
td { padding: 8px; border: 1px solid #ddd; }
hr { border: none; border-top: 1px solid #e0e0e0; margin: 24px 0; }
ul, ol { padding-left: 20px; }
li { margin-bottom: 6px; }
EOF

Step 3 — Print HTML to PDF using Chrome

bash
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --headless \
  --disable-gpu \
  --no-sandbox \
  --print-to-pdf="OUTPUT.pdf" \
  --print-to-pdf-no-header \
  --no-pdf-header-footer \
  "file://OUTPUT.html"

Note: encode spaces in the file path as %20 in the file:// URL.

Step 4 — Clean up and confirm

Delete the intermediate HTML file:

bash
rm "OUTPUT.html"

Tell the user the PDF is ready and give them the full path.

Requirements

  • pandoc must be installed (which pandoc to check)
  • Google Chrome must be at /Applications/Google Chrome.app/ (standard Mac install)
  • Works on macOS only in this configuration

Error handling

  • If pandoc is not found: tell the user to run brew install pandoc
  • If Chrome is not at the expected path: check with ls /Applications/ | grep -i chrome and adjust the path
  • If the PDF is 0 bytes: the file:// URL likely has unencoded spaces — encode them as %20

© hamzafarooq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/md-to-pdf of hamzafarooq/claude-code-starter.

Open the folder on GitHubat commit 172c531

Compare with similar skills

Md To PDF next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Md To PDF compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Md To PDF this skillhamzafarooq/claude-code-starter145—~598Automated safety check: PassMIT
Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html910—~4.8kAutomated safety check: PassMIT
Pandic OfficeTeam-Commonly/commonly1.4k—~642Automated safety check: PassApache-2.0
Doc To Markdowndaymade/claude-code-skills1.4k—~2.5kAutomated safety check: PassMIT
Bio Reporting Rmarkdown ReportsGPTomics/bioSkills1.2k1 repos~2.1kAutomated safety check: PassMIT
Md To PDFMathews-Tom/armory329—~2.4kAutomated safety check: PassMIT

Similar skills

  • Huashu Markdown Publishing Pipeline

    alchaincyf/huashu-md-html

    Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.

    910 GitHub stars~4.8k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Pandic Office

    Team-Commonly/commonly

    Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI.

    1.4k GitHub stars~642 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Creates reproducible R Markdown analysis reports (HTML, PDF, Word) with knitr, covering the render pipeline, the interactive-vs-knit session trap, cache invalidation, bookdown cross-references…

    1.2k GitHub starsUsed in 1 repo~2.1k tokens
    Documents & OfficeAuto-check passed
  • Md To PDF

    Mathews-Tom/armory

    Convert Markdown to styled PDFs with Mermaid diagrams, LaTeX/KaTeX math, tables, and code highlighting.

    329 GitHub stars~2.4k tokensUpdated 4 days ago
    Documents & OfficeAuto-check passed
  • Md To PDF Academic

    wentorai/research-plugins

    Convert Markdown to publication-quality PDF with LaTeX math rendering

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Documents & OfficeAuto-check: notes

More from hamzafarooq/claude-code-starter

All 29 skills in this repo
  • Beautiful HTML

    hamzafarooq/claude-code-starter

    Turn any document, proposal, report, or outline into a stunning single-file HTML presentation using 34 pre-built professional templates.

    145 GitHub stars~1.6k tokensUpdated 26 days ago
    Auto-check passed
  • Claude Code Deck

    hamzafarooq/claude-code-starter

    Generate a complete, ready-to-share HTML presentation explaining Claude Code, Skills, Sub Agents, Hooks, and Multi-Agent Systems — designed for product managers.

    145 GitHub stars~972 tokensUpdated 26 days ago
    Auto-check passed
  • Competitor Research

    hamzafarooq/claude-code-starter

    Research 3–5 competitors for any product or feature. An agent skill from hamzafarooq/claude-code-starter.

    145 GitHub stars~1.6k tokensUpdated 26 days ago
    Auto-check passed
  • Frontend Slides

    hamzafarooq/claude-code-starter

    Create stunning, animation-rich single-file HTML presentations from scratch or by converting a PowerPoint (.pptx) file.

    145 GitHub stars~1.4k tokensUpdated 26 days ago
    Auto-check passed
  • User Story Writer

    hamzafarooq/claude-code-starter

    Converts feature ideas or rough bullets into user stories with acceptance criteria.

    145 GitHub stars~531 tokensUpdated 26 days ago
    Auto-check passed
  • Dockerfile Generator

    hamzafarooq/claude-code-starter

    Create a production-ready Dockerfile and deployment config for any project.

    145 GitHub stars~355 tokensUpdated 26 days ago
    Auto-check: notes

Works with

Questions about Md To PDF

What does Md To PDF do?

Convert any markdown file to a clean PDF. An agent skill from hamzafarooq/claude-code-starter. Md To PDF is an agent skill from hamzafarooq/claude-code-starter. Convert any markdown file to a clean PDF.

When should I use Md To PDF?

Md To PDF fits situations like: asked to make a PDF from a .md file; export a document; convert markdown to PDF.

How do I install Md To PDF in Claude Code?

Run `npx skills add hamzafarooq/claude-code-starter --skill md-to-pdf -a claude-code`. Or copy the skill folder (.claude/skills/md-to-pdf in hamzafarooq/claude-code-starter) into .claude/skills/md-to-pdf in your project. Claude Code loads it when a task matches its description.

How do I install Md To PDF in Codex?

Run `npx skills add hamzafarooq/claude-code-starter --skill md-to-pdf -a codex`. Or copy the skill folder (.claude/skills/md-to-pdf in hamzafarooq/claude-code-starter) into .agents/skills/md-to-pdf in your project. Codex loads it when a task matches its description.

Can I use Md To PDF in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hamzafarooq/claude-code-starter --skill md-to-pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/md-to-pdf, .gemini/skills/md-to-pdf, .github/skills/md-to-pdf and .opencode/skills/md-to-pdf in your project.

What does Md To PDF need to run?

Going by SKILL.md and its folder, Md To PDF needs the command-line tools its instructions call (pandoc and brew).

Does Md To PDF access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Md To PDF safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Md To PDF use?

Md To PDF is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Md To PDF use?

About 598 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Md To PDF?

Skills that share tags, products or a category with Md To PDF: Huashu Markdown Publishing Pipeline (alchaincyf/huashu-md-html, 910 stars), Pandic Office (Team-Commonly/commonly, 1.4k stars), Doc To Markdown (daymade/claude-code-skills, 1.4k stars) and Bio Reporting Rmarkdown Reports (GPTomics/bioSkills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Md To PDF?

hamzafarooq (a GitHub user) maintains it in hamzafarooq/claude-code-starter, which has 145 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on September 13, 2026.

Source: hamzafarooq/claude-code-starter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.