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/openknots/okcode/pdfnpx skills add OpenKnots/okcode --skill pdfgit clone --depth 1 https://github.com/OpenKnots/okcodeWhat 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.00010 | $0.00467 |
| Opus 5 | $0.00005 | $0.00234 |
| Sonnet 5 | $0.00002 | $0.00093 |
| Haiku 4.5 | $0.00001 | $0.00047 |
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 yesterday.
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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF Skill
When to use this skill
- Use when the task involves creating, editing, reviewing, splitting, merging, or extracting content from PDF files.
- Use when the user needs to understand whether a PDF can be edited directly or must be converted first.
- Use when the task depends on preserving layout, images, pagination, or annotation fidelity.
- Use when OCR may be required because the PDF contains scanned pages rather than selectable text.
What this skill does
- Chooses the safest PDF workflow based on the user's goal: review, extraction, transformation, or generation.
- Distinguishes between text-based PDFs and image-only scanned PDFs before proposing edits.
- Preserves fidelity when layout matters and explicitly calls out any tradeoff when converting to another format.
- Prefers repeatable tools and scripted operations over manual one-off desktop steps.
Implementation
- Start by identifying the real goal: review content, extract data, annotate, merge, split, redact, or convert.
- Determine whether the PDF is text-based or scanned. If the content is image-only, state that OCR may be required.
- If the user needs edits that preserve layout, avoid lossy conversions unless they explicitly accept them.
- If extracting text, note whether the output should preserve reading order, tables, headings, or page boundaries.
- If generating a PDF from another source, preserve the source of truth in an editable format whenever possible.
- When tools are limited, explain the limitation clearly and offer the safest fallback rather than implying full fidelity.
- Summarize important tradeoffs before carrying out destructive or lossy transformations.
Best practices
- Never imply that all PDFs are safely editable; many require conversion or specialized tooling.
- Call out OCR accuracy risk explicitly for scanned documents.
- Preserve the original file before transformations that may alter layout or metadata.
- Prefer deterministic, scriptable workflows for extraction and generation.
- Tell the user when tables, forms, annotations, or embedded fonts may not round-trip cleanly.
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.
- yesterday First seen · 50 lines · 10 tokens per session scan A c873a5cb9147
pdf is a skill published in the GitHub repository OpenKnots/okcode (24 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 467 once invoked, about $0.0001 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
doc-code-consistency-check
Before "fixing" a README, verify the actual code behavior — don't trust either in isolation.
doc-defrag-audit
Audit document fragmentation and identify the canonical mainline. Invoke when a repo has overlapping PRDs, READMEs, specs, patch docs, or legacy notes and you need to decide what is authoritative.
governance-link-drift-audit
Audit whether READMEs, whitelists, skills, rules, and runtime entrypoints still point to the current authoritative documents. Invoke after doc moves, renames, or governance rewrites.
2slides-ppt-generator
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use for any "make slides", "create a deck", or "slides from this document" request.
openapi-glossary
Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.
scalar-docs
Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.