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/rojim666/sztucode/pdfnpx skills add rojim666/SztuCode --skill pdfgit clone --depth 1 https://github.com/rojim666/SztuCodeWrote 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.
[](https://agentmods.dev/skills/rojim666/sztucode/pdf)<a href="https://agentmods.dev/skills/rojim666/sztucode/pdf"><img src="https://agentmods.dev/badge/skills/rojim666/sztucode/pdf.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01475 |
| Opus 5 | $0.00026 | $0.00737 |
| Sonnet 5 | $0.00010 | $0.00295 |
| Haiku 4.5 | $0.00005 | $0.00147 |
Grade B, and why
pdf scanned grade B with 1 finding 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.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo apt-get install -y poppler-utils How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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.
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)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 143 lines · 51 tokens per session scan B be18be0cf948
pdf is a skill published in the GitHub repository rojim666/SztuCode (50 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 1,475 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
Read, extract, split, merge, rotate, watermark, fill, OCR, or create PDF files with verification of page counts and text extraction.
board-deck-builder
../../../c-level-advisor/skills/board-deck-builder/SKILL.md.
confluence-expert
../../../project-management/skills/confluence-expert/SKILL.md.
paper-figures
Extract figures from downloaded papers and include them in survey/review reports. Use when the report covers other groups' work and benefits from their architecture diagrams, experimental plots, or system schematics. Your brain prompt supplies the absolute path to the extract-figures script as {{EXTRACTFIGURES}} — use…
moai-docs-generation
Documentation generation patterns for technical specs, API docs, user guides, and knowledge bases using real tools like Sphinx, MkDocs, TypeDoc, and Nextra. Use when creating docs from code, building doc sites, or automating documentation workflows.