PDF Skill
Tech Stack Target / Version: PDF extraction, OCR-capable tooling, conversion scripts, and Acrobat-compatible review workflows.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
When to use
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- Read or review PDF content where layout and visuals matter.
- Create PDFs programmatically with reliable formatting.
- Validate final rendering before delivery.
Workflow
- 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.
- Use
reportlab to generate PDFs when creating new documents.
- Use
pdfplumber (or pypdf) for text extraction and quick checks; do not rely on it for layout fidelity.
- 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.
Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.
- GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the
workflow in project instructions when folder discovery is unavailable.
- Claude Code: keep the folder in a local skills directory or a compatible plugin source.
- Codex: install or sync the folder into
$CODEX_HOME/skills/pdf and restart Codex after major changes.
MCP Availability And Fallback
Preferred MCP Server: None required
- Fallback prompt: "Use the PDF Skill skill without MCP. Rely on its local instructions, bundled resources, standard shell or editor tools, and direct verification. Show the evidence used before concluding."
- Do not claim an MCP operation was used when the active host does not expose it.
- Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
Anti-Patterns
- Writing for the author instead of the reader: It bakes in unstated context and leaves the actual audience unsure what to do next.
- Skipping concrete examples or commands: Abstract guidance is easy to approve and hard to apply correctly.
- Letting links, screenshots, or versions drift: Polished formatting does not help if the instructions are no longer true.
Verification Protocol
Before claiming the pdf workflow succeeded:
- Pass/fail: The request matches this skill's documented activation boundary.
- Pass/fail: Required inputs, dependencies, and safety checks were resolved or reported as blockers.
- Pass/fail: The narrowest relevant workflow was completed without inventing unavailable tools or results.
- Pass/fail: Output was checked with the most relevant local test, inspection, render, or source evidence.
- Pressure test: Repeat the decision with the preferred integration unavailable and confirm the fallback remains safe and actionable.
- Success metric: The result, evidence, and any unverified limitation are explicit enough for another agent to reproduce.
Related Skills
1---2name: pdf3description: 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.4---5# PDF Skill
6
7> Tech Stack Target / Version: PDF extraction, OCR-capable tooling, conversion scripts, and Acrobat-compatible review workflows.
8
9- Leverage native parallel subagent dispatch and 200k+ context windows where available.
10
11
12## When to use
13Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
14
15- Read or review PDF content where layout and visuals matter.
16- Create PDFs programmatically with reliable formatting.
17- Validate final rendering before delivery.
18
19## Workflow
201. Prefer visual review: render PDF pages to PNGs and inspect them.
21 - Use `pdftoppm` if available.
22 - If unavailable, install Poppler or ask the user to review the output locally.
232. Use `reportlab` to generate PDFs when creating new documents.
243. Use `pdfplumber` (or `pypdf`) for text extraction and quick checks; do not rely on it for layout fidelity.
254. After each meaningful update, re-render pages and verify alignment, spacing, and legibility.
26
27## Temp and output conventions
28- Use `tmp/pdfs/` for intermediate files; delete when done.
29- Write final artifacts under `output/pdf/` when working in this repo.
30- Keep filenames stable and descriptive.
31
32## Dependencies (install if missing)
33Prefer `uv` for dependency management.
34
35Python packages:
36```
37uv pip install reportlab pdfplumber pypdf
38```
39If `uv` is unavailable:
40```
41python3 -m pip install reportlab pdfplumber pypdf
42```
43System tools (for rendering):
44```
45# macOS (Homebrew)
46brew install poppler
47
48# Ubuntu/Debian
49sudo apt-get install -y poppler-utils
50```
51
52If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.
53
54## Environment
55No required environment variables.
56
57## Rendering command
58```
59pdftoppm -png $INPUT_PDF $OUTPUT_PREFIX
60```
61
62## Quality expectations
63- Maintain polished visual design: consistent typography, spacing, margins, and section hierarchy.
64- Avoid rendering issues: clipped text, overlapping elements, broken tables, black squares, or unreadable glyphs.
65- Charts, tables, and images must be sharp, aligned, and clearly labeled.
66- Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes.
67- Citations and references must be human-readable; never leave tool tokens or placeholder strings.
68
69## Final checks
70- Do not deliver until the latest PNG inspection shows zero visual or formatting defects.
71- Confirm headers/footers, page numbering, and section transitions look polished.
72- Keep intermediate files organized or remove them after final approval.
73
74<!-- MCP:START -->
75
76<!-- PORTABILITY:START -->
77## Cross-Client Portability
78
79This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.
80
81- GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the
82 workflow in project instructions when folder discovery is unavailable.
83- Claude Code: keep the folder in a local skills directory or a compatible plugin source.
84- Codex: install or sync the folder into
85 `$CODEX_HOME/skills/pdf` and restart Codex after major changes.
86
87<!-- PORTABILITY:END -->
88
89## MCP Availability And Fallback
90
91Preferred MCP Server: None required
92
93- Fallback prompt: "Use the PDF Skill skill without MCP. Rely on its local instructions, bundled resources, standard shell or editor tools, and direct verification. Show the evidence used before concluding."
94- Do not claim an MCP operation was used when the active host does not expose it.
95- Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
96
97<!-- MCP:END -->
98
99## Anti-Patterns
100
101- Writing for the author instead of the reader: It bakes in unstated context and leaves the actual audience unsure what to do next.
102- Skipping concrete examples or commands: Abstract guidance is easy to approve and hard to apply correctly.
103- Letting links, screenshots, or versions drift: Polished formatting does not help if the instructions are no longer true.
104
105## Verification Protocol
106
107Before claiming the `pdf` workflow succeeded:
108
1091. Pass/fail: The request matches this skill's documented activation boundary.
1102. Pass/fail: Required inputs, dependencies, and safety checks were resolved or reported as blockers.
1113. Pass/fail: The narrowest relevant workflow was completed without inventing unavailable tools or results.
1124. Pass/fail: Output was checked with the most relevant local test, inspection, render, or source evidence.
1135. Pressure test: Repeat the decision with the preferred integration unavailable and confirm the fallback remains safe and actionable.
1146. Success metric: The result, evidence, and any unverified limitation are explicit enough for another agent to reproduce.
115
116## Related Skills
117
118- [documentation-authoring](../documentation-authoring/SKILL.md): Use it when the workflow also needs drafting structured technical or product documents.
119- [documentation-patterns](../documentation-patterns/SKILL.md): Use it when the workflow also needs reusable documentation structures and templates.
120- [documentation-quality](../documentation-quality/SKILL.md): Use it when the workflow also needs documentation review standards and quality gates.
121- [documentation-verification](../documentation-verification/SKILL.md): Use it when the workflow also needs final documentation validation before publishing.