Skip to main content

FlashCard Skill

Generates atomic, scientifically-grounded flashcards for the LearnKit Obsidian plugin. Follows the Three-Layer Framework (L1: Recall, L2: Understanding, L3: Boundaries) and atomicity principles.

Execution Flow

1. Discovery Phase

Search existing content:

# Search for related notes using Obsidian search
mcp__obsidian-hybrid-search__search with topic query

# Search for existing flashcards
find docs -name "flashcards*.md" -type f
grep -r "^T |.*{topic}" docs/*/flashcards*.md

Determine target location:

  • If generating from specific note: place flashcards in same folder as source note
  • If generating from topic: map to appropriate docs subfolder (ai/, databases/, psychology/, etc.)
  • File naming: flashcards.md or flashcards-{subtopic}.md for topic-specific cards

2. Content Analysis Phase

Extract learning material:

  • If args is a file path with section (e.g., note.md#section): read that specific section
  • If args is a topic: search and read relevant note sections (prefer 300-500 word chunks)
  • If no existing notes found: inform user and offer to research + create notes first

Analyze content type:

  • Definition-heavy → High L1, Moderate L2, Low L3
  • Theorem/proof → Balanced L1/L2, Moderate L3
  • Algorithm → High across all layers
  • Intuition/motivation → Low L1, High L2, Moderate L3

3. Generation Phase

Apply atomicity rules:

  • One concept per card
  • No "and" questions (split them)
  • No layer mixing
  • Max 3 bullets OR 2 sentences per answer
  • Generate 3-7 cards per section (based on complexity)

Generate cards following these formats:

T | {Card Title} |
Q | {Question} |
A | {Answer} |
I | {Insight} | Source: {note_path}#{section} |

Layer distribution (adjust per content):

  • 40-50% L1 (Recall): Definitions, formulas, facts
  • 30-40% L2 (Understanding): Why/how, intuitions, connections
  • 20-30% L3 (Boundaries): Limitations, edge cases, failure modes

Card type selection:

Content PatternCard TypeExample
"X is defined as..."L1 Definition + L2 WhyQ: "What is X?" / Q: "Why is X defined this way?"
"X works by..."L2 UnderstandingQ: "How does X work?"
"X fails when..."L3 BoundariesQ: "When does X fail?"
"Formula: X = Y"L1 Recall + L2 IntuitionQ: "State formula for X" / Q: "Why does this formula work?"
"List of N items"Cloze (if N≤3) or RefuseCQ: "The three properties are {{c1::A}}, {{c2::B}}, {{c3::C}}"

4. Refusal Policy

DO NOT create cards for:

  • Multi-step processes (>3 steps) → Leave as reference
  • Worked examples → Suggest practice problems instead
  • Extended proofs/derivations → Create proof sketch notes
  • Lists >3 tightly-coupled items → Split or leave as notes
  • Compound questions → Force split into atomic cards

When refusing, tell user: "This content is better suited for [reference notes/practice problems]. I've created [N] cards covering the core concepts instead."

5. File Management

Check existing flashcards file:

# Read existing flashcards in target folder
Read {folder}/flashcards.md or {folder}/flashcards-{topic}.md

If file exists:

  • Read current content
  • Check for duplicates (compare question text)
  • Append new cards maintaining topic grouping
  • Update frontmatter (total_cards, difficulty_distribution)

If creating new file:

---
slug: {topic-slug}
title: {Topic Name} Flashcards
description: Active recall cards for {topic}
created: {current_date}
updated: {current_date}
total_cards: {count}
difficulty_distribution:
beginner: {L1_count} # L1 cards
intermediate: {L2_count} # L2 cards
advanced: {L3_count} # L3 cards
source_notes:
- {path/to/source.md}
---

# {Topic Name} Flashcards

<!-- Generated by Claude Code /flashcards skill -->

## {Subtopic 1}

T | {Title} |
Q | {Question} |
A | {Answer} |
I | {Insight} | Source: {note}#{section} |

...

6. Quality Verification

Self-check each card:

  • Question asks ONE thing (no "and")
  • Answer matches layer's cognitive purpose
  • Answer is ≤3 bullets OR ≤2 sentences
  • Cannot be meaningfully split
  • Layer label correct (L1/L2/L3)
  • Source reference in Insight field

Deduplication:

  • Compare generated questions against existing cards
  • If similar card exists (>80% semantic similarity), skip generation
  • If update needed, mark in output for user review

Output Format

Summary to user:

Generated {N} flashcards for {topic}:
- {X} L1 (Recall) cards
- {Y} L2 (Understanding) cards
- {Z} L3 (Boundaries) cards

Saved to: {file_path}

Source notes:
- {note1.md} ({section})
- {note2.md} ({section})

Refused {R} potential cards (worked examples, >3 step processes)

Example Card Sets

L1: Recall (Definition)

T | Transformer Architecture Definition |
Q | What is the Transformer architecture? |
A | A neural network architecture that uses self-attention mechanisms to process sequential data in parallel, without recurrence. |
I | Introduced in "Attention is All You Need" (2017) | Source: ai/llm/transformers.md#architecture |

L2: Understanding (Intuition)

T | Self-Attention Intuition |
Q | Why does self-attention allow parallel processing unlike RNNs? |
A | Each position attends to all positions simultaneously using matrix operations, eliminating the sequential dependency that forces RNNs to process tokens one-by-one. |
I | Key insight: attention is computed via matrix multiplication (parallelizable) vs. recurrence (sequential) | Source: ai/llm/transformers.md#self-attention |

L3: Boundaries (Limitations)

T | Transformer Quadratic Complexity |
Q | What is the main computational limitation of standard Transformers? |
A | O(n²) complexity in sequence length due to full attention matrix computation, making long sequences (>4k tokens) expensive. |
I | Why efficient transformers exist (Linformer, Performer, etc.) | Source: ai/llm/transformers.md#limitations |

Cloze Format (for tightly-coupled facts)

CQ | The Transformer uses three attention components: {{c1::Query}}, {{c2::Key}}, and {{c3::Value}} matrices. |
<!-- Source: ai/llm/transformers.md#attention-mechanism -->

Integration with Other Skills

Before generating flashcards:

  1. Use Obsidian search MCP to find existing notes
  2. If no notes found: suggest using /note skill first to create source material
  3. Check /study skill's learning notes for existing flashcard files

Workflow recommendation:

User request → Search notes → If found: generate cards

If not found: offer to create notes first via /note

Advanced: Topic Mapping

Map user requests to docs/ hierarchy:

User InputTarget FolderExample File
"transformers", "LLM", "GPT"docs/ai/llm/flashcards.md
"B-trees", "algorithms"docs/algorithms/flashcards-trees.md
"Postgres", "databases"docs/databases-sql/flashcards-postgres.md
"atomic habits", "book"docs/book-summaries/flashcards-atomic-habits.md
"cognitive load"docs/psychology/flashcards.md
"P/E ratio", "finance"docs/economics/flashcards-valuation.md

Folder structure:

docs/
├── ai/llm/
│ └── flashcards.md (general LLM concepts)
│ └── flashcards-transformers.md (specific to transformers)
├── databases/
│ └── flashcards.md (general DB concepts)
│ └── flashcards-indexing.md (specific topic)

Error Handling

Scenario 1: No existing notes

"I couldn't find existing notes on {topic}. Would you like me to:
1. Research and create notes first using /note skill, then generate flashcards
2. Generate flashcards from your description (less comprehensive)
3. Search with different keywords"

Scenario 2: Content unsuitable for flashcards

"This content contains primarily worked examples and multi-step derivations,
which aren't suitable for flashcards. I recommend:
- Keeping these as reference notes
- Creating practice problem sets instead
- Or, I can extract the core concepts (N cards covering definitions/intuitions)"

Scenario 3: Duplicate cards detected

"Found {N} similar existing cards:
- {question1} (80% match)
- {question2} (75% match)

Generated {M} new cards covering gaps:
- [New topics covered]"

Quality Patterns by Domain

Technical (AI/ML, Databases, Algorithms)

  • High L1: Formulas, definitions, complexity
  • High L2: Why algorithms work, tradeoffs
  • High L3: When algorithms fail, edge cases

Books/Psychology/Management

  • Moderate L1: Key terms, frameworks
  • High L2: Applications, connections
  • Moderate L3: Context limitations

Economics/Finance

  • High L1: Metrics, formulas
  • Moderate L2: Interpretation, comparisons
  • Moderate L3: When metrics mislead

Final Checklist

Before completing:

  • Searched existing notes and flashcards
  • Generated atomic cards (one concept each)
  • Applied layer framework correctly
  • Included source references in Insight field
  • Used proper frontmatter
  • Checked for duplicates
  • Provided user summary with counts
  • Refused unsuitable content appropriately

Usage Examples

Example 1: Generate from note section

/flashcards ai/llm/transformers.md#self-attention

Example 2: Generate from topic

/flashcards gradient descent

Example 3: Generate for book summary

/flashcards book-summaries/atomic-habits.md

Example 4: With layer preference

/flashcards "cognitive load theory" --focus=L2

Remember: Flashcards are for mastery, not collection. Generate quality over quantity. The goal is deep internalization, not maximum card count.