Install
openclaw skills install @voronindenis5/flashcard-forgeConvert any text — PDF excerpts, lecture notes, articles, textbook chapters — into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and cloze-deletion modes using regex-based extraction and sentence analysis.
openclaw skills install @voronindenis5/flashcard-forgeTurn walls of text into decks you'll actually review.
Flashcard Forge is a skill that transforms study material (PDFs, lecture
notes, articles, textbook chapters) into spaced-repetition flashcards. It
extracts key facts, definitions, and Q&A pairs using regex patterns and
sentence-structure analysis, then exports Anki-importable CSV files.
Activate this skill when you need to:
--mode qa)Extracts question-answer pairs and definition pairs:
--mode cloze)Generates fill-in-the-blank cards by identifying key terms in each sentence and masking them:
{{c1::...}} cloze syntax--mode auto, default)Runs both modes and merges results, deduplicating by question text.
| Need | Command |
|---|---|
| Q&A cards from a text file | python3 scripts/flashcard_forge.py notes.txt |
| Cloze cards | python3 scripts/flashcard_forge.py notes.txt --mode cloze |
| Anki CSV output | python3 scripts/flashcard_forge.py notes.txt -o deck.csv |
| Custom cloze count | python3 scripts/flashcard_forge.py notes.txt --max-cloze 3 |
| Min sentence length filter | python3 scripts/flashcard_forge.py notes.txt --min-length 20 |
| JSON output | python3 scripts/flashcard_forge.py notes.txt --format json |
references/extraction-patterns.md)
to find definitions, Q&A, lists, cause/effect, and comparisons.See references/anki-import.md for how to import the CSV into Anki.
references/extraction-patterns.md — catalog of regex extraction patternsreferences/anki-import.md — step-by-step Anki import guidereferences/study-strategies.md — best practices for flashcard-based learningscripts/flashcard_forge.py — the main extraction and export scriptscripts/sample_text.txt — example input demonstrating all pattern typesOver-generation. A long text can produce hundreds of mediocre cards. Use
--max-cards to cap output and --min-length to filter trivial sentences.
CSV delimiter conflicts. Anki expects semicolon-separated values for basic cards. The script handles quoting automatically; don't open the CSV in Excel and re-save (it may change the delimiter).
Cloze mode needs cloze note type. Cloze cards only work with Anki's
"Cloze" note type, not "Basic." See references/anki-import.md.
Poor input quality. Garbled OCR or deeply nested markdown confuses the sentence segmenter. Pre-clean the text for best results.
Duplicates across runs. The dedup step is within-file only. If you merge
multiple outputs, dedup manually or use --format json and post-process.
--max-cards set if the input is largeMIT © Denis Voronin