mistral-pdf-to-markdown
Convert PDFs to Markdown with Mistral OCR and extracted images.
Skill by FuZhiyu
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/fuzhiyu-mistral-pdf-to-markdown
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
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 and code. 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/mistral-pdf-to-markdown- Your home directory (~)
What's inside
- Skill name
mistral-pdf-to-markdown- Description
- Convert PDFs to Markdown with Mistral OCR and extracted images. Use for scanned PDFs or complex layouts where structured text or images matter.
- License
- MIT
- Instructions
- 93 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions read files in your home folder (~/.ssh, ~/.aws…)
Files (5)
- SKILL.md
- reference.md · references/
- _config_loader.py · scripts/
- convert_pdf_to_markdown.py · scripts/
- test_image_namespacing.py · scripts/
SKILL.md (first lines)
# Mistral PDF to Markdown Converter
Convert PDF documents to Markdown via Mistral's OCR API, preserving headers and structure and extracting embedded images. OCR makes it work on scanned, image-based PDFs.
## Quick Start
`<skill-dir>` in the commands below is the directory containing this `SKILL.md` — substitute the real path.
```bash
# Convert entire PDF
uv run --script <skill-dir>/scripts/convert_pdf_to_markdown.py input.pdf output.md
# Convert specific pages
uv run --script <skill-dir>/scripts/convert_pdf_to_markdown.py input.pdf output.md --pages "1-5"
uv run --script <skill-dir>/scripts/convert_pdf_to_markdown.py input.pdf output.md --pages "1,3,5"
```
## Output Structure
Each conversion is a self-contained folder. Passing `Output/PDFConversions/paper_alpha.md` creates `Output/PDFConversions/paper_alpha/paper_alpha.md`, with extracted images beside it under `images/` as JPEGs, referenced relatively:
```
Output/PDFConversions/
├── paper_alpha/
│ ├── paper_alpha.md # references images/img-N.jpeg
│ └── images/
│ ├── img-0.jpeg
│ └── img-1.jpeg
└── paper_beta/
├── paper_beta.md
└── images/
├── img-0.jpeg
└── ...
```
An existing foldered markdown path such as `Output/PDFConversions/paper_alpha/paper_alpha.md` is kept as given. A directory creates `<directory>/<input-pdf-stem>.md`.
## Usage in Code
```python
from pathlib import Path
import subprocess
# Run conversion script
result = subprocess.run([
"uv", "run", "--script",
"<skill-dir>/scripts/convert_pdf_to_markdown.py",
"input.pdf",
"Output/PDFConversions/output.md",
"--pages", "1-10"
], capture_output=True, text=True)
print(result.stdout)
```
## Requirements
A Mistral API key (below), plus `mistralai`, `python-dotenv`, `pypdf`, and `pyyaml` — declared inline in the script's PEP 723 header.
## API Key Setup
The script checks these locations in order (first match wins):
1. **Environment variable** `MISTRAL_API_KEY` — recommended for personal use (e.g. `export MISTRAL_API_KEY=your-key` in `secrets.sh`)
2. **Shared config** — `.claude/agent-contract.yaml` or `~/.config/agent-contract/config.yaml` under `paper-reader.mistral_api_key`
3. **`Notes/.env`** — add `MISTRAL_API_KEY=your-key`; gitignored but Dropbox-synced, so it travels with a shared project folder
> **Never commit API keys to git.** Use environment variables or Dropbox-synced `Notes/.env` instead.
## Error Handling
**API Key Not Found:**
```
Error: Mistral API key not found
```
→ Configure it per **API Key Setup** above
**Page Out of Range:**
```
Warning: Page 100 out of range, skipping
```
→ Check the PDF page count and adjust the page selection
**API Rate Limit:**
→ Retry after a moment, or reduce the page count per request
## Notes
- Large PDFs take longer — API limits apply. Narrow with `--pages`.
- Use the `pdf` skill instead for local manipulation and plain text extraction with no OCR or API calls.
- Load [`references/reference.md`](references/reference.md) for the OCR API surface, programmatic and batch usage, cost, and troubleshooting.From FuZhiyu/superRA, MIT.
More from FuZhiyu/superRA
- 0.637score
slide-design
FuZhiyu
Research slide communication.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
superimplement
FuZhiyu
Run a superRA task tree autonomously through dispatched implementer and reviewer seats.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
communicate
FuZhiyu
Communication discipline for writing, rewriting, distilling, and reviewing any text meant for human reading, including conversation, task files, planning…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
superplan
FuZhiyu
Proactively plan or update superRA work.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
reproducibility
FuZhiyu
Register and verify task-declared reproduction graphs.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
result-protection
FuZhiyu
Protect key research results with permanent documentation, drift tests, or artifact-appropriate checks.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
worktree-data-sync
FuZhiyu
Sync non-git data (datasets, outputs, caches, symlinked data) between git worktrees.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
onboarding
FuZhiyu
Bring an existing research project into superRA — a retroactive task tree, a reproduction graph, version control, and an optional isolated reproduction run —…
SkillAFreshness: A★ 11Claude Code +9 - 0.634score
academic-writing
FuZhiyu
Academic prose support.
SkillAFreshness: A★ 11Claude Code +9 - 0.634score
agent-orchestration
FuZhiyu
Coordinate superRA agents and handoffs.
SkillAFreshness: A★ 11Claude Code +9 - 0.634score
econ-data-analysis
FuZhiyu
Economic data-analysis discipline.
SkillAFreshness: A★ 11Claude Code +9 - 0.634score
semantic-merge
FuZhiyu
Semantic branch integration.
SkillAFreshness: A★ 11Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 11
- Forks
- 2
- Open issues
- 5
- Last commit (this folder)
- Aug 19, 2026 (2 months ago)
- Last release
- Oct 5, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/FuZhiyu/superRA
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from FuZhiyu
- 0.637score
slide-design
FuZhiyu
Research slide communication.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
superimplement
FuZhiyu
Run a superRA task tree autonomously through dispatched implementer and reviewer seats.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
onboarding
FuZhiyu
Bring an existing research project into superRA — a retroactive task tree, a reproduction graph, version control, and an optional isolated reproduction run —…
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
result-protection
FuZhiyu
Protect key research results with permanent documentation, drift tests, or artifact-appropriate checks.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
reproducibility
FuZhiyu
Register and verify task-declared reproduction graphs.
SkillAFreshness: A★ 11Claude Code +9 - 0.637score
superplan
FuZhiyu
Proactively plan or update superRA work.
SkillAFreshness: A★ 11Claude Code +9
Cite this page
mistral-pdf-to-markdown skill. Agent Mart. https://agentmart.dev/skills/fuzhiyu-mistral-pdf-to-markdown (last updated 2026-10-24)