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.
npx agentmods add skills/fareedkhan-dev/claude-code-from-scratch/pdfnpx skills add FareedKhan-dev/claude-code-from-scratch --skill pdfgit clone --depth 1 https://github.com/FareedKhan-dev/claude-code-from-scratchWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.00789 |
| Opus 5 | $0.00016 | $0.00394 |
| Sonnet 5 | $0.00006 | $0.00158 |
| Haiku 4.5 | $0.00003 | $0.00079 |
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 3d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Skill
When to use this skill
Load when the user asks you to:
- Extract text or tables from a PDF
- Merge or split PDF files
- Fill in a PDF form
- Add watermarks or annotations
- Convert PDF to another format
- Search for content inside a PDF
Library decision tree
Need to extract text from a normal (not scanned) PDF?
→ pdfplumber (best text + table extraction)
Need to manipulate pages (merge, split, rotate)?
→ pypdf (formerly PyPDF2)
Need to fill form fields?
→ pypdf with writer.update_page_form_field_values()
PDF is scanned (images of pages, no selectable text)?
→ pytesseract + pdf2image (OCR pipeline)
Need to create a PDF from scratch?
→ reportlab or fpdf2
Install
pip install pdfplumber pypdf
# For OCR:
pip install pytesseract pdf2image
# Also requires: tesseract-ocr (system package) and poppler-utils
Extract text — pdfplumber
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
for page in pdf.pages:
text = page.extract_text()
if text:
print(text)
Extract tables — pdfplumber
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
for page in pdf.pages:
tables = page.extract_tables()
for table in tables:
for row in table:
print(row)
Merge PDFs — pypdf
from pypdf import PdfWriter
writer = PdfWriter()
for filename in ["part1.pdf", "part2.pdf", "part3.pdf"]:
writer.append(filename)
with open("merged.pdf", "wb") as f:
writer.write(f)
Split PDF — pypdf
from pypdf import PdfReader, PdfWriter
reader = PdfReader("document.pdf")
for i, page in enumerate(reader.pages):
writer = PdfWriter()
writer.add_page(page)
with open(f"page_{i+1}.pdf", "wb") as f:
writer.write(f)
Extract specific pages — pypdf
from pypdf import PdfReader, PdfWriter
reader = PdfReader("document.pdf")
writer = PdfWriter()
for page_num in [0, 2, 4]: # 0-indexed
writer.add_page(reader.pages[page_num])
with open("selected.pdf", "wb") as f:
writer.write(f)
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.
- 3d ago First seen · 136 lines · 32 tokens per session scan A 328d56e1a61e
pdf is a skill published in the GitHub repository FareedKhan-dev/claude-code-from-scratch (294 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 789 once invoked, about $0.0002 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.
Other skills, from other repositories
Read, create, inspect, merge, split, rotate, encrypt, fill, and validate PDF files. Use when the user asks to work with a PDF or convert supported Markdown into a polished PDF in AstrBot.
document-parsing
Extract readable Markdown from local Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and text-based PDF files using the preinstalled AnyDoc runtime.
nano-pdf
Edit PDFs with natural-language instructions using the nano-pdf CLI.
presenton
Generate AI-powered presentations locally using Presenton. Use when: (1) User asks to create a presentation or slideshow, (2) User wants to convert a document or prompt into slides, (3) User needs PPTX/PDF export with AI-generated content.
pdf-manipulation
Manipulate PDF files including merge, split, extract, redact, convert, and secure workflows.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…