pdf

pdf is a skill for Claude Code, Codex from WrongStack/WrongStack. It costs 93 tokens per session (2,442 once invoked), scanned A, original, MIT.

A guide to creating, inspecting, combining, and rendering fixed-layout PDF files. PDFs are documents designed to keep their page appearance across screens and printers.

In plain words
What is it for?
Use it for reports, invoices, whitepapers, downloadable documents, and print-ready files.
Why use it?
It helps prevent blurry graphics, broken page breaks, incorrect margins, and inconsistent printed output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for reports, invoices, whitepapers, downloadable documents, and print-ready files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wrongstack/wrongstack/pdf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add WrongStack/WrongStack --skill pdf
Clone the repo
git clone --depth 1 https://github.com/WrongStack/WrongStack

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/wrongstack/wrongstack/pdf/github.svg)](https://agentmods.dev/skills/wrongstack/wrongstack/pdf)
Your own site
<a href="https://agentmods.dev/skills/wrongstack/wrongstack/pdf"><img src="https://agentmods.dev/badge/skills/wrongstack/wrongstack/pdf/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/wrongstack/wrongstack/pdf"><img src="https://agentmods.dev/badge/skills/wrongstack/wrongstack/pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,442 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.00093 $0.02442
Opus 5.5 $0.00037 $0.00977
Sonnet 5.5 $0.00019 $0.00488
Haiku 4.5 $0.00009 $0.00244

Measured 27d ago against content hash 8b14fb0bce3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pdf 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 27d ago.

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.

packages/core/skills/pdf/SKILL.md · 136 lines

How it starts

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

PDF Documents

Selection card

  • Task: Generate, assemble and inspect PDFs with real text, embedded fonts and correct page geometry.
  • Start: Fix page size, margins, header/footer needs, archival or print requirements and the source (HTML template, Typst/LaTeX, existing PDFs); read the current generator code and any print stylesheet.
  • Finish: the PDF has the expected page count and size, every font is embedded, text extracts in reading order, rendered pages were viewed, and any PDF/A claim has a validator report; checks below pass.

Overview

A PDF is a fixed-layout contract with printers and archives: verify page geometry, embedded fonts, real text (not pictures of text) and structure, because no reader reflows your mistakes. Generators: headless Chromium through Playwright or Puppeteer for HTML, Typst or LaTeX for typeset documents, pdf-lib for assembly (@playwright/test / Puppeteer; checked 2026-11-02: pdf-lib 1.17.1, Playwright 1.64.1, Puppeteer 25.16.0). Chromium writes RGB, non-archival PDFs; PDF/A, PDF/UA and press-ready PDF/X are separate, validated deliverables.

Rules

  1. Text stays text and vectors stay vectors. Never embed a screenshot of a page; pdftotext must return the content in reading order, and charts should render as SVG rather than canvas bitmaps.
  2. Embed every font. In pdffonts output each font needs "emb" yes; Type 3 fonts mean bitmap glyphs. pdf-lib's standard fonts encode WinAnsi only, so Turkish ğ ş ı İ, CJK or emoji throw "WinAnsi cannot encode"; register @pdf-lib/fontkit and embed a TTF or OTF with subset: true.
  3. Before page.pdf, wait for real readiness: navigate with waitUntil: 'networkidle', call page.emulateMedia({ media: 'print' }), await document.fonts.ready, and load lazy images eagerly. Set printBackground: true, and preferCSSPageSize: true when @page { size } should win over the page.pdf format option.
  4. Control breaks in CSS: @page { size: A4; margin: 18mm 16mm }, break-inside: avoid on rows, figures and cards, break-after: avoid on headings, thead { display: table-header-group } to repeat table headers, orphans/widows on paragraphs.
  5. Running headers and footers: Chromium 131+ supports @page margin boxes with counter(page) and counter(pages); Playwright and Puppeteer headerTemplate/footerTemplate are separate documents that need inline styles, an explicit font size, data-URL images and page margins large enough to show them.
  6. Structure and metadata: <html lang>, a <title> (it becomes the PDF Title), real heading hierarchy. Request tagged output and an outline (tagged: true, outline: true in current Playwright and Puppeteer) and confirm with pdfinfo.
  7. Archival and print are validated, not asserted: convert to PDF/A with LibreOffice export or Ghostscript plus an ICC profile, and validate with veraPDF; CMYK, bleed and PDF/X go to a prepress tool or printer spec.
  8. Manipulation preserves what it does not touch. pdf-lib merges, splits, stamps, fills and flattens forms; it does not render HTML, extract text or decrypt. Editing a signed PDF invalidates the signature; never strip encryption without the owner's authorization.

Read the full file on GitHub · 136 lines

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. 27d ago Changed · +38 lines · +40 tokens per session 8b14fb0bce3f
  2. 1mo ago Changed · +6 lines 4c67cd2a7cdc
  3. 1mo ago First seen · 92 lines · 53 tokens per session scan A 7f28b719e750

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository WrongStack/WrongStack (444 stars, last pushed today), licensed MIT. It adds 93 tokens to every session and 2,442 once invoked, about $0.0004 per session on Opus 5.5. 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-10-11.

Related

pdf compared with skills from other repositories

pdf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pdfWrongStack/WrongStackSkill444todayMITA93Claude Code, Codex
ai-provider-claude-visionagents-inc/skillsSkill281mo agoMITA38Claude Code, Codex
pdf-officialLiHongwei-cn/lihongwei-cnSkill51mo agoMITA53Claude Code, Codex
pdf-conversion-routerLiHongwei-cn/lihongwei-cnSkill51mo agoMITA50Claude Code, Codex
nature-readerLiHongwei-cn/lihongwei-cnSkill51mo agoMITA116Claude Code, Codex
2slides-ppt-generatorLiHongwei-cn/lihongwei-cnSkill51mo agoMITA64Claude Code, Codex
oo-api2pdfoomol-lab/skillsSkill4yesterdayMITC47Claude Code