Skill1 starsChanged 3 months agoMITView on GitHub
Work with PDF files. Use when the user mentions a PDF and wants to extract text or tables, fill form fields, merge, split, rotate, encrypt, or decrypt pages, stamp a watermark, generate a PDF, or OCR a scan — phrases like "extract the text from this PDF", "fill out this form", "merge these PDFs", "add a watermark". Not for converting documents between office formats (docx, xlsx have their own skills) or for rendering PDFs in a browser.
- Installs packages
197 other projects use a version of this.
Adopted by
Most recently taken up by
- NousResearch/hermes-agenttheir own version, first seen Nov 13, 2026
- invergent-ai/surogatestheir own version, first seen Oct 5, 2026
- magicpro97/vibeflowtheir own version, first seen Oct 4, 2026
- holon-run/holontheir own version, first seen Oct 4, 2026
- HanksChen0110/skillstheir own version, first seen Oct 3, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
Used with
Projects with it also use context7-efficient, file-reading and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hfzarslanSkillcontext7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
Also in 5 projects that use this
SeifBenayedSkillfile-reading
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
Also in 6 projects that use this
SeifBenayedSkillpdf-reading
Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.
Also in 6 projects that use this
yf8578Skillmarket-research-reports
Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.
Also in 7 projects that use this
OpenAISkillmigrate-to-codex
Migrate supported instruction files, skills, agents, and MCP config into Codex project and global files.
Also in 4 projects that use this
jjyaoaoSkillgift-evaluator
The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.
Also in 4 projects that use this
Other versions197 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 197
- NousResearch/hermes-agent★ 267ksame name
- anthropics/skills★ 199ksame name
- shareAI-lab/learn-claude-code★ 78ksame name
- openai/skills★ 28ksame name
- zebbern/claude-code-guide★ 4.6ksame name
- awslabs/agentcore-samples★ 3.4ksame name
- jjyaoao/HelloAgents★ 3.2ksame name
- xstongxue/best-skills★ 2.9ksame name
- anthropics/claude-agent-sdk-demos★ 2.8ksame name
- K-Dense-AI/claude-scientific-writer★ 2.4ksame name
187 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- blast-radiusSkill
- broSkill
- codebase-designSkill
- code-reviewSkill
- confluence-workflowSkill
- creating-a-pr-mrSkill
- defuddleSkill
- docxSkill
- domain-modelingSkill
- engineering-principlesSkill
- forgejo-cliSkill
- frontend-designSkill
- gh-cliSkill
- git-conventional-commitsSkill
- git-working-agreementSkill
- glab-cliSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- howSkill
- improve-codebase-architectureSkill
- jira-workflowSkill
- json-canvasSkill
- k8s-opsSkill
- obsidian-basesSkill
- obsidian-cliSkill
- obsidian-markdownSkill
- openspec-workflowSkill
- pptxSkill
- prototypeSkill
- researchSkill
- setup-matt-pocock-skillsSkill
- skill-minerSkill
- technical-writingSkill
- theme-factorySkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- unslopSkill
- wayfinderSkill
- whySkill
- writing-for-agentsSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Read values back with PdfReader(out).get_fields() and render: pdftoppm -png -r 100 out.pdf check — confirm the PNG is non-trivial in size …
- Distinctive: line 63
Create a stamp page (one page, same size as the target) with reportlab, then overlay it:
- Distinctive: line 95
Never ship a PDF you haven't opened.
- Distinctive: line 106
Check availability first, then install what's missing:
- Distinctive: line 116
Never assume anything is preinstalled — verify with the checks above and report what you installed.
“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working with PDFs
Pick the library by job, not by preference:
| Task | Tool |
| Read text preserving layout | pdftotext -layout (poppler CLI) |
| Programmatic text + tables, per-character geometry | pdfplumber |
| Page surgery: merge, split, rotate, stamp, encrypt | pypdf (bundled scripts/pdf_ops.py) |
| Inspect / fill AcroForm fields | bundled scripts/inspect_form.py / fill_form.py |
| Generate PDFs | reportlab (canvas for pixel control, platypus for flowing documents) |
| Rasterize for visual checks | pdftoppm (poppler), or pdf2image + pytesseract for OCR |
Read and extract
pdftotext -layout in.pdf out.txtkeeps column alignment; plainpdftotextreflows and is better for prose. Both are poppler CLI tools.pdfplumberwhen you need positions or tables.page.extract_text(layout=True)approximates the CLI layout mode;page.extract_tables()finds ruled tables. For tables without ruling lines passpage.extract_tables({"vertical_strategy": "text", "horizontal_strategy": "text"})— the defaultlinesstrategy returns[]when the PDF has no drawn cell borders.extract_tablereturns list-of-lists; wrap inpandas.DataFrame(...)yourself (pandas is optional).- Rotated or diagonal text (stamps, landscape pages) extracts per-character or out of order. When checking for a watermark, strip whitespace from
pdftotextoutput before searching, or read back with pypdf per page.
Page operations
The bundled scripts/pdf_ops.py wraps the pypdf calls (merge, split, rotate, encrypt, decrypt, watermark stamp, info as JSON). Use it first; drop to pypdf directly for anything finer.
pypdf gotchas:
PdfReader.is_encryptedthenreader.decrypt(password)before any page access;decryptreturns a truthy password type — check it, a wrong password yieldsPasswordType.NOT_DECRYPTED.writer.encrypt(user_password=..., owner_password=...)defaults to RC4-128. Passalgorithm="AES-256"for modern encryption (writes /V 5).page.rotate(90)accumulates into/Rotate; multiples of 90 only.writer.append(reader)copies pages plus outline/named destinations;add_pagecopies bare pages.
Forms (AcroForm)
Workflow: inspect → fill → verify by reading values back AND by rendering pages to images.
scripts/inspect_form.py form.pdf— JSON of every field: fully-qualified name, type (text/checkbox/radio/combobox/listbox/signature), current value, options (choice entries or button on-states), rectangle, required, read-only. Parent/child hierarchies are flattened; radio groups collapse to one record with their on-states listed as options.scripts/fill_form.py form.pdf "full_name=Ada Lovelace" priority=High -o out.pdf(or--json values.json; checkboxes accepttrue/false). It reports a JSON summary of set vs missing fields and exits 1 when a requested field is missing. Signature fields are never filled.- Read values back with
PdfReader(out).get_fields()and render:pdftoppm -png -r 100 out.pdf check— confirm the PNG is non-trivial in size and dimensions matchpdfinfo.
Key behavior of update_page_form_field_values (verified against pypdf 6.x):
- It regenerates appearance streams for text (
/Tx) and choice (/Ch) fields on every update, so filled values are visible in any viewer. - Pass
auto_regenerate=Falseto clear/NeedAppearanceson the AcroForm. The defaultTruesets the flag and asks the viewer to regenerate appearances — some viewers ignore that and show blank fields, so always clear it. - There is no
PdfWriter.flatten()method. Flattening meansupdate_page_form_field_values(..., flatten=True): the appearance is stamped into the page content stream, but the widget annotations remain. If a job truly needs annotation-free output, rebuild the page with a rasterized or re-drawn copy. - Checkbox values must be the on-state name from
/AP /N(usually/Yesor/On, reportlab uses/Yes) or/Off; a value that matches no on-state silently falls back to/Off.
Create with reportlab
- Canvas (
reportlab.pdfgen.canvas) for absolute control:drawString,rect,line, andcanvas.acroForm.textfield(...)/.choice(...)/.checkbox(...)/.radio(...)for form widgets. - Platypus (
SimpleDocTemplate+ flowables) for flowing documents with wrapped paragraphs, tables, and page breaks. - Colors passed to acroForm widgets must be
Colorinstances (reportlab.lib.colors.black,Color(0.95,0.95,0.95)); bare floats that worked in old reportlab now raiseAttributeError. - Draw at least one string on the canvas before adding form widgets; a page with widgets but no content can fail with a "forward reference to 'Page1'" error at save time.
- Base-14 fonts (Helvetica, Times, Courier) are single-byte encoded. Characters outside Latin-1/WinAnsi come out as wrong glyphs —
H₂SO₄renders asHnSOn(a black box is the other common symptom). Superscript digits²³¹survive because they are Latin-1. For sub/superscripts use Paragraph markupH<sub>2</sub>SO<sub>4</sub>,x<super>2</super>, or draw the smaller font at a manual offset; never rely on Unicode sub/superscript codepoints with base-14 fonts. - Non-Latin text (Cyrillic, Greek, CJK) needs a registered TrueType font:
pdfmetrics.registerFont(TTFont("Ar", "Arial.ttf"))thensetFont("Ar", 14). The TTF embeds as a subset and text extracts correctly afterward. - To build an editable form field for later filling:
canvas.acroForm.textfield(name="full_name", x=..., y=..., width=..., height=..., ...). Note reportlab's y origin is the page bottom.
Watermarks
Create a stamp page (one page, same size as the target) with reportlab, then overlay it:
from pypdf import PdfReader, PdfWriter
stamp = PdfReader("stamp.pdf").pages[0]
writer = PdfWriter(clone_from="base.pdf")
for page in writer.pages:
page.merge_page(stamp)
writer.write("out.pdf")merge_page pastes at 1:1 using the stamp's own coordinates; use merge_transformed_page(stamp, Transformation().scale(...)) to scale or reposition. Set the stamp fill with alpha (setFillColorRGB(0.7,0.7,0.7, alpha=0.5)).
OCR scanned PDFs
Rasterize with pdf2image, then OCR with pytesseract:
from pdf2image import convert_from_path
import pytesseract
pages = convert_from_path("scan.pdf", dpi=300)
text = "\n".join(pytesseract.image_to_string(p) for p in pages)Caveats:
pdf2imageshells out to poppler'spdfinfo/pdftoppm— they must be on PATH or you getPDFInfoNotInstalledError: Unable to get page count. Passpoppler_path=if poppler lives outside PATH.- OCR quality tracks scan resolution: 300 dpi for body text, 400+ for small print; low-dpi scans misread digits and confusable glyphs. Check a rendered page image first — if a human can't read it, tesseract won't either.
pytesseractneeds thetesseractbinary installed separately (it is not a Python dependency). Iftesseractis missing from PATH, tell the user and stop rather than silently skipping OCR.
Verify the output
Never ship a PDF you haven't opened. Loop:
pdfinfo out.pdf— page count, page size, encryption status; compare against expectation.pdftotext out.pdf -(add-layoutfor forms/tables) — confirm the content that must be visible in plain readers is actually there.pdftoppm -png -r 100 out.pdf page— rasterize; confirm each page renders, the file is a plausible size (a blank or broken page is a few KB), and dimensions match the page size at that dpi. Read the image back to check it isn't blank when content was expected.- For generated form output, re-read field values with pypdf and confirm appearance streams carry the values (a
Tjwith the filled text in/AP /N), or trustpdftotextshowing the values.
Note pdftoppm may print a harmless Fontconfig error on minimal systems; the PNG is still written — check the file, not the exit banner.
Dependencies
Check availability first, then install what's missing:
command -v pdftotext pdfinfo pdftoppm tesseract # poppler + OCR binaries
python3 -c "import pypdf, pdfplumber, reportlab" # python libraries- Python:
pip install pypdf pdfplumber reportlab pdf2image pytesseract(into a venv; all pure-Python except pdfplumber's optional PIL dependency, which pip resolves). - Poppler CLI (
pdftotext,pdfinfo,pdftoppm,pdfimages): system packagepoppler-utils(Debian/Ubuntu),poppler(macOS brew, nixpoppler-utils). - OCR:
tesseractbinary plus language packs (tesseract-ocr-engon Debian);pdfimages -png in.pdf prefixextracts embedded scan images when OCR-ing a single page region is better than the full raster. - Never assume anything is preinstalled — verify with the checks above and report what you installed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

