Skip to content
All Skills

Anki Flashcard Deck Generator

Extracts key concepts from study material, generates spaced-repetition flashcards in Anki-compatible CSV/TSV format, and applies memory science principles (cloze deletion, image occlusion, interleaving). Prerequisites: python3.

Learning & Education|v1|Updated 5/18/2026
MCP get_skill({ skillId: "anki-flashcard-deck-generator-ae81442b" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# Anki Flashcard Deck Generator

Extract key concepts from notes, textbooks, or articles and generate Anki-importable flashcard decks using spaced repetition best practices.

## When to Use

- "Create flashcards from these notes"
- "Generate an Anki deck for {topic}"
- "Turn this chapter summary into flashcards"

## Requirements

- **python3** for CSV generation and card formatting

## Workflow

### Step 1 — Collect Source Material

- **Input format**: notes, article text, textbook chapter, bullet points, or topic name
- **Subject area** (for context-appropriate card style)
- **Card types desired**: Basic (Q&A), Cloze (fill-in-blank), or both
- **Difficulty level**
- **Number of cards** (or "as many as needed")

### Step 2 — Extract Key Concepts

From the source material, identify:
- **Definitions** → Basic cards
- **Processes/sequences** → Ordered cloze cards
- **Comparisons** → Table cards
- **Formulas** → Cloze cards with symbol substitution
- **Facts with context** → Basic cards with "why" on back

### Step 3 — Apply Memory Science

Card writing rules:
- **Minimum information principle**: One fact per card
- **No orphan cards**: Every card has context
- **Cloze over basic**: Prefer cloze deletion when possible
- **Avoid yes/no**: Rephrase to require recall
- **Add mnemonic hints**: Include memory aids where helpful

### Step 4 — Generate Cards

**Basic cards (TSV for Anki import):**
```bash
python3 << 'PYEOF'
import csv
import io

cards = [
    ("What is {CONCEPT}?", "{DEFINITION}<br><br><i>Context: {WHY_IT_MATTERS}</i>"),
    ("What are the 3 types of {CONCEPT}?", "1. {TYPE_1}<br>2. {TYPE_2}<br>3. {TYPE_3}"),
    # ... more cards
]

output = io.StringIO()
writer = csv.writer(output, delimiter='\t')
for front, back in cards:
    writer.writerow([front, back])

with open('outputs/learning/anki-deck-{TOPIC}.tsv', 'w', encoding='utf-8') as f:
    f.write(output.getvalue())

print(f"Generated {len(cards)} cards")
print(f"Saved to: outputs/learning/anki-deck-{TOPIC}.tsv")
PYEOF
```

**Cloze cards:**
```bash
python3 << 'PYEOF'
cloze_cards = [
    "{{c1::Mitochondria}} is the powerhouse of the cell, producing {{c2::ATP}} through cellular respiration.",
    "The OSI model has {{c1::7}} layers, starting from {{c2::Physical}} at Layer 1.",
    # ... more cloze cards
]

with open('outputs/learning/anki-cloze-{TOPIC}.tsv', 'w', encoding='utf-8') as f:
    for card in cloze_cards:
        f.write(f"{card}\n")

print(f"Generated {len(cloze_cards)} cloze cards")
PYEOF
```

### Step 5 — Import Instructions

```markdown
## How to Import into Anki

1. Open Anki → File → Import
2. Select the `.tsv` file
3. Set:
   - Type: "Basic" for Q&A or "Cloze" for cloze cards
   - Deck: Create new deck "{TOPIC}"
   - Fields separated by: Tab
   - Field 1 → Front, Field 2 → Back
4. Click Import
5. Recommended settings:
   - New cards/day: 20
   - Review order: Random
   - Learning steps: 1m 10m 1d
```

## Important Rules

- One concept per card — never combine multiple facts
- Front should require active recall, not recognition
- Back should be concise — long answers kill review speed
- Include source/page reference for cards from textbooks
- For programming topics, use code snippets on cards

## Example Prompts

- "Create 30 Anki flashcards from my biology notes: [paste notes]"
- "Generate a cloze deletion deck for JavaScript array methods"
- "Turn this AWS services summary into flashcards"
#learning#flashcards#anki#spaced-repetitionpython3