pdf-documents
Skill1 starsChanged 48 days agoApache-2.0View on GitHub
Generate PDFs with fpdf2 and merge, split, or fill existing PDFs with pypdf, with visual QA before delivery.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- puntorigen/skillstheir own version, first seen Jul 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- puntorigen/skills★ 0same name
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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs-site/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs-site/CLAUDE.mdCLAUDE.md
- chartsSkill
- presentationsSkill
- spreadsheetsSkill
- word-documentsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Prefer multi_cell for paragraphs so long lines wrap instead of overflowing the page.
- Very specific: line 51
Always open source PDFs from the workspace (attachments arrive under documents/), and never assume a page count — read it.
- Very specific: line 60
Check for fillable form fields first: Read the template with PdfReader.get_fields().
- Distinctive: line 93
Only declare the document done after the rendered pages look right.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PDF documents
Produce PDF deliverables with two libraries: fpdf2 to generate new documents and pypdf to manipulate existing ones (merge, split, rotate, fill forms). Follow every section below before declaring a PDF done.
Installing the libraries
Install each pinned dependency with its own exec call — commands have a
bounded wall clock, and one pip invocation per package stays inside it:
python3 -m pip install --user fpdf2==2.8.3
python3 -m pip install --user pypdf==6.16.1Installs work only when this chat's network policy allows package managers, and they persist for the rest of the conversation. If an install is refused by policy, do not retry: tell the user to enable the package-manager network policy for this chat, and offer the closest format you can produce without the library (for example markdown or HTML) — only with their knowledge, never as a silent substitution. If a dependency cannot be installed at all, say so plainly instead of quietly delivering a lesser format.
Generating PDFs with fpdf2
- Build documents from
fpdf.FPDF:add_page(),set_font(...), thencell(...)/multi_cell(...)for text andimage(...)for figures. - The core fonts (Helvetica, Times, Courier) cover ASCII reliably. For text
beyond Latin-1, register a Unicode TrueType font with
add_font(...)before use; never let glyphs silently render as placeholders. - Set metadata that helps the user:
set_title(...),set_author(...)when the document has a named author. - Prefer
multi_cellfor paragraphs so long lines wrap instead of overflowing the page; leave margins at their defaults unless the layout needs otherwise.
Manipulating PDFs with pypdf
- Merge: append pages from several
PdfReadersources into onePdfWriter. - Split: copy the selected page ranges into separate writers.
- Forms: read fields with
PdfReader.get_fields()and fill them withPdfWriter.update_page_form_field_values(...); callwriter.set_need_appearances_writer(True)so viewers render the values. - Always open source PDFs from the workspace (attachments arrive under
documents/), and never assume a page count — read it.
Working from an existing PDF as a template
A PDF the user supplies as a template is a read-only reference: its layout cannot be edited in place. There are two ways forward, and the first is much better whenever it applies.
- Check for fillable form fields first. Read the template with
PdfReader.get_fields(). If it returns usable fields, fill them as above — that keeps the original design intact and is far less work than rebuilding the document. - Only when there are no usable fields, reproduce the layout. Render the template to images with the helper below and study it visually — fonts, sizes, margins, column positions, rules, headers and footers — alongside its structure, then rebuild it as a new document with fpdf2, matching that layout as closely as fpdf2 allows. Approximations are expected; say which ones you made.
A reproduction is a new document that resembles the template, not the template itself. Never present it as the original.
Saving deliverables
Save the finished PDF in output/ — files there are published to the user
as durable outputs. Writing the same filename again publishes a new version
of the same output, so keep the filename stable when revising and change it
only when the user asks for a distinct document.
Visual QA before declaring done
Rendering catches what code cannot: clipped text, overlapping elements, missing glyphs, blank pages. Before presenting the PDF:
- Render pages to images in
preview/with the bundled helper:python3 .tidebreak/exec-scripts/render_pdf.py output/<file>.pdf(at most 3 preview images are returned per exec call; render further pages in another call when the document is long). - Inspect the returned images for layout defects and fix the generator code rather than accepting a flawed page.
Only declare the document done after the rendered pages look right.
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.

