pdf-to-md
Convert PDFs (lecture slides, scripts, books) into clean Markdown/text an agent can read and search, with automatic fallback to Tesseract OCR for scanned PDFs.
Skill by smlfg
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/smlfg-pdf-to-md
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, presentations, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pdf-to-md
What's inside
- Skill name
pdf-to-md- Description
- Convert PDFs (lecture slides, scripts, books) into clean Markdown/text an agent can read and search, with automatic fallback to Tesseract OCR for scanned PDFs. Use when a PDF should become agent-readable, single or in bulk.
- License
- MIT
- Instructions
- 81 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- clean_markdown.py · scripts/
SKILL.md (first lines)
# PDF to Markdown
Turns `.pdf` files into clean `.md` for agent-friendly reading and search. Helper: [`scripts/clean_markdown.py`](scripts/clean_markdown.py) (control chars, ligatures, NFKC normalisation, whitespace).
## Prerequisites (once)
```bash
sudo apt install poppler-utils tesseract-ocr tesseract-ocr-deu # add the language packs you need
```
## Step 1: Does the PDF have a text layer?
```bash
pdftotext -layout input.pdf - 2>&1 | head -5
```
Text → step 2a. Empty or error → scanned PDF → step 2b.
If you only need some chapters, find page boundaries first (table of contents, `pdfinfo`, then `pdftotext -f <first> -l <last>`).
## Step 2a: Text PDF
```bash
pdftotext -layout input.pdf - | python3 scripts/clean_markdown.py > input.md
```
## Step 2b: Scanned PDF (OCR)
```bash
pdftoppm -r 300 input.pdf page -png
for png in page*.png; do tesseract "$png" "${png%.png}" -l deu+eng; done
cat page*.txt | python3 scripts/clean_markdown.py > input.md
rm page*.png page*.txt
```
For PDFs over ~50 MB, OCR in 10-page chunks to save memory.
## Bulk: a whole folder
```bash
for pdf in ./*.pdf; do
pdftotext -layout "$pdf" - | python3 scripts/clean_markdown.py > "${pdf%.pdf}.md"
echo "✓ ${pdf%.pdf}.md"
done
```
## Step 3: Check the output
`head -20 input.md; wc -l input.md`. Expect more than 10 lines, no control characters, no "Error" strings. Too little text from a text PDF → switch to OCR.
## Naming convention (suggested)
`{COURSE}_{TOPIC}_{YYYYMMDD}.md`, e.g. `ALGO_Complexity_20260413.md`.
## Limits
| Problem | Workaround |
|---|---|
| Math formulas | extracted as Unicode, not LaTeX; readable but imperfect |
| Scanned formulas | OCR is approximate |
| Encrypted PDFs | can't convert; report "PDF is encrypted" |
| Tables | come out as space-separated columns; still agent-readable |
## Troubleshooting
- `Unable to parse` → non-standard or encrypted PDF; try OCR.
- `tesseract: command not found` → install it.
- Gibberish → bad encoding; `clean_markdown.py` normalises and resolves ligatures.
## Example
```bash
pdftotext -layout lecture-05-pipelining.pdf - | python3 scripts/clean_markdown.py > lecture-05-pipelining.md
wc -l lecture-05-pipelining.md # 812
```
## Use case
You have a semester's worth of slide PDFs and want a study agent to answer questions from them. Run this skill over the folder once; scanned handouts fall back to OCR automatically, and the agent now greps Markdown instead of choking on PDFs.From smlfg/HAI-skills-registry, MIT.
More from smlfg/HAI-skills-registry
- 0.570score
archify-swarm
smlfg
Map a repository's architecture with several cheap/free models in parallel, verify every claimed file:line deterministically against the committed code, and…
SkillAFreshness: AClaude Code +9 - 0.565score
automation-handover
smlfg
Hand a verified automation over to its users with a short explanation, a visible demo through the real UI, a demonstrated stop path, and one small user action…
SkillAFreshness: AClaude Code +9 - 0.565score
agentic-gate-verification
smlfg
Decide whether agentic work may proceed, be marked done, merge, or spawn more work.
SkillAFreshness: AClaude Code +9 - 0.565score
commit
smlfg
Create atomic git commits with a secrets/artifact safety check, green tests, and explicit human approval per commit.
SkillAFreshness: AClaude Code +9 - 0.565score
cross-model-review
smlfg
Get independent second, third and fourth opinions from different model families on a problem or solution, then synthesise convergence (validated) versus…
SkillAFreshness: AClaude Code +9 - 0.565score
experiment-to-project
smlfg
Turn an AI/agent experiment with several failed or half-working attempts into an evaluated, measurable project.
SkillAFreshness: AClaude Code +9 - 0.565score
github-community-checklist
smlfg
Audit a GitHub repo's community health files (description, README, license, code of conduct, contributing, security policy, issue/PR templates).
SkillAFreshness: AClaude Code +9 - 0.565score
skilleval
smlfg
Run the same task through several models or agents and score the artifacts against a pre-agreed, machine-checkable quality axis.
SkillAFreshness: AClaude Code +9 - 0.565score
subprocess-cli-pitfalls
smlfg
Diagnose Linux CLI commands that run in milliseconds in a terminal but hang or crawl when called via Python subprocess (or any non-TTY caller like cron or an…
SkillAFreshness: AClaude Code +9 - 0.565score
coursepack
smlfg
Push an entire course folder into Google NotebookLM and generate prioritised study media (audio, video, study guide) per topic and per exercise sheet, driven…
SkillAFreshness: AClaude Code +9 - 0.565score
podcast
smlfg
Produce an audio podcast from source material (doc, text, link, topic) via Google NotebookLM's MCP server.
SkillAFreshness: AClaude Code +9 - 0.565score
spoiler-free-shorts
smlfg
Add a short (60–90 s) NotebookLM video to each task of an existing interactive learning page, using a parallel example so the short never solves the task…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 15, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/smlfg/HAI-skills-registry
- Website
- human-agent-interface.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from smlfg
- 0.606score
HAI-MCP
smlfg
Model-agnostic MCP control plane for HAI: bounded missions, owner-gated actions, drift checks.
ConnectorAFreshness: ALocal★ 1↓ 47/wkClaude Code +5 - 0.570score
archify-swarm
smlfg
Map a repository's architecture with several cheap/free models in parallel, verify every claimed file:line deterministically against the committed code, and…
SkillAFreshness: AClaude Code +9 - 0.565score
automation-handover
smlfg
Hand a verified automation over to its users with a short explanation, a visible demo through the real UI, a demonstrated stop path, and one small user action…
SkillAFreshness: AClaude Code +9 - 0.565score
agentic-gate-verification
smlfg
Decide whether agentic work may proceed, be marked done, merge, or spawn more work.
SkillAFreshness: AClaude Code +9 - 0.565score
commit
smlfg
Create atomic git commits with a secrets/artifact safety check, green tests, and explicit human approval per commit.
SkillAFreshness: AClaude Code +9 - 0.565score
eval
smlfg
Run real tests or evals against a plan file, store results per version and compare with the previous baseline.
SkillAFreshness: AClaude Code +9
Cite this page
pdf-to-md skill. Agent Mart. https://agentmart.dev/skills/smlfg-pdf-to-md (last updated 2026-10-24)