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 skills add yuhaoliu7456/pdf2md-skill --skill pdf2md-skillgit clone --depth 1 https://github.com/yuhaoliu7456/pdf2md-skillWrote 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/yuhaoliu7456/pdf2md-skill/pdf2md-skill)<a href="https://agentmods.dev/skills/yuhaoliu7456/pdf2md-skill/pdf2md-skill"><img src="https://agentmods.dev/badge/skills/yuhaoliu7456/pdf2md-skill/pdf2md-skill/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.
<a href="https://agentmods.dev/skills/yuhaoliu7456/pdf2md-skill/pdf2md-skill"><img src="https://agentmods.dev/badge/skills/yuhaoliu7456/pdf2md-skill/pdf2md-skill.svg" alt="Reviewed on agentmods" width="80" 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.00063 | $0.02964 |
| Opus 5.5 | $0.00025 | $0.01186 |
| Sonnet 5.5 | $0.00013 | $0.00593 |
| Haiku 4.5 | $0.00006 | $0.00296 |
Grade A, and why
pdf2-md 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF-to-Markdown: Academic Paper Conversion
Convert a PDF paper into a single Markdown file by sending pages as images to the LLM and reconstructing the full document.
Strategy Overview
- Render each PDF page to a high-quality image (PNG, 200 DPI)
- Send images to the LLM (yourself) page by page or in batches
- Reconstruct the complete Markdown with correct reading order, headings, figures, tables, and LaTeX equations
Step 0 — Confirm Input
- Ask the user for the PDF path if not already provided.
- Determine output location: default to
<pdf_stem>/content.mdnext to the PDF.
Step 1 — Render PDF Pages to Images
Use pdftoppm (Poppler) to render each page to PNG:
mkdir -p /tmp/pdf2md_pages
pdftoppm -png -r 200 "<pdf_path>" /tmp/pdf2md_pages/page
If pdftoppm is unavailable, use PyMuPDF as fallback:
import fitz
doc = fitz.open(pdf_path)
for i, page in enumerate(doc):
pix = page.get_pixmap(dpi=200)
pix.save(f"/tmp/pdf2md_pages/page-{i+1:03d}.png")
doc.close()
Verify image count matches expected page count.
Step 2 — Page-by-Page LLM Extraction
Read each rendered page image and extract its content. For each page, apply these rules:
2.1 Reading Order
- For two-column layouts: left column first, then right column, top to bottom.
- Full-width elements (title, abstract, full-width figures) at their natural vertical position.
2.2 Heading Hierarchy
CRITICAL: Do NOT assign heading levels by font size alone. Font size only provides initial hints. You MUST determine the final hierarchy by semantic context — the parent-child nesting of sections.
Two-pass approach:
- First pass (per-page): Tag each heading candidate with its visual weight (font size, bold, numbering pattern) and approximate level.
- Second pass (whole-document): After all pages are processed, review the full heading list and correct levels based on these rules:
Rules for heading level assignment:
#— Paper title only (exactly one).##— Top-level sections. Identify these by: (a) they appear in the paper's logical flow as major divisions (Abstract, Introduction, Related Work, Method, Experiments, Conclusion, Acknowledgments, References); (b) they typically share the same font size/weight; (c) numbered sections at the same depth (1, 2, 3…) are all##.###— Subsections that live inside a##section. Identified by sub-numbering (3.1, 3.2) or smaller/different font weight under a parent.####— Sub-subsections (3.1.1) or paragraph-level bold headings.
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.
- 2mo ago First seen · 327 lines · 63 tokens per session scan A 4ac6859dc6e0
pdf2-md is a skill published in the GitHub repository yuhaoliu7456/pdf2md-skill (6 stars, last pushed 7mo ago), licensed MIT. It adds 63 tokens to every session and 2,964 once invoked, about $0.0003 per session on Opus 5.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-31.
pdf2-md compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pdf2-mdyuhaoliu7456/pdf2md-skill | Skill | 6 | 7mo ago | MIT | A | 63 | Claude Code, Codex |
| apify-youtube-transcript-scrapersickn33/agentic-awesome-skills | Skill | 49k | yesterday | MIT | A | 48 | Claude Code |
| foundry-hosted-agent-validationmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 82 | Claude Code, Codex |
| skill-doc-deliverynyldn/claude-octopus | Skill | 4.4k | yesterday | MIT | A | 29 | Claude Code |
| meta-web-to-pdf-briefingopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| paper-readerhuangkiki/dailypaper-skills | Skill | 1.3k | 4d ago | Apache-2.0 | A | 135 | Claude Code, Codex |
| chat-complex-documentsvellum-ai/vellum-assistant | Skill | 1.5k | 2d ago | MIT | A | 90 | Claude Code, Codex |