convert-pdf

convert-pdf is a skill for Claude Code from digital-stoic-org/agent-skills. It costs 74 tokens per session (724 once invoked), scanned A, original, MIT.

A command that converts PDF files into Markdown text. It chooses ordinary text extraction for text-heavy PDFs and a document parser with table support or OCR for scanned or complex files.

In plain words
What is it for?
Use it to convert reports, papers, and scanned documents, including PDFs with tables, multiple columns, or images of text.
Why use it?
It turns PDF content into editable, searchable Markdown without requiring you to choose the extraction method manually.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is docling --to md --output ./converted/ "$INPUT".

Part of the convert plugin — 7 skills shipped together

Good fit Use it to convert reports, papers, and scanned documents, including PDFs with tables, multiple columns, or images of text.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/digital-stoic-org/agent-skills
agentmods
npx agentmods add skills/digital-stoic-org/agent-skills/convert-pdf

Made for: Claude Code.

Or install convert, the plugin that ships this one along with the rest of its 7 skills.

Wrote 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.

agentmods badge for convert-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/digital-stoic-org/agent-skills/convert-pdf/github.svg)](https://agentmods.dev/skills/digital-stoic-org/agent-skills/convert-pdf)
Your own site
<a href="https://agentmods.dev/skills/digital-stoic-org/agent-skills/convert-pdf"><img src="https://agentmods.dev/badge/skills/digital-stoic-org/agent-skills/convert-pdf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for convert-pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/digital-stoic-org/agent-skills/convert-pdf"><img src="https://agentmods.dev/badge/skills/digital-stoic-org/agent-skills/convert-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 10
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.00724
Opus 5 $0.00037 $0.00362
Sonnet 5 $0.00015 $0.00145
Haiku 4.5 $0.00007 $0.00072

Measured 10d ago against content hash 356f1a3e297b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

convert-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 10d 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.

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.

convert/skills/convert-pdf/SKILL.md · 84 lines

What it actually says

Convert PDF → Markdown

1. Parse & Validate

Extract from arguments:

Arg Required Default
$1 input PDF
→ path output No ./converted/{kebab-basename}.md
--docling No Force docling
--complex No Force docling
--ocr No Force docling + OCR

Validate: file exists, ends .pdf, is readable. Create ./converted/ if missing.

2. Select Backend

# If --docling, --complex, or --ocr → skip to docling path
# Otherwise, probe with pdftotext:
CHARS=$(pdftotext -layout -l 3 "$INPUT" - | wc -c)
# CHARS < 100 → scanned PDF → docling path
# CHARS >= 100 → pdftotext path

3a. pdftotext Path (default — 90% of files)

pdftotext -layout "$INPUT" "${OUTPUT%.md}.txt"

Post-process the .txt.md using Write tool:

  • Split on \f--- page separators
  • ALL CAPS lines > 20 chars → ## Header
  • Collapse 3+ blank lines → 2
  • Prepend YAML frontmatter: source, pages, backend: pdftotext
  • Write final .md, delete intermediate .txt

3b. docling Path (complex/OCR)

First: toolsmith:install-dependency docling if not available.

# Find .venv by scanning upward from CWD
source "$(find_venv)/bin/activate"
docling --to md --output ./converted/ "$INPUT"

If --ocr flag: docling --to md --ocr --ocr-engine easyocr --output ./converted/ "$INPUT"

⚠️ Docling rules — violations create 0-byte files:

✅ Correct ❌ Wrong
--to md --to markdown
--output DIR -o DIR
Writes to filesystem NEVER > redirect or | tee

4. Verify & Report

[ -s "$OUTPUT" ] || { echo "❌ Output empty"; exit 1; }
wc -c "$OUTPUT"

Report: ✅ Converted {file} → {output} ({size}, {backend})

See reference.md for backend comparison, advanced docling options, and troubleshooting.

Files

What ships with it

1 file 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.

Changes

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.

  1. 10d ago First seen · 84 lines · 74 tokens per session scan A 356f1a3e297b

Subscribe to this mod's changes

convert-pdf is a skill published in the GitHub repository digital-stoic-org/agent-skills (20 stars, last pushed 3d ago), licensed MIT. It adds 74 tokens to every session and 724 once invoked, about $0.0004 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.

Related

Other skills, from other repositories