Skill4 starsChanged 6 days agoMITView on GitHub
Read, create, inspect, render, and verify PDF files where visual layout matters, including fillable AcroForms. Use Poppler rendering plus Python tools such as reportlab, pdfplumber, and pypdf for generation and extraction.
- Installs packages
195 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
- xfstudio/skillstheir own version, first seen Nov 29, 2026
- autohandai/community-skillstheir own version, first seen Nov 29, 2026
- alexj11324/Mikkatheir own version, first seen Nov 29, 2026
- holon-run/holontheir own version, first seen Nov 29, 2026
- liueggy/my_mini_skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use gift-evaluator, Podcast Generate and 10 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.
dav-niu474Skillgift-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 5 projects that use this
dav-niu474SkillPodcast Generate
Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).
Also in 5 projects that use this
huang-x-hSkillVideo Generation
Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.
Also in 6 projects that use this
huang-x-hSkillVLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.
Also in 6 projects that use this
Liang-MHSkillstock_analysis
获取 A 股、基金和港股的实时行情和技术分析数据
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
- +1 more from huang-x-h
- +2 more from dav-niu474
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- openai/skills★ 27k74% same
- JetBrains/skills★ 38668% same
- julianromli/ai-skills★ 24474% same
- z91772524-ai/pojia-next-mac★ 3974% same
- EthanYoQ/Skill-hub★ 1274% same
- jnotsknab/mux-swarm★ 926% same
- 0mlkrizzz655335v/claude-skills-zh★ 292% same
Wrote their own version · 188
- NousResearch/hermes-agent★ 267ksame name
- anthropics/skills★ 202ksame name
- shareAI-lab/analysis_claude_code★ 80ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- spinabot/brigade★ 11ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- OpenBMB/PilotDeck★ 5ksame name
- nextlevelbuilder/goclaw★ 3.7ksame name
- awslabs/amazon-bedrock-agentcore-samples★ 3.6ksame name
- awslabs/agentcore-samples★ 3.6ksame name
178 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 repository14 other files it gives its agents.
- add-index-siteSkill
- add-personal-skillSkill
- import-html-articleSkill
- maintain-galok-contentSkill
- build-browser-desktopSkill
- cloudflare-file-claimsSkill
- craft-animationSkill
- excel-live-controlSkill
- html-report-dashboardSkill
- mobile-app-deliverySkill
- PresentationsSkill
- ship-software-productSkill
- SpreadsheetsSkill
- web-data-collectionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 14 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 181 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Read or review PDF content where layout and visuals matter.
- Distinctive: line 11
Create PDFs programmatically with reliable formatting.
- Distinctive: line 17
Prefer visual review: render PDF pages to PNGs and inspect them.
- Very specific: line 18
Use pdftoppm from the bundled runtime or system Poppler when available.
- Distinctive: line 19
If unavailable, install Poppler or ask the user to review the output locally.
- Very specific: line 20
Use reportlab to generate PDFs when creating new documents.
- Very specific: line 21
Use pdfplumber or pypdf for text extraction and quick checks.
- Distinctive: line 22
After each meaningful update, re-render pages and verify alignment, spacing, and legibility.
- Very specific: line 42
Keep the result interactive by default.
- Very specific: line 88
Use tmp/pdfs/ for intermediate files.
- Very specific: line 89
Write final artifacts under output/pdf/ when working in this repo.
- Distinctive: line 90
Keep filenames stable and descriptive.
- Distinctive: line 94
Prefer the Codex bundled workspace/runtime dependencies when available.
- Distinctive: line 99
If a dependency is missing, install only what is needed.
- Very specific: line 107
If uv is unavailable:
- Distinctive: line 123
If installation is not possible in this environment, tell the user which dependency is missing and how to install it locally.
- Distinctive: line 127
No required environment variables.
- Distinctive: line 138
Avoid rendering issues: clipped text, overlapping elements, broken tables, black squares, or unreadable glyphs.
- Distinctive: line 140
Use ASCII hyphens only. Avoid U+2011 and other Unicode dashes.
- Distinctive: line 145
Do not deliver until the latest PNG inspection shows zero visual or formatting defects.
- Distinctive: line 147
Keep intermediate files organized or remove them after final approval.
“Common” is measured: kept by at least 6 in 10 of the 181 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
PDF Skill
When To Use
- Read or review PDF content where layout and visuals matter.
- Create PDFs programmatically with reliable formatting.
- Fill and validate interactive PDF forms.
- Validate final rendering before delivery.
Workflow
- Prefer visual review: render PDF pages to PNGs and inspect them.
- Use
pdftoppmfrom the bundled runtime or system Poppler when available. - If unavailable, install Poppler or ask the user to review the output locally.
- Use
- Use
reportlabto generate PDFs when creating new documents. - Use
pdfplumberorpypdffor text extraction and quick checks; do not rely on text extraction for layout fidelity. - After each meaningful update, re-render pages and verify alignment, spacing, and legibility.
Preserve Chinese, Japanese, and Korean text
For an editable HTML report and its PDF, print the same HTML with its print styles and fonts when browser printing is available. If the fallback draws text with PyMuPDF and embeds a Noto CJK OpenType/CFF face, start from the original face for each weight. When subsetting with FontTools before embedding, retain the glyph IDs. Its default subset renumbers glyphs while the CFF character IDs retain their original values. The PDF can then extract the intended text and paint unrelated glyphs or blank space.
from fontTools import subset
subsetter = subset.Subsetter(options=subset.Options(retain_gids=True))
subsetter.populate(text=all_drawn_text) # Include headings, labels and page numbers.
subsetter.subset(face)For this PyMuPDF fallback, save and embed the resulting face. Poppler can display the intended text even when other viewers paint the wrong glyphs. Reopen the final PDF in PyMuPDF, render a page containing each font and weight with page.get_pixmap(), and read a representative source phrase in the saved images. If any characters differ from the source, regenerate with the original face or an embedded TrueType font covering the text and check the images again.
Fill And Validate AcroForms
Visual review alone is not a correctness check for a fillable PDF. A page /Widget annotation can render a value from its appearance stream while the canonical /AcroForm/Fields tree is missing or contains a stale value.
- Keep the result interactive by default; set
flatten=Trueonly when the user explicitly requests a completed, static form. Preserve the source PDF, and do not flatten a signed PDF without an explicit workflow decision. - Inspect both representations before filling: enumerate fields from
reader.get_fields()and/Widgetannotations from every page's/Annots, following/Parentand/Kids. If a widget and a canonical field have the same name but are distinct objects with no/Parentrelationship, do not callreattach_fields()blindly: it can create a second top-level field with the same name. Report the ambiguity or produce a static result. - Recover genuinely orphaned widgets, fill all pages, and write the result with
pypdf:
from pypdf import PdfReader, PdfWriter
from pypdf.generic import NameObject
reader = PdfReader(input_pdf)
writer = PdfWriter()
writer.clone_document_from_reader(reader)
# Restores widgets that are missing from /AcroForm/Fields.
writer.reattach_fields()
fields = writer.get_fields() or {}
missing = set(expected_values) - set(fields)
if missing:
raise ValueError(f"Form fields not found after repair: {sorted(missing)}")
values_to_write = dict(expected_values)
if flatten:
# Paint every existing value before removing every widget.
values_to_write = {
name: field.get("/V", "/Off" if field.get("/FT") == "/Btn" else "")
for name, field in fields.items()
}
values_to_write.update(expected_values)
writer.update_page_form_field_values(
None, values_to_write, auto_regenerate=False, flatten=flatten
)
if flatten:
# pypdf's flatten=True paints appearances but does not remove widgets.
writer.remove_annotations(subtypes="/Widget")
writer.root_object.pop(NameObject("/AcroForm"), None)
with open(output_pdf, "wb") as stream:
writer.write(stream)- Reopen the written PDF before delivery. For an interactive result, require every expected field to be present in
get_fields()with the expected/V, enumerate page widgets again, and confirm their effective/V(the widget value or inherited/Parentvalue) agrees. Confirm each updated widget has a non-empty/AP/Nappearance and render the final pages to catch stale or clipped appearances. Do not rely on/NeedAppearancesor a successful PNG render as proof that logical field data was updated. - For a flattened result, require zero
/Widgetannotations and no remaining/AcroFormfield tree after reopening, then render the final pages. Keep an editable copy when the user may need to revise the form.
Temp And Output Conventions
- Use
tmp/pdfs/for intermediate files; delete them when done. - Write final artifacts under
output/pdf/when working in this repo. - Keep filenames stable and descriptive.
Dependencies
Prefer the Codex bundled workspace/runtime dependencies when available. The primary runtime is expected to include:
- Python packages:
reportlab,pdfplumber,pypdf - Rendering tools:
pdftoppmandpdfinfofrom Poppler
If a dependency is missing, install only what is needed.
Python packages:
uv pip install reportlab pdfplumber pypdfIf uv is unavailable:
python3 -m pip install reportlab pdfplumber pypdfSystem tools for rendering:
# macOS (Homebrew)
brew install poppler
# Ubuntu/Debian
sudo apt-get install -y poppler-utilsIf installation is not 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 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.
Final response
Final Response Citations
- Create/edit: for created or edited PDFs, cite each final deliverable exactly once with
purpose="output", in its own paragraph. Briefly describe the result without repeating its filename, path, or link. Never put output directives inside prose or list items. - Q&A and summaries: Every file whose contents you summarize or use to support an answer MUST receive a
:codex-file-citation{...}withpurpose="source"in the final response. Use the source citation in place of the filename, wherever the filename would appear. Do not write the filename separately and append its citation at the end. Files merely inspected but not used in the answer need no citation. Do not emit output citations for unchanged files or read-only answers. - Emit
:codex-file-citation{...}directly, without backticks, code fences, or a Markdown-link wrapper. Use verified targets only. No need to cite or reference intermediate work.
For file citations, set path to the verified absolute file path on the task host. Omit mode.
Some illustrative examples, real responses use verified targets outside code fences.
:codex-file-citation{path="/absolute/path/review.pdf" purpose="output"}The review of :codex-file-citation{path="/absolute/path/review.pdf" purpose="source"} is due Friday.Additional Citation Guidance
For PDF Q&A, inspect complete relevant pages and preserve material headings, table/figure labels, footnotes, sources, and sample sizes. PDF citations support only plain file citations; do not add artifact_kind, page_number, or other locators.
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.

