pdf · openai — Claude skill: generate and review PDFs
A skill for reading, creating and reviewing PDFs where layout matters. Useful when the agent builds a document and needs to see how it renders.
npx skills add openai/skills --skill pdf -a claude-codeWhat pdf does
The skill gives the agent a fixed workflow for PDF work. It renders pages to PNGs with pdftoppm and inspects them visually instead of trusting extracted text alone. New documents are generated with reportlab; pdfplumber or pypdf handles text extraction and quick checks. After every meaningful edit the pages get re-rendered so alignment, spacing and legibility can be verified.
File conventions are part of it too. Intermediate files go to tmp/pdfs/ and are deleted when done, final artifacts to output/pdf/. Filenames stay stable and descriptive. Dependencies are listed explicitly: the Python packages reportlab, pdfplumber and pypdf installed through uv, plus Poppler for rendering — brew install poppler on macOS, sudo apt-get install -y poppler-utils on Ubuntu and Debian. No environment variables are required.
Output quality is spelled out: consistent typography, margins and section hierarchy, no clipped text, overlapping elements or black squares where glyphs should be. ASCII hyphens only, and citations have to be human-readable. Worth installing if PDFs sit in your pipeline and you will actually check the render. For plain text extraction from simple files, skip it.
What it helps with
- build a PDF from a template and data programmatically
- check how a finished page looks before sending it
- pull text out of a third-party PDF for a quick comparison
- catch clipped text and broken tables
- keep intermediate files away from final ones
Example prompts for the agent
- Build a PDF report from this data and show me how the pages render
- Render output/pdf/report.pdf to PNGs and check the table alignment
- Extract the text from this PDF and tell me if words are hyphenated mid-line
How to install pdf
1Skills CLI (Vercel)
npx skills add openai/skills --skill pdf -a claude-code2Manually: put the files in place
~/.claude/skills/pdf/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pdf/
1Skills CLI (Vercel)
npx skills add openai/skills --skill pdf -a codex2Manually: put the files in place
.agents/skills/pdf/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/skills --skill pdf -a cursor2Manually: put the files in place
.cursor/skills/pdf/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/skills pdf2Manually: put the files in place
.github/skills/pdf/SKILL.md1Skills CLI (Vercel)
npx skills add openai/skills --skill pdf -a gemini-cli2Platform CLI
gemini skills install https://github.com/openai/skills --path skills/.curated/pdfManually: put the files in place
.devin/skills/pdf/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add openai/skills --skill pdf -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set20
The whole set →Other versions of pdf
Similar
Questions about pdf
How to install pdf in Claude?
Run npx skills add openai/skills --skill pdf -a claude-code. The skill file lands at ~/.claude/skills/pdf/SKILL.md.
What does the pdf skill do?
It gives the agent a PDF workflow: render pages to PNGs for visual review, generate documents with reportlab, extract text with pdfplumber or pypdf.
What do I need installed for it to work?
The Python packages reportlab, pdfplumber and pypdf, plus Poppler for rendering. On macOS that is brew install poppler; on Ubuntu and Debian, sudo apt-get install -y poppler-utils.
Source text
SKILL.md · Apache-2.0
--- name: "pdf" description: "Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as `reportlab`, `pdfplumber`, and `pypdf` for generation and extraction." --- # PDF Skill ## When to use - Read or review PDF content where layout and visuals matter. - Create PDFs programmatically with reliable formatting. - Validate final rendering before delivery. ## Workflow 1. Prefer visual review: render PDF pages to PNGs and inspect them. - Use `pdftoppm` if available. - If unavailable, install Poppler or ask the user to review the output locally. 2. Use `reportlab` to generate PDFs when creating new documents. 3. Use `pdfplumber` (or `pypdf`) for text extraction and quick checks; do not rely on it for layout fidelity. 4. After each meaningful update, re-render pages and verify alignment, spacing, and legibility. ## Temp and output conventions - Use `tmp/pdfs/` for intermediate files; delete when done. - Write final artifacts under `output/pdf/` when working in this repo. - Keep filenames stable and descriptive. ## Dependencies (install if missing) Prefer `uv` for dependency management. Python packages: ``` uv pip install reportlab pdfplumber pypdf ``` If `uv` is unavailable: ``` python3 -m pip install reportlab pdfplumber pypdf ``` System tools (for rendering): ``` # macOS (Homebrew) brew install poppler # Ubuntu/Debian sudo apt-get install -y poppler-utils ``` If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally. ## Environment No required environment variables. ## Rendering command ``` pdftoppm -png $INPUT_PDF $OUTPUT_PREFIX ``` ## Quality expectations - Maintain polished visual design: consistent typography, spacing, margins, and section hierarchy. - Avoid rendering issues: clipped text, overlapping elements, broken tables, black squares, or unreadable glyphs. - Charts, tables, and images must be sharp, aligned, and clearly labeled. - Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes. - Citations and references must be human-readable; never leave tool tokens or placeholder strings. ## Final checks - Do not deliver until the latest PNG inspection shows zero visual or formatting defects. - Confirm headers/footers, page numbering, and section transitions look polished. - Keep intermediate files organized or remove them after final approval.
© openai · Apache-2.0 · openai/skills