pdf-creator
An agent skill by daymade, from daymade/claude-code-skills. Tags: cjk, conversion, documents, markdown, pdf.
What it does
Convert markdown files to professional PDF documents with proper Chinese font support, theme system, and visual self-check. Use for Markdown → PDF, printable Markdown documents, and Markdown formatted for print or mobile reading. Prefer its CJK typography, header/footer suppression, and visual verification over manual pandoc/Chrome commands. Scope is Markdown → PDF only. Existing Word/WPS → PDF, including manuscript excerpts and layout repair, routes to daymade-docs:docx-creator; do not round-trip an authoritative Word manuscript through Markdown. Word output also routes to docx-creator.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add daymade/claude-code-skills --skill pdf-creator
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/daymade-docs/pdf-creator ~/.claude/skills/pdf-creator
Safety box score
Grade C, moderate risk: 35 of 100 risk points, rated 2026-10-19. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill converts Markdown to PDF by shelling out to Pandoc, WeasyPrint or Chrome, and Poppler tools, then writes PDFs and temporary preview images. The main risks are local binary execution, possible file overwrites/cleanup on caller-chosen paths, and renderer-dependent behavior that can fetch external assets if the source includes them.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The core path runs native tools via `subprocess` — `pandoc`, `weasyprint`, headless Chrome, `pdftoppm`, `pdfinfo`, and `pdftotext` — so using the skill executes multiple local binaries. |
| Network access | 1 (low) | Markdown is converted to HTML and then rendered by browser engines (`_render_chrome(full_html, pdf_file)` / `_render_weasyprint(HTML(string=full_html)...)`), so embedded remote URLs in the source can be fetched during rendering. |
| Filesystem reach | 2 (moderate) | It writes the PDF to the caller-chosen output path, may unlink an existing PDF before Chrome renders (`pdf_path.unlink(missing_ok=True)`), and creates/cleans preview PNGs under `tempfile.gettempdir()/pdf-creator-previews/<stem>`. |
| Secrets & credentials | 0 (none) | No code reads keychains, token files, browser sessions, or other credential stores; the tests only pass local command text to `/bin/sh -n`. |
| Privilege & persistence | 1 (low) | The docs tell users to install packages with `brew install pandoc` / `brew install poppler`, and `md_to_pdf.py` mutates `DYLD_LIBRARY_PATH` on macOS, but it does not require sudo or register services. |
| Instruction hijack surface | 1 (low) | `SKILL.md` contains strong agent-directed imperatives like `This is not optional` and `Do not manually invoke pandoc + Chrome`, but there is no hidden text or fetched remote instruction source. |
| Irreversible actions | 1 (low) | It can batch-convert many files and run checks automatically, but it does not send messages, deploy, purchase, or otherwise act outside local file generation. |
| Transparency | 1 (low) | The actual rendering behavior depends on external binaries not shipped here (`pandoc`, Chrome, WeasyPrint, Poppler), so some runtime behavior is only observable through those installed tools. |
Before installing
- Verify you trust the local `pandoc`, Chrome/Chromium, WeasyPrint, and Poppler binaries this skill will invoke.
- Test a sample document with tables and inspect the output manually; Chrome can clip the right border even when the text looks fine.
- Confirm that writing PDFs and preview PNGs to the chosen output/temp locations will not overwrite anything you care about.
- If you need deterministic behavior, pin the external tool versions before relying on the skill in production.
Rated 2026-10-19 by an automated review of 17 files from the skill's repository.
Source
- Repository
- daymade/claude-code-skills (all skills from this repository)
- Path
- daymade-docs/pdf-creator/SKILL.md
- Branch
- main
- Updated
- 2026-09-20
Related skills
- doc-to-markdown — Converts DOCX/PDF/PPTX to high-quality Markdown with automatic post-processing.
- pdf-to-html — Converts a PDF into one self-contained, readable HTML file that preserves images, tables.
- photo-to-scanned-pdf — Two pipelines ending at a scanner-look PDF.
- lead-magnets — When the user wants to create, plan, or optimize a lead magnet for email capture or lead generation.
- feishu-doc-scraper — Extract Feishu (Lark) Docs, Wiki pages/collections, spreadsheets.
- mermaid-tools — Extracts Mermaid diagrams from markdown files and generates high-quality PNG images using bundled scripts.