pdf

pdf is a skill for Claude Code, Codex from vibeinging/YiYi. It costs 27 tokens per session (2,778 once invoked), scanned A, original, Apache-2.0.

A toolset for working with PDF files, the fixed-layout documents commonly used for sharing and printing. It supports reading, extracting text, creating professional PDFs, and filling forms.

In plain words
What is it for?
Use it to extract text, identify table content, create reports as PDFs, convert extracted material into other documents, or fill PDF forms.
Why use it?
It avoids having to process PDF contents or build PDF documents by hand.

Skill for Claude CodeCodex

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

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.

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

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/vibeinging/yiyi/pdf.svg)](https://agentmods.dev/skills/vibeinging/yiyi/pdf)
Your own site
<a href="https://agentmods.dev/skills/vibeinging/yiyi/pdf"><img src="https://agentmods.dev/badge/skills/vibeinging/yiyi/pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00027 $0.02778
Opus 5 $0.00014 $0.01389
Sonnet 5 $0.00005 $0.00556
Haiku 4.5 $0.00003 $0.00278

Measured 6d ago against content hash 76d35554daa5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/check_bounding_boxes.py, scripts/check_fillable_fields.py, scripts/convert_pdf_to_images.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

app/src-tauri/skills/pdf/SKILL.md · 273 lines

How it starts

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

PDF Processing

Reading & Extracting Text

Use Python's pypdf via run_python_script. If pypdf isn't installed, call pip_install(["pypdf"]) first.

# extract_pdf.py
import sys
from pypdf import PdfReader

reader = PdfReader(sys.argv[1])
for i, page in enumerate(reader.pages, 1):
    text = page.extract_text() or ""
    print(f"=== Page {i} ===")
    print(text)

Run with run_python_script(script_path="extract_pdf.py", args=["/path/to/document.pdf"]). Then summarize / analyze / answer questions about the captured stdout.

For Tables in PDFs

  1. Extract raw text with the script above.
  2. Parse the tabular structure from the text output (look for repeating column-aligned rows).
  3. If the user wants it as a spreadsheet, write a Python script that uses openpyxl to emit .xlsx (see the xlsx skill).

Creating Professional PDFs

Use the create_pdf.py script to generate beautiful, content-rich PDF documents.

Step 1: Build a JSON structure file

Create a JSON file describing the document content. Be thorough and detailed — include rich content, not just bullet points.

{
  "title": "Document Title",
  "subtitle": "A detailed subtitle explaining the document purpose",
  "author": "Author Name",
  "date": "2024-01-15",
  "header": "Document Title — Confidential",
  "footer": "© 2024 Company Name",
  "theme": "professional",
  "page_size": "A4",
  "body": [
    { "type": "toc" },
    { "type": "heading", "level": 1, "text": "Introduction" },
    { "type": "paragraph", "text": "Write full, detailed paragraphs here. Avoid short one-liners. Each paragraph should be 3-5 sentences with substantive content that provides real value to the reader." },
    ...
  ]
}

Step 2: Run the script

python3 scripts/create_pdf.py structure.json output.pdf

Available Themes

Theme Style
professional Navy + blue accents, corporate feel
minimal Black + red accents, clean typography
modern Purple + pink accents, contemporary

Read the full file on GitHub · 273 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. 6d ago First seen · 273 lines · 27 tokens per session scan A 76d35554daa5

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository vibeinging/YiYi (51 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 27 tokens to every session and 2,778 once invoked, about $0.0001 per session on Opus 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-08-30.