pdf-generation

pdf-generation is a skill for Claude Code from sjungling/sjungling-claude-plugins. It costs 77 tokens per session (1,551 once invoked), scanned B, original, MIT.

A tool-assisted process that turns an ordered folder of Markdown chapters into one printable PDF book. It adds a table of contents, page numbers, styling, and working links between chapters.

In plain words
What is it for?
Use it to export multi-chapter documentation, technical overviews, or other Markdown book projects as shareable PDFs.
Why use it?
It avoids manually combining chapters and formatting the final document, while keeping the Markdown files as the editable source.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the technical-writer plugin — 3 skills, 3 commands, 3 agents shipped together

Good fit Use it to export multi-chapter documentation, technical overviews, or other Markdown book projects as shareable PDFs.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add sjungling/sjungling-claude-plugins
Claude Code
/plugin install technical-writer

Made for: Claude Code.

Or install technical-writer, the plugin that ships this one along with the rest of its 3 skills, 3 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pdf-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/sjungling/sjungling-claude-plugins/pdf-generation/github.svg)](https://agentmods.dev/skills/sjungling/sjungling-claude-plugins/pdf-generation)
Your own site
<a href="https://agentmods.dev/skills/sjungling/sjungling-claude-plugins/pdf-generation"><img src="https://agentmods.dev/badge/skills/sjungling/sjungling-claude-plugins/pdf-generation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pdf-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/sjungling/sjungling-claude-plugins/pdf-generation"><img src="https://agentmods.dev/badge/skills/sjungling/sjungling-claude-plugins/pdf-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01551
Opus 5 $0.00039 $0.00776
Sonnet 5 $0.00015 $0.00310
Haiku 4.5 $0.00008 $0.00155

Measured 10d ago against content hash 4a3c386668e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

pdf-generation scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate-pdf.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

SCRIPT_PATH=$(find ~/.claude/plugins -path "*/pdf-generation/scripts/generate-pdf.sh" 2>/dev/null | head -1)
plugins/technical-writer/skills/pdf-generation/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PDF Book Generation

Overview

Converts a directory of ordered markdown chapters into a single, styled PDF book with table of contents, page numbers, and resolved inter-chapter links.

Core principle: The markdown files are the source of truth. The PDF is a derived artifact -- never edit the PDF directly.

When to Use

Automatically activates when:

  • A request to generate a PDF from markdown chapters is made
  • A technical-overview or similar multi-chapter doc set is ready for export
  • A printable or shareable version of documentation is needed

Prerequisites

Three tools must be installed before generation can proceed:

Tool Install command Purpose
pandoc brew install pandoc Markdown to HTML conversion
weasyprint uv tool install weasyprint HTML to PDF rendering
pango brew install pango Text layout (weasyprint dependency)

Before running the script, verify availability:

command -v pandoc >/dev/null 2>&1 || echo "Missing: pandoc (brew install pandoc)"
command -v weasyprint >/dev/null 2>&1 || echo "Missing: weasyprint (uv tool install weasyprint)"

If either tool is missing, install it and retry. The script itself checks for dependencies and exits with a clear error message.

How It Works

The generation pipeline has four stages:

  1. Collect -- Gather markdown files in order: README.md first, then 00-*.md through 99-*.md, then appendix-*.md
  2. Convert -- Pandoc stitches all files into a single HTML document with a generated table of contents
  3. Fix links -- Inter-chapter .md links (e.g., [architecture](01-architecture.md)) are rewritten to internal #anchor links so they work within the single document
  4. Render -- Weasyprint converts the styled HTML to PDF with print-optimized CSS

Usage

Run the generation script using $CLAUDE_PLUGIN_ROOT:

${CLAUDE_PLUGIN_ROOT}/skills/pdf-generation/scripts/generate-pdf.sh <input-dir> [output.pdf]

Read the full file on GitHub · 151 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 151 lines · 77 tokens per session scan B 4a3c386668e1

Subscribe to this mod's changes

pdf-generation is a skill published in the GitHub repository sjungling/sjungling-claude-plugins (13 stars, last pushed 27d ago), licensed MIT. It adds 77 tokens to every session and 1,551 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories