Skip to content

Instantly share code, notes, and snippets.

@intellectronica
Last active October 29, 2025 13:33
Show Gist options
  • Save intellectronica/f94a291078f3c09907894287688fa2d5 to your computer and use it in GitHub Desktop.
Save intellectronica/f94a291078f3c09907894287688fa2d5 to your computer and use it in GitHub Desktop.

Flashcard Generator Skill

Your new skill for generating Anki flashcard decks from text!

What It Does

This skill converts any text document into high-quality flashcards optimised for memorisation and spaced repetition learning. It's based on your Cardcraft application but simplified for direct use through Claude.

How to Use

Basic Usage

  1. Upload or paste your text

    • Upload documents (PDF, HTML, Markdown, TXT)
    • Paste text directly
    • Provide URLs to fetch content
  2. Specify parameters (or I'll ask you):

    • Number of cards: How many flashcards (10-100 recommended)
    • Include quotes: Whether to add source excerpts to cards
    • Custom instructions: Optional focus areas or requirements
  3. Get your deck

    • Download as Anki APKG file (ready to import)
    • Download as Markdown (for other tools)

Example Requests

Simple:

"Create 30 flashcards from this article"

With parameters:

"Generate 50 flashcards from this PDF, include quotes, focus on practical applications"

From URL:

"Make 25 flashcards from https://example.com/article, no quotes needed"

How It Works

The skill follows the same proven approach as Cardcraft:

  1. Summarise the entire document for context
  2. Split text into chunks
  3. Generate flashcards for each chunk in parallel
  4. Export as Anki APKG or Markdown

Quality Features

  • Authoritative tone: Cards present information as facts, not "according to the text"
  • Clear formatting: Bold key terms, use lists for clarity
  • Optimal length: 1 sentence questions, concise answers
  • One concept per card: Complex topics split into multiple cards
  • Context included: Each card is self-contained

What's Inside the Skill

flashcard-generator/
├── SKILL.md                           # Main instructions
├── scripts/
│   └── export_anki.py                 # Anki APKG export script
└── references/
    ├── summary_prompt.md              # Template for summaries
    └── flashcard_prompt.md            # Template for flashcards

Advanced Features

Custom Instructions

Tailor flashcards to your needs:

  • "Focus on dates and historical events"
  • "Create cards for medical students"
  • "Include mnemonics where appropriate"
  • "Emphasise practical applications"

Handling Different Content

The skill adapts to:

  • Academic papers: Key findings, methodology, definitions
  • Books: Core concepts, arguments, key quotes
  • Technical docs: Syntax, commands, troubleshooting

Technical Details

  • Uses Claude's structured output for consistent quality
  • Processes chunks in parallel for speed
  • Auto-installs required packages (genanki, mistune)
  • Exports to standard Anki format compatible with all platforms

Tips for Best Results

  1. Text length: Works best with 1,000-10,000 words
  2. Number of cards: Aim for 1 card per 300-400 words
  3. Custom instructions: Be specific about your learning goals
  4. Quote setting: Use quotes for academic/research materials

Troubleshooting

Text too short?

  • Minimum ~200 words recommended
  • Reduce number of cards requested

Generation slow?

  • Large documents take time
  • Progress updates provided during generation

APKG won't import?

  • Verify Anki is up to date
  • Try Markdown export as backup

Enjoy your new flashcard generation capability!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment