Dev & Engineering

PDF Skill

Teaches an agent to read, split, merge, and create PDF files with Python libraries, covering the most common PDF operations in document automation.

54/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 81
Last updated
5mo ago
License
MIT
pdfpypdfpdfplumberreportlab
+4text-extractionpage-splittingpdf-mergingpython

What does this skill do, and when should you use it?

This is a lightweight reference skill located in the skill-optimizer repository's workbench examples (examples/workbench/pdf/references/pdf-skill/SKILL.md). It contains no scripts; instead, it instructs the agent to use three pre-installed Python libraries in /work/.venv — pypdf, pdfplumber, and reportlab — for reading, text extraction, page splitting, page filtering, and creating PDFs. Its key workflow principle: always inspect the actually extracted text before writing parsing regexes, never guess field formats from the task prompt. It also serves as the evaluated example for the skill-optimizer workbench, demonstrating positive cases (extraction, splitting, creation) and a negative case (the agent should not read this skill file for non-PDF tasks).

The skill runs as pure instructions: it guides the agent to call pypdf to read and write/split pages, pdfplumber to extract text, and reportlab to create new PDFs. SKILL.md provides four reusable code examples: extracting and joining text per page with PdfReader; parsing unstructured text line-by-line via prefixes ("Account:", "Total Revenue:", etc.) into a structured answer. including currency cleaning and a risk-flag list; filtering pages by page number into a new file; and filtering pages by extracted text content (containing "CUSTOMER COPY" but not "INTERNAL NOTES").

Good fit
  • Data workers who need to pull fields like account numbers, quarters, or revenue from statement-style PDFs into JSON
  • Operations or support staff who need to split a multi-page customer packet into customer-copy pages, excluding internal notes
  • Everyday office scenarios requiring splitting large PDFs by page or extracting selected pages into a new file
  • Developers generating new PDF reports from scratch via code
  • Agent developers writing deterministic evals for PDF tasks, who can use this example's suite and grader organization as a template

How do you install this skill?

Before you use it
  • Static review only; no code was executed, confidence is low.
  • The skill assumes pypdf/pdfplumber/reportlab are pre-installed in /work/.venv and will not run directly outside that workbench environment.
  • Examples do not address encrypted PDFs, scanned/OCR input, or corrupted files.
  • This is an eval demo skill, not a production PDF tool; no per-skill version or maintenance commitment is provided.
  • Content is English-only with no Chinese-language guidance.
Before you start
Your agent needs
  • Shell / CLI
  • Local filesystem
Install first
  • Python venv at /work/.venv
  • pypdf
  • pdfplumber
  • reportlab

The skill is an example file inside the skill-optimizer repository (fastxyz/skill-optimizer, MIT license) at examples/workbench/pdf/references/pdf-skill/SKILL.md. The repo supports multiple install methods overall, e.g. Claude Code: /plugin marketplace add fastxyz/skill-optimizer then /plugin install skill-optimizer@skill-optimizer; or the generic skills CLI: npx skills add fastxyz/skill-optimizer -a claude-code -y. To use only this PDF skill file, copy the SKILL.md into your client's skill directory; no dedicated install command for this single file is documented.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/fastxyz/skill-optimizer.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/examples/workbench/pdf/references/pdf-skill" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Extract account and total revenue from statement.pdf into answer.
  • Split customer-packet.pdf into a customer-copy-only file

Place the SKILL.md in your agent's skill directory and issue a PDF task directly, e.g. "Extract account and total revenue from statement.pdf into answer." or "Split customer-packet.pdf into a customer-copy-only file". The skill expects pypdf, pdfplumber, and reportlab installed in /work/.venv; in other environments, pip install them first. Core workflow: print the extracted text to confirm the actual format before writing field parsing logic.

What are this skill's strengths and limitations?

Pros
  • Zero script dependencies — a pure instruction skill, portable to nearly any agent client with filesystem and Python access
  • Complete, directly reusable example code covering the four high-frequency operations of extraction, parsing, splitting, and filtering
  • Enforces the "inspect text before parsing" discipline, greatly reducing regex failures based on guesswork
  • Ships with skill-optimizer eval cases to verify tasks complete reliably
Limitations
  • It is an eval demo skill with deliberately narrow coverage — no OCR, encrypted PDFs, or table reconstruction
  • Depends on the specific /work/.venv path; copying elsewhere requires manually installing three Python libraries
  • No version number or standalone maintenance notes; as an example file it may change as the repo evolves
  • SKILL.md offers no error handling or fallback guidance

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
PDF Skill this page 54 · Use with care ★ 81 5mo ago MIT
Golden PDF Build Tester 25 · Not recommended ★ 15k 25d ago MIT
Azure AI Text Analytics for Python ✓ Microsoft · Official 56 · Use with care ★ 2.7k 3mo ago MIT
Clinical ASR Flywheel: Environment Setup ✓ NVIDIA · Official 54 · Use with care ★ 3.6k 11d ago Apache-2.0
Azure AI Transcription for Python ✓ Microsoft · Official 49 · Use with care ★ 2.7k 3mo ago MIT

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
54/ 100 5-point scale 2.7 / 5
1Trust18 / 25 · 3.6/5

Skill is local-only PDF guidance (pypdf/pdfplumber/reportlab): no network calls, no credential handling, no destructive operations; least privilege is good. Deducted for missing data-flow disclosure, rollback guidance, and unverified publisher attribution.

2Reliability10 / 20 · 2.5/5

Examples are self-consistent and the guidance (inspect extracted text before writing parsers) is sound; static review only confirms the happy path. No handling of encrypted PDFs or partial extraction, no verified tests covering this skill path; capped at 10 by static calibration.

3Adaptability9 / 15 · 3.0/5

Trigger scenarios (read/create/split/merge PDFs) are clear and description matches content; deducted for undeclared non-fit boundaries, hardcoded dependency on /work/.venv with pre-installed packages, and no Chinese-language or mainland-China accessibility notes.

4Convention7 / 15 · 2.3/5

Repo-level MIT license, versioning and CI exist; the skill file itself has no version, changelog, FAQ, known-limitations, or maintenance ownership, and documentation layering is thin.

5Effectiveness6 / 15 · 2.0/5

Provides directly usable code snippets with marginal value in the inspect-then-parse workflow; no verified outputs and static cap of 7 applies, deducted for limited completeness evidence.

6Verifiability4 / 10 · 2.0/5

Snippets are auditable primary material with no marketing overclaim; deducted because CI tests do not cover this skill's key paths and no executed third-party evidence exists; static cap of 5.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Sep 10, 2026 Reviewed revision eeb37df98b70 Review evidence[1][2][3][4][5][6][7][8]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Does this skill make network calls or call external APIs?
No. Everything in SKILL.md is local Python processing of local files; no network is needed.
Can I reuse the parsing code from the examples directly?
Use them as structural references, but the skill explicitly requires inspecting the text extracted from your actual PDF before deciding parsing rules — do not copy the example prefix assumptions blindly.
How does it relate to the main skill-optimizer skill?
It is the evaluated example in the repo's workbench, demonstrating how PDF-task evals are organized; the main skill-optimizer skill authors and runs evals. Their capabilities are not interchangeable.
Can I use it outside the Docker workbench?
The instructions are portable, but you must provision a Python environment and pip install pypdf, pdfplumber, and reportlab yourself; adjust accordingly if /work/.venv doesn't exist.

More skills from this repository

All from fastxyz/skill-optimizer

Related skills