Pdf2anki — AI skill for Claude Code
Command-line tool that turns PDF, text, and Markdown files into Anki cards with Claude, scoring every card and, with --quality full, sending low-scoring ones through an LLM critique.
How to install Pdf2anki
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open shimo4228/pdf2anki and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Pdf2anki does
Command-line tool that turns PDF, text, and Markdown files into Anki cards with Claude, scoring every card and, with --quality full, sending low-scoring ones through an LLM critique.
Alternatives in AI
- Guizang Ppt Skill — AI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts 24.9k ★
- Geo SEO Claude — GEO-first SEO skill for Claude Code 3.6k ★
- Launch An AI Feature — Workflow recipe — take an AI/LLM feature from a probabilistic-aware PRD to a launch-ready model card by chaini 1.3k ★
README
Language: English | [日本語](README.ja.md)
pdf2anki
[](https://www.python.org/) [](LICENSE)
pdf2anki is a command-line tool that turns PDF, text, and Markdown files into Anki cards with Anthropic's Claude, for people who study from documents with Anki. By default it scores every card before export, and with `--quality full` it sends low-scoring cards through an LLM critique that improves, splits, or removes them.
Built as a hands-on project to test defenses against what LLM card generation produces (broken JSON, uneven card quality, and invisible cost) by combining LLM structured extraction, cognitive science (Wozniak's 20 Rules, the card-writing rules from the creator of SuperMemo), and a keyword-matching evaluation of prompt changes.
[!NOTE] `convert` and the web UI send your document text (and, with `--vision`, the images embedded in image-heavy pages) to the Anthropic API, `eval` sends the texts of its labeled dataset, and all three need your own paid `ANTHROPIC_API_KEY`. Each run stops at a budget limit, 1.00 USD by default. `preview` makes no API calls.
The story behind the tool and a later audit of its code are in [More from the author](#more-from-the-author).
Installation
Requirements: Python 3.12+, [uv](https://docs.astral.sh/uv/), and an Anthropic API key (paid). OCR (`--ocr`) also needs Tesseract and its language packs on the system ([Runbook](docs/RUNBOOK.md)).
git clone https://github.com/shimo4228/pdf2anki.git
cd pdf2anki
uv sync --all-extras
`uv sync` installs the `pdf2anki` command into `.venv`. Run it as `uv run pdf2anki ...`, or activate the environment once with `source .venv/bin/activate`; the examples below assume it is active.
Environment Setup
pdf2anki reads the API key and the two `PDF2ANKI_` variables below from the environment; it does not load a `.env` file. Export the
Related Skills
Anki Connect Skill
AI agent skill for controlling Anki flashcards via Anki-Connect HTTP API. Works with Claude Code, OpenCode, an
Zettel Builder
Bottom-up Zettelkasten card-note skill for AI agent harnesses (Claude Code / OpenClaw / Codex / Hermes). Mater
Adaptive Cards MCP
AI-powered Adaptive Card MCP server — 9 tools for generating, validating, optimizing cards for Teams, Outlook,
Autoconst Claude Boq From Ifc
Turn a BIM model (IFC) into a priced Excel Bill of Quantities. Bring your own rate library — HIGH/LOW confiden
AI Resume Analyser
Production-style monorepo for an AI Resume Analyzer with Python microservices and a Next.js frontend. The plat
Warden Receipt
Show token-warden rule receipts — the per-rule verdict card with token savings vs. rent, per-task pass/fail, t
Related Agents
Python Document Processor
Production-grade Python document processor for PDF/DOCX/Markdown/TXT extraction with robust error handling, te
Scope Ingest
Bounded subagent that turns raw source material (markdown files, plain-text files, pasted text) into a normali
Luca
Creates invoices, quotations, or receipts. Generates JSON, produces PDF, and drafts professional email for sen