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.
What this skill does
# 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 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. ## 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. <!-- PORTABILITY:START --> ## Verification Protocol Before claiming "skill applied successfully": 1. Pass/fail: The PDF artifact type, target format, and required output fidelity are stated before editing. 2. Pass/fail: MCP availability is checked and the native automation fallback path is named when MCP is absent. 3. Pass/fail: The produced file or formula is opened, parsed, rendered, or otherwise validated locally. 4. Pressure-test scenario: Apply the workflow to a file with formatting, metadata, or conversion edge cases and verify nothing important is lost. 5. Success metric: Zero unverified document claims; the artifact itself is the evidence. ## Cross-Client Portability This skill is written to stay usable across GitHub Copilot, Claude Code, Codex, and Gemini CLI. - GitHub Copilot: keep the folder in a Copilot-visible skill or plugin path, or wrap the workflow as project instructions if the host does not support portable skill folders directly. - Claude Code: keep the folder in a local skills directory or a compatible plugin or marketplace source. - Codex: install or sync the folder into `$CODEX_HOME/skills/<skill-name>` and restart Codex after major changes. - Gemini CLI: this repository generates a project command named `/skills:pdf` from this skill. Rebuild commands with `python scripts/export-gemini-skill.py pdf` and then run `/commands reload` inside Gemini CLI. <!-- PORTABILITY:END --> <!-- MCP:START --> ## MCP Availability And Fallback Preferred MCP Server: None required - Fallback prompt: "Use the PDF Skill skill without MCP. Rely on the local `SKILL.md`, bundled references or scripts, and manual verification. Show the exact commands, evidence, and final checks you used before concluding." - If the current host does not expose a matching server, use the bundled references, scripts, native toolchain, and manual workflow already described in this skill. - Treat direct local verification, rendered output, logs, tests, or screenshots as the fallback evidence path before completion. <!-- MCP:END --> ## Related Skills - [documentation-authoring](../documentation-authoring/SKILL.md): Use it when the workflow also needs drafting structured technical or product documents. - [documentation-patterns](../documentation-patterns/SKILL.md): Use it when the workflow also needs reusable documentation structures and templates. - [documentation-quality](../documentation-quality/SKILL.md): Use it when the workflow also needs documentation review standards and quality gates. - [documentation-verification](../documentation-verification/SKILL.md): Use it when the workflow also needs final documentation validation before publishing.
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.