anki-card-creator
Skill4 starsChanged 3 months agoMITView on GitHub
Creates Anki flashcards from text, articles, transcripts, or video content and imports them into the user's Anki database via an .apkg package. Auto-routes cards into one of three categories — knowledge (default), movement, or notes — and supports basic, cloze, reverse, and video-with-screenshot card models. Use when the user says 'create anki cards', 'make flashcards', 'add to anki', 'save to anki', 'flashcard this', 'remember this in anki', 'cards from transcript', 'video flashcards', or otherwise indicates they want to memorize specific content for spaced repetition.
- Installs packages
In this repository4 other files it gives its agents.
- grounded-reading-interfacesSkill
- marp-slidesSkill
- quiz-generatorSkill
- research-reportSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Do NOT trigger for general note-taking, summarization, explanation, or learning Q&A — only when the user explicitly wants flashcards.
- Distinctive: line 44
Add integrative questions, not just atomic ones: Keep the higher-level "synthesize the pieces" question on top of the atomic sub-questions …
- Distinctive: line 51
Don't Ankify speculatively: Only card material the user is actively engaging with.
- Very specific: line 61
Always invoke with uv run.
- Distinctive: line 104
After the script runs, report card count and category in one sentence.
- Very specific: line 203
Write cards.json with category: "knowledge" on each card (or omit for default).
- Very specific: line 214
If the script's internal mapping can't resolve a category to a real Anki deck, cards land in Anki's Default deck.
- Very specific: line 220
Default to knowledge. Do not stop to ask unless the content genuinely fits multiple categories with no dominant signal.
- Very specific: line 228
Prefer --batch over multiple single-card invocations whenever there are 3+ cards.
- Distinctive: line 229
When the user provides long content (articles, transcripts, videos), extract atomic Q&A pairs rather than dumping whole paragraphs into a …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Anki Card Creator
Convert content into Anki flashcards and import them into the correct deck.
When to use
Trigger this skill when the user wants to memorize, study, or save information into Anki for spaced repetition. Phrases include: "create anki cards", "make flashcards", "add to anki", "save to anki", "anki cards for X", "flashcard this", "remember this in anki", "cards from this video", "cards from transcript".
Do NOT trigger for general note-taking, summarization, explanation, or learning Q&A — only when the user explicitly wants flashcards.
Step 1: Identify the category
Classify the content into one of three categories. If signals conflict or are absent, default to knowledge silently — do not stop to ask the user.
| Category | Use for | Detection signals |
knowledge (default) | Academic concepts, research, technical content, definitions, theories | research, study, theory, concept, definition, analysis, scientific, technical, academic |
movement | Physical exercises, grappling, movement patterns, strength cues, form | exercise, workout, technique, form, training, grappling, BJJ, judo, wrestling, strength, mobility |
notes | Personal reminders, quick references, procedural steps, to-dos | reminder, remember, todo, procedure, steps, personal reference, quick note |
Important: Actual Anki deck names, deck IDs, and output paths live inside scripts/create-anki-cards.py. Do not reference them here, and only pass --deck-name when the user explicitly requests a specific deck or sub-deck.
Step 2: Extract Q&A pairs
Convert content into atomic flashcards. These rules are drawn from Michael Nielsen's Augmenting Long-Term Memory — the goal of every card is: six months from now, will this be genuinely retrievable, connected to other knowledge, and worth caring about?
Your drafting workflow (not card content — this is how YOU design each card): write the answer first. Draft the fact worth retaining, then design a question around it and test: could a knowledgeable person answer this question differently and still be correct? If yes, the cue is too loose — add discriminating context, narrow the scope, or split the card. This guards against the core failure mode, cue–answer mismatch: an open-ended question with one specific answer makes retrieval ambiguous — at review time the user can't tell whether they "got it right." The cue must constrain the answer so only one response is defensible.
- One idea per card (atomic). Both question and answer express a single idea. If the answer contains "and" or a list, split it. "Atomic" ≠ trivial — a card can be sophisticated and still atomic.
- Encode ideas, not sentences. A card encodes the underlying concept, not the phrasing or chapter structure of the source. Decompose the material however serves retrieval — the source's organization has no authority over the deck.
- Split enumeration cards. "N things that..." questions make the user dredge up a list rather than reconstruct an idea, and N is usually an artifact of the author's outline. One fact per card; if the grouping itself matters, add one cheap cloze card whose only job is binding the list.
- Card mechanisms, not labels. Compressed phrases like "managing expectations" let the user pass reviews while retrieving no actual meaning. Test each answer: could the user act on this? If not, card the why and how underneath the label instead.
- Don't let proxies masquerade as the thing itself. Token counts aren't efficiency — they're a measurable stand-in. If the proxy/thing distinction matters, give it its own card; otherwise the card quietly teaches the proxy as the definition.
- Never make orphan cards. A lone card on a topic gets missed forever and is a waste to enter. Make at least 2–3 questions per concept, and 5–20 per article/paper — or none at all. If a source can't yield 5 good questions, add zero. This is the single most important rule.
- Add integrative questions, not just atomic ones. Keep the higher-level "synthesize the pieces" question on top of the atomic sub-questions (e.g. keep "How do I create a Unix soft link in practice?" alongside the two atomic cards for the command and the argument order).
- Self-contained questions. Embed the domain/context in the stem — "In Emacs, how to delete a word?" not "How to delete a word?"; "In Bjork's Two-Component Model, what is Storage Strength?" not "What is Storage Strength?"
- No yes/no questions — they're a "question smell." Reframe "Is X intractable?" → "For which cases is X tractable? Give an example where it isn't."
- Attribute uncertain/empirical claims to their source — but source-scoping is a last resort, not an ambiguity fix. Ankify "the fact that Jones 2011 claimed the average age is 48" when the claim is contested or empirical, with the citation in
-s. But never use "According to X..." merely to rescue a loose question: it encodes "what a document said" behind a retrieval cue the user will never meet in real life. Fix the cue instead; reserve source-scoping for genuinely source-specific facts (official recommendations, a paper's specific claim). - Vary the angle. For key facts, generate a forward card and a reverse card (concept→value and value→concept). Use
--model-type basic-reverseor write both directions explicitly. - Span altitudes. Mix elementary (definitions, terminology — these are load-bearing, not trivia), mechanism ("how does X work?"), implication, limitation ("when does X fail?"), and comparison cards.
- Elaborative encoding. Where natural, anchor a fact to an adjacent one it connects to ("just 5 years after Sputnik…") rather than leaving it bare.
- Don't Ankify speculatively. Only card material the user is actively engaging with. Skip "might need this someday" content — it becomes orphans.
- Add sources to knowledge cards via
-swhenever known. - HTML in answers is supported:
<b>,<i>,<br>,<ul><li>.
For 3+ cards, prepare a batch JSON file rather than running single invocations.
Full guidance with good/bad examples and Nielsen's complete rulebook: references/card-quality.md.
Step 3: Run the script
Always invoke with uv run. Script path:
~/.claude/skills/anki-card-creator/scripts/create-anki-cards.pySingle card (category defaults to knowledge)
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
-q "What is the optimal interval for partial recall?" \
-a "30-50% of perfect recall interval" \
-s "Bjork & Bjork (2011)"Explicit category
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
-q "Triangle choke setup from closed guard" \
-a "Break posture, angle off, pull arm across, kick leg over, squeeze knees" \
--category movementBatch from JSON
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py --batch cards.jsonVideo batch with screenshots
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
--video-batch cards.json \
--video /path/to/video.mp4 \
--deck-name "BJJ::Back Attacks::Gordon Ryan"Full video workflow and JSON schema: references/video-workflow.md.
Step 4: Confirm to the user
After the script runs, report card count and category in one sentence. Keep it brief.
Examples:
- "✓ Created 1 card in the knowledge deck."
- "✓ Created 7 cards with screenshots in BJJ::Back Attacks::Gordon Ryan."
CLI flags reference
| Flag | Purpose |
-q, --question | Card front |
-a, --answer | Card back |
-s, --source | Citation (optional) |
-c, --category | knowledge (default), movement, or notes |
--batch | JSON file of multiple cards |
--video-batch | JSON file of video cards (requires --video) |
--video | Source video for screenshot extraction |
--deck-name | Override category routing; use :: for sub-deck hierarchy |
--model-type | basic (default), cloze, basic-reverse, video |
--no-import | Generate .apkg without auto-importing |
--output | Custom .apkg output path |
Batch JSON schemas
Standard batch (--batch):
[
{
"question": "Question text",
"answer": "Answer text",
"source": "Citation (optional)",
"category": "knowledge"
}
]Video batch (--video-batch, requires --video):
[
{
"question": "Question text",
"answer": "Answer text",
"timestamp": "M:SS or H:MM:SS"
}
]Card models
basic(default): one-direction front/backbasic-reverse: generates both directions (Q→A and A→Q)cloze: use{{c1::deletion}}and{{c2::another}}syntax in-qvideo: front + screenshot at timestamp; back + video path + timestamp (applied automatically by--video-batch)
Examples
Research finding → knowledge (default)
User: "I want to remember that research shows partial recall benefits long-term retention."
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
-q "Why is partial recall beneficial for long-term learning?" \
-a "Effortful retrieval produces better long-term retention than easy retrieval — 'desirable difficulty' strengthens memory more than effortless recall." \
-s "Pyc & Rawson (2009)"No --category needed; default applies.
BJJ technique → movement
User: "Add an anki card for triangle choke details from closed guard."
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
-q "What are the key steps for triangle choke from closed guard?" \
-a "1. Break posture<br>2. Angle off 45°<br>3. Pull arm across centerline<br>4. Kick leg over shoulder<br>5. Lock ankle behind knee<br>6. Squeeze knees<br>7. Pull head down" \
--category movementPersonal reminder → notes
User: "Remember that my transcription command has a --process flag."
uv run ~/.claude/skills/anki-card-creator/scripts/create-anki-cards.py \
-q "What flag makes transcription output readable?" \
-a "Use <b>--process</b>: <code>transcribe file.mp4 --process</code>" \
--category notesArticle / paper → batch (knowledge)
- Fetch the content. Weight the abstract, introduction, conclusion, and figure captions — that's where the core claims live.
- Extract 5–20 distinct concepts as Q&A pairs (never fewer than 5 — if you can't reach 5 good ones, the source isn't worth carding). Cluster them so nothing is an orphan; mix atomic + one integrative question; add a reverse card for the key fact; attribute empirical claims to the source.
- Write
cards.jsonwithcategory: "knowledge"on each card (or omit for default). - Run with
--batch cards.json.
More worked examples (article extraction, full video workflow): references/examples.md.
Error handling
Anki not running
The auto-import (open file.apkg) launches Anki and imports. If launch fails, surface the .apkg path so the user can import via File → Import.
Deck not found
If the script's internal mapping can't resolve a category to a real Anki deck, cards land in Anki's Default deck. Tell the user, give them the .apkg path, and note the deck-name mapping inside create-anki-cards.py may need updating.
ffmpeg missing (video cards only)
Tell the user to install ffmpeg (brew install ffmpeg on macOS) and re-run. Do not attempt to generate video cards without it.
Ambiguous category
Default to knowledge. Do not stop to ask unless the content genuinely fits multiple categories with no dominant signal.
Batch JSON malformed Show the user the exact validation error from the script and the offending entry. Don't auto-fix silently — confirm the correction first.
Notes for Claude
- The script owns deck-name, deck-ID, and output-path configuration. Do not pass
--deck-nameunless the user explicitly requests a specific deck or sub-deck. - Prefer
--batchover multiple single-card invocations whenever there are 3+ cards. - When the user provides long content (articles, transcripts, videos), extract atomic Q&A pairs rather than dumping whole paragraphs into a single card.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

