Agent skill

PDF Converter

by OpenMinis in OpenMinis/MinisSkills

Convert documents to PDF via a typst-based pipeline. An agent skill from OpenMinis/MinisSkills.

MITAuto-check passedDocuments & Office

Install PDF Converter

skills CLI
$ npx skills add OpenMinis/MinisSkills --skill pdf-converter -a claude-code

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

GitHub CLI
$ gh skill install OpenMinis/MinisSkills pdf-converter --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/OpenMinis/MinisSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/pdf-converter .claude/skills/pdf-converter && 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
pdf-converter
GitHub stars
444
Token cost
~2.1k tokens
SKILL.md length
765 words
Files
7 (incl. scripts, assets)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

Convert documents to PDF via a typst-based pipeline. An agent skill from OpenMinis/MinisSkills.

  • Works in 3 steps: Prerequisites (self-checked on every run) → Run the conversion → Verify the output
  • The user asks to convert to PDF
  • SKILL.md covers When to Use This Skill, Workflow, Performance and Output Formatting (amber theme), plus 6 more sections
  • Runs Python scripts from its folder; calls python3, pandoc and apk

What it does

PDF Converter is an agent skill from OpenMinis/MinisSkills. Convert documents to PDF via a typst-based pipeline. Supports Markdown, HTML, plain text, images, and any pandoc-supported format. Use this skill whenever the user asks to "convert to PDF", "generate a PDF", "export as PDF", "turn X into a PDF", or says "转PDF" / "生成PDF" / "导出PDF". Also covers merging multiple images into one PDF.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and assets (for example `evals/evals.json`, `evals/pdf-format-test.md` and `scripts/to_pdf.py`). Compatibility notes: Python 3, pandoc, typst, py3-pillow; Alpine (iSH) / Termux (Android) / Debian

It sits in Documents & Office, covering PDF and Document parsing. It works with Pandoc. The repository describes itself as: Skills collection for Minis. The licence is MIT.

When your agent uses it

  • The user asks to convert to PDF
  • Turn X into a PDF
  • Says 转PDF / 生成PDF / 导出PDF

Example prompts

  • “convert to PDF”
  • “generate a PDF”
  • “export as PDF”
  • “/pdf-converter”

Requirements

  • Python 3
  • Docker
  • Compatibility (from SKILL.md): Python 3, pandoc, typst, py3-pillow; Alpine (iSH) / Termux (Android) / Debian

Workflow steps

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

  1. Prerequisites (self-checked on every run)
  2. Run the conversion
  3. Verify the output

What it can do on your machine

Read from SKILL.md and the folder at commit ae8c5db. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pandoc
    • apk
    • apt

    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.

  • Compatibility

    Python 3, pandoc, typst, py3-pillow; Alpine (iSH) / Termux (Android) / Debian

    From compatibility in the SKILL.md frontmatter.

Context cost

PDF Converter loads about 2.1k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 765 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from OpenMinis/MinisSkills at commit ae8c5db, republished under its MIT licence (© OpenMinis). 765 words, ~2,052 tokens.

Download SKILL.mdSave it as .claude/skills/pdf-converter/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
pdf-converter
description
Convert documents to PDF via a typst-based pipeline. Supports Markdown, HTML, plain text, images, and any pandoc-supported format. Use this skill whenever the user asks to "convert to PDF", "generate a PDF", "export as PDF", "turn X into a PDF", or says "转PDF" / "生成PDF" / "导出PDF". Also covers merging multiple images into one PDF.
compatibility
Python 3, pandoc, typst, py3-pillow; Alpine (iSH) / Termux (Android) / Debian

pdf-converter

Convert documents to PDF with proper CJK rendering, half-width digits, and emoji support. Uses a typst-based pipeline that compiles markup directly to PDF in ~5 s per conversion for a typical 10-page document.

When to Use This Skill

Use this skill when the user needs to:

  • Convert Markdown (.md) to PDF preserving tables, code blocks, emoji, and Chinese text
  • Convert HTML (.htm, .html) to PDF
  • Convert plain text (.txt) to PDF
  • Convert images (.png / .jpg / .jpeg / .gif / .bmp / .webp) to PDF, including multi-image merge into one PDF
  • Convert any pandoc-supported format (.rst, .org, .latex, etc.) to PDF

Workflow

Step 1 — Prerequisites (self-checked on every run)

The script verifies pandoc + typst are on PATH (and PIL for the image-merge path). If anything is missing, it prints platform-specific install commands and exits non-zero — no silent pandoc/typst failure later.

PlatformInstall
Alpine (iSH / Docker)apk add pandoc typst py3-pillow font-wqy-zenhei font-dejavu font-noto-emoji
Termux (Android)pkg install pandoc typst python-pillow font-wqy-zenhei font-dejavu noto-color-emoji
Debian / Ubuntuapt install pandoc typst python3-pillow fonts-wqy-zenhei fonts-dejavu fonts-noto-color-emoji

The font directory is auto-detected from candidate paths (/usr/share/fonts, $PREFIX/share/fonts, /usr/local/share/fonts).

Step 2 — Run the conversion

Format is detected by the file extension:

bash
# Markdown → PDF (formatting, emoji, Chinese, half-width digits, amber theme)
python3 scripts/to_pdf.py doc.md -o out.pdf

# HTML → PDF
python3 scripts/to_pdf.py page.html -o out.pdf

# Plain text → PDF (file stem used as title unless --title given)
python3 scripts/to_pdf.py notes.txt -o out.pdf --title "My Notes"

# Merge images into one PDF (one page per image)
python3 scripts/to_pdf.py img1.jpg img2.png -o merged.pdf

# Any pandoc-supported format (.rst/.org/.latex…) → PDF
python3 scripts/to_pdf.py doc.rst -o out.pdf
Step 3 — Verify the output
bash
ls -la out.pdf

On success the script prints ✅ PDF generated: <path> and exits 0. On failure it prints a ❌-prefixed diagnostic to stderr and exits non-zero.

Performance

pandoc (input → typst markup)      ~1-2 s
emoji SVG prefetch (parallel)       ~0 s warm cache, ~30 s first-run for ~90 emoji
typst compile (typst → PDF)         ~1-3 s for a 10-page document
─────────────────────────────────────────
total                               ~5 s warm cache

On iOS (iSH, emulated x86) expect a 5–10× slowdown; for very large documents or first-run emoji downloads, run in the background to avoid iOS killing the app:

bash
nohup python3 scripts/to_pdf.py big.md -o big.pdf > /tmp/pdf.log 2>&1 &

Output Formatting (amber theme)

  • Headings: h1 with amber underline (#D97706), h1–h4 hierarchy
  • Tables: amber header (white bold text) + zebra stripes + thin grid borders, spans full content width
  • Code blocks: light gray background (#f2f3f5) + DejaVu Sans Mono + top gray bar
  • Blockquotes: amber left bar + light orange background (#fef7ed)
  • Emoji: Twemoji SVG vector images, baseline-aligned with CJK text
  • Footer: centered page number

How It Works

pandoc (MD/HTML/… → typst)  →  [emoji → SVG, table-width fix]  →  typst compile (→ PDF)
ComponentRole
pandocConverts MD / HTML / reST / org / latex → typst markup
typstRust binary; compiles typst markup → PDF with native font fallback
Twemoji SVGEmoji → vector images; CDN download + local cache
PILImage merging (lazy-imported; image-only mode skips pandoc/typst entirely)
Font Strategy
Character typeFontHandling
ASCII (digits / letters)DejaVu Sanstypst native fallback — half-width glyphs
ChineseWenQuanYi Zen Heitypst native fallback
EmojiTwemoji SVGCDN download → typst image() embed

Configuration (environment variables)

VariableDefaultPurpose
EMOJI_CDN_BASEunsetOverride the Twemoji CDN with a single mirror URL (corporate proxy, ghproxy, air-gapped cache). When unset, a GitHub raw → jsDelivr → unpkg fallback chain is used.
PDF_CONVERTER_WORKERS8 on Termux, 4 elsewhereConcurrency for SVG prefetch. iSH defaults lower because emulated x86 has tight fd / memory limits.
EMOJI_SVG_TIMEOUT15Per-request timeout in seconds for SVG downloads. Raise on very slow networks; lower on fast reliable ones.

File Structure

pdf-converter/
├── SKILL.md
├── .gitignore
├── assets/
│   ├── template.typ         # typst amber-theme template (committed)
│   └── emoji_cache/         # Twemoji SVG cache (gitignored, created at runtime)
├── scripts/
│   └── to_pdf.py            # main script (pandoc + typst + SVG emoji)
└── evals/
    ├── evals.json           # test cases
    ├── pdf-format-test.md   # comprehensive format test document
    └── pdf-format-test.pdf  # expected output reference (10 pages, ~275 KB)
Show full SKILL.md (307 more words)Show less

Error Handling

ConditionBehavior
Missing input filePython IOError / pandoc error, exit non-zero
Missing pandoc / typst (text mode)Self-check prints install hints, exit 1
Missing PIL (image mode)Self-check prints install hint, exit 1
pandoc parse errorstderr ❌ pandoc: <msg>, exit 1
typst compile errorstderr ❌ typst: <msg>, exit 1
typst compile timeoutdefault 120 s; stderr error, exit 1
Emoji SVG download fails on all mirrorsFalls back to Noto Color Emoji bitmap font; stderr warning, conversion continues

Testing

Verify the install (and any dependency change) using the bundled format-test document, then sanity-check against the bundled reference PDF:

bash
python3 scripts/to_pdf.py evals/pdf-format-test.md -o /tmp/test.pdf
pdfinfo /tmp/test.pdf | grep Pages      # expect: Pages: 10
ls -la /tmp/test.pdf                    # expect: ~200-350 KB

Check visually: amber table headers at full width, SVG emoji rendered (not tofu boxes), half-width digits inside CJK paragraphs, all sections present. Compare against evals/pdf-format-test.pdf (generated from the same source).

Key Implementation Notes

  • Table header height: a show rule replacing cells with plain text() drops the cell's inset; use block(inset: ...) instead to preserve padding.
  • Table width: pandoc emits columns: N for narrow tables → rewritten to 1fr columns so tables span full content width.
  • Emoji alignment: box(image(...), baseline: 5%) aligns the image bottom with the CJK text baseline.
  • Emoji detection: U+2600-27BF uses a precise frozenset of 116 Twemoji-provided codepoints (not the full range — symbols like ☐☒★♔♪ aren't Twemoji and would 404); U+1F300-1FAFF uses the full range.
  • Parallel SVG prefetch: unique emoji sequences are collected, then missing SVGs are batch-downloaded concurrently before the replacement pass — first-run (empty cache) ~30 s instead of >180 s serial.
  • CDN fallback: each SVG tries GitHub raw → jsDelivr → unpkg (or the single URL in EMOJI_CDN_BASE); a 404 or timeout on one mirror transparently retries the next, with a per-request timeout (EMOJI_SVG_TIMEOUT, default 15 s) to prevent hung connections from stalling the prefetch batch.
  • Mode-aware dependency check: image-merge mode requires only PIL; text/markup mode requires pandoc + typst. Image-only users aren't forced to install the heavy pandoc/typst toolchain.

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

Files

SKILL.md and 6 other files (scripts, assets) in pdf-converter of OpenMinis/MinisSkills.

  • SKILL.md
  • .gitignore
  • assets/template.typ
  • evals/evals.json
  • evals/pdf-format-test.md
  • evals/pdf-format-test.pdf
  • scripts/to_pdf.py

Open the folder on GitHubat commit ae8c5db

Compare with similar skills

PDF Converter 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.

PDF Converter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PDF Converter this skillOpenMinis/MinisSkills444—~2.1kAutomated safety check: PassMIT
Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html907—~4.8kAutomated safety check: PassMIT
Doc To Markdowndaymade/claude-code-skills1.4k—~2.5kAutomated safety check: PassMIT
PDF Processing GuideshareAI-lab/learn-claude-code78k5 repos~646Automated safety check: PassMIT
MarkitdownImCa0/just-laws78214 repos~3.2kAutomated safety check: NotesMIT
Harness Book Best Practicewquguru/harness-books3.2k—~4.1kAutomated safety check: PassNone

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.

    907 GitHub stars~4.8k tokensUpdated 1 mo ago
    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
  • PDF Processing Guide

    shareAI-lab/learn-claude-code

    Gives the agent command-line and Python recipes for reading, creating, merging and splitting PDF files, plus tips for large and scanned documents.

    78k GitHub starsUsed in 5 repos~646 tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    782 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Harness Book Best Practice

    wquguru/harness-books

    Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.

    3.2k GitHub stars~4.1k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • DOCX Toolkit

    XiaomiMiMo/MiMo-Code

    Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.

    14k GitHub stars~2.4k tokensUpdated today
    Documents & OfficeAuto-check passed

More from OpenMinis/MinisSkills

All 49 skills in this repo
  • Android UI Automation

    OpenMinis/MinisSkills

    Automate Android apps that have no public API or web version by driving the UI layer through the Accessibility Service.

    444 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Codex On Ish

    OpenMinis/MinisSkills

    Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken.

    444 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Evidence Chain Builder

    OpenMinis/MinisSkills

    Score a claim against the evidence behind it. An agent skill from OpenMinis/MinisSkills.

    444 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Hyperframes CLI

    OpenMinis/MinisSkills

    HyperFrames CLI and Minis rendering. An agent skill from OpenMinis/MinisSkills.

    444 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Whenpeak

    OpenMinis/MinisSkills

    Predict when a person's brain works best from their sleep, using the WhenPeak performance-intelligence API, and turn it into concrete scheduling advice.

    444 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Openstreetmap Marker

    OpenMinis/MinisSkills

    Generate a mobile-first, immersive, Amap(Gaode)-style custom landmark marker HTML map for travel itinerary planning, place showcasing, location sharing, etc.

    444 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about PDF Converter

What does PDF Converter do?

Convert documents to PDF via a typst-based pipeline. An agent skill from OpenMinis/MinisSkills. PDF Converter is an agent skill from OpenMinis/MinisSkills. Convert documents to PDF via a typst-based pipeline.

When should I use PDF Converter?

PDF Converter fits situations like: the user asks to convert to PDF; turn X into a PDF; says 转PDF / 生成PDF / 导出PDF.

How do I install PDF Converter in Claude Code?

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

How do I install PDF Converter in Codex?

Run `npx skills add OpenMinis/MinisSkills --skill pdf-converter -a codex`. Or copy the skill folder (pdf-converter in OpenMinis/MinisSkills) into .agents/skills/pdf-converter in your project. Codex loads it when a task matches its description.

Can I use PDF Converter 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 OpenMinis/MinisSkills --skill pdf-converter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf-converter, .gemini/skills/pdf-converter, .github/skills/pdf-converter and .opencode/skills/pdf-converter in your project.

What does PDF Converter need to run?

Going by SKILL.md and its folder, PDF Converter needs Python for the scripts in its folder and the command-line tools its instructions call (python3, pandoc, apk and apt). Our summary lists: Python 3; Docker. Compatibility (from SKILL.md): Python 3, pandoc, typst, py3-pillow; Alpine (iSH) / Termux (Android) / Debian.

Does PDF Converter 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 PDF Converter 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PDF Converter use?

PDF Converter 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 PDF Converter use?

About 2.1k tokens (SKILL.md is roughly 8.2k 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 PDF Converter?

Skills that share tags, products or a category with PDF Converter: Huashu Markdown Publishing Pipeline (alchaincyf/huashu-md-html, 907 stars), Doc To Markdown (daymade/claude-code-skills, 1.4k stars), PDF Processing Guide (shareAI-lab/learn-claude-code, 78k stars) and Markitdown (ImCa0/just-laws, 782 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PDF Converter?

OpenMinis (a GitHub organization) maintains it in OpenMinis/MinisSkills, which has 444 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: OpenMinis/MinisSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.