ebook-writer: Skill for Claude Code

.claude/skills/pdf-builder/SKILL.md

pdf-builder is a skill for Claude Code from lowtidebuild/ebook-writer. It costs 0 tokens per session (810 once invoked), scanned A, original, Apache-2.0.

A document-building tool that converts Markdown chapters into a print-ready PDF book, including layout, navigation, code formatting, and images.

In plain words
What is it for?
Building a book with a cover, table of contents, page numbers, headers and footers, highlighted code blocks, embedded images, and English or Korean typography.
Why use it?
It removes the manual work of typesetting chapters and assembling a polished PDF.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is lowtidebuild/ebook-writer's own configuration. It tells Claude Code how to work on ebook-writer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ebook-writer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lowtidebuild/ebook-writer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lowtidebuild/ebook-writer/main/.claude/skills/pdf-builder/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lowtidebuild/ebook-writer

Made for: Claude Code.

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-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/lowtidebuild/ebook-writer/pdf-builder.svg)](https://agentmods.dev/skills/lowtidebuild/ebook-writer/pdf-builder)
Your own site
<a href="https://agentmods.dev/skills/lowtidebuild/ebook-writer/pdf-builder"><img src="https://agentmods.dev/badge/skills/lowtidebuild/ebook-writer/pdf-builder.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00810
Opus 5 $0.00000 $0.00405
Sonnet 5 $0.00000 $0.00162
Haiku 4.5 $0.00000 $0.00081

Measured 6d ago against content hash 9caff30b65c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pdf-builder scanned grade A with 0 findings 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/build_pdf.py), 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/pdf-builder/SKILL.md · 77 lines

How it starts

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

PDF Builder Skill

Purpose

Convert markdown chapters into a professionally typeset PDF book using WeasyPrint. This skill takes the authored chapter files (Markdown) and produces a print-ready PDF complete with cover page, table of contents, page numbers, headers/footers, syntax-highlighted code blocks, and properly placed images.

Script

scripts/build_pdf.py

Features

  • Cover page -- Rendered from an HTML template with title, subtitle, author, and date placeholders.
  • Table of contents -- Auto-generated from chapter headings (H1 and H2) with page references.
  • Page numbers -- Centered in the footer on every page except the cover.
  • Headers and footers -- Configurable via CSS @page rules; suppressed on the cover page.
  • Code highlighting -- Fenced code blocks are syntax-highlighted using Pygments (friendly theme).
  • Image placement -- Images are resolved to absolute paths so WeasyPrint can locate them, centered with constrained width.
  • Multilingual support -- --language flag switches between Korean (ko) and English (en) typographic defaults.

Dependencies

Package Purpose
weasyprint HTML/CSS to PDF rendering engine
markdown Markdown to HTML conversion
pymdown-extensions Extended Markdown syntax (superfences)
Pygments Syntax highlighting for code blocks

Install all at once:

.venv/bin/pip install weasyprint markdown pymdown-extensions Pygments

Reference Files

File Description
references/book_styles.css Professional book layout CSS
references/cover_template.html HTML template for the cover page

Usage

.venv/bin/python3 .claude/skills/pdf-builder/scripts/build_pdf.py \
  --chapters output/chapters/ko/ \
  --images output/images/ \
  --output output/final/book_ko.pdf \
  --language ko \
  --styles .claude/skills/pdf-builder/references/book_styles.css \
  --cover .claude/skills/pdf-builder/references/cover_template.html \
  --title "Book Title" \
  --author "Author Name" \
  --citations output/research/citations.json

Read the full file on GitHub · 77 lines

Files

What ships with it

3 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. 6d ago First seen · 77 lines · 0 tokens per session scan A 9caff30b65c2

Subscribe to this mod's changes

pdf-builder is a skill published in the GitHub repository lowtidebuild/ebook-writer (5 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 810 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.