{"id":"46945848-d330-4af1-bcf2-2fb5d17fef1d","entityType":"agent","slug":"clawhub-voronindenis5-flashcard-forge","name":"flashcard-forge","canonicalUrl":"https://www.xpersona.co/agent/clawhub-voronindenis5-flashcard-forge","canonicalPath":"/agent/clawhub-voronindenis5-flashcard-forge","generatedAt":"2026-10-09T19:19:52.297Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":null},"description":"Convert 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.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.7K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17b6amkd3wzqgg640v03a9r1n83gxs1:flashcard-forge","sourceUrl":"https://clawhub.ai/voronindenis5/flashcard-forge","homepage":"https://clawhub.ai/voronindenis5/skills/flashcard-forge","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/voronindenis5/flashcard-forge","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/voronindenis5/skills/flashcard-forge","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":69,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"flashcard-forge technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":null},"stars":null,"forks":null,"downloads":2700,"packageName":null,"latestVersion":"0.1.2","tractionLabel":"2.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T12:05:53.269Z","lastCrawledAt":"2026-10-09T12:05:53.269Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T12:05:53.269Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.2","createdAt":"2026-08-14T06:19:22.104Z","changelog":"- Removed the documentation file skill-card.md. - No code or functional changes; this update is limited to documentation cleanup.","fileCount":12,"zipByteSize":19424},{"version":"0.1.1","createdAt":"2026-08-11T11:57:51.446Z","changelog":"- Removed the sample skill card documentation file (skill-card.md). - No changes to core functionality or user-facing features. - Documentation and usage instructions remain unchanged.","fileCount":12,"zipByteSize":19332},{"version":"0.1.0","createdAt":"2026-08-05T19:48:41.461Z","changelog":"Initial release of Flashcard Forge — generate Anki-ready flashcards from any text. - Converts study material (text, PDFs, notes) into spaced-repetition flashcards. - Supports Q&A and cloze-deletion modes with regex and sentence analysis. - Exports Anki-importable CSV (Basic and Cloze types) and JSON. - Deduplicates cards and ranks by information density. - Includes robust extraction patterns and customizable output options.","fileCount":12,"zipByteSize":19433}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17b6amkd3wzqgg640v03a9r1n83gxs1:flashcard-forge","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17b6amkd3wzqgg640v03a9r1n83gxs1:flashcard-forge` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/voronindenis5/flashcard-forge before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T19:19:52.295Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-voronindenis5-flashcard-forge/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":null},"readme":"Skill: flashcard-forge\n\nOwner: voronindenis5\n\nSummary: Convert 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.\n\nTags: latest:0.1.2\n\nVersion history:\n\nv0.1.2 | 2026-08-14T06:19:22.104Z | auto\n\n- Removed the documentation file skill-card.md.\n- No code or functional changes; this update is limited to documentation cleanup.\n\nv0.1.1 | 2026-08-11T11:57:51.446Z | auto\n\n- Removed the sample skill card documentation file (skill-card.md).\n- No changes to core functionality or user-facing features.\n- Documentation and usage instructions remain unchanged.\n\nv0.1.0 | 2026-08-05T19:48:41.461Z | auto\n\nInitial release of Flashcard Forge — generate Anki-ready flashcards from any text.\n\n- Converts study material (text, PDFs, notes) into spaced-repetition flashcards.\n- Supports Q&A and cloze-deletion modes with regex and sentence analysis.\n- Exports Anki-importable CSV (Basic and Cloze types) and JSON.\n- Deduplicates cards and ranks by information density.\n- Includes robust extraction patterns and customizable output options.\n\nArchive index:\n\nArchive v0.1.2: 12 files, 19424 bytes\n\nFiles: LICENSE (1057b), README.md (3073b), references (0b), references/anki-import.md (3507b), references/extraction-patterns.md (3387b), references/study-strategies.md (4281b), scripts (0b), scripts/flashcard_forge.py (20338b), scripts/sample_text.txt (1700b), skill-card.md (2729b), SKILL.md (5070b), _meta.json (134b)\n\nFile v0.1.2:SKILL.md\n\n---\nname: flashcard-forge\ndescription: >\n  Convert any text — PDF excerpts, lecture notes, articles, textbook chapters —\n  into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and\n  cloze-deletion modes using regex-based extraction and sentence analysis.\nversion: 1.0.0\nauthor: Denis Voronin\nlicense: MIT\ntags:\n  - education\n  - flashcards\n  - anki\n  - spaced-repetition\n  - study\n  - text-processing\n---\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\n`Flashcard Forge` is a skill that transforms study material (PDFs, lecture\nnotes, articles, textbook chapters) into spaced-repetition flashcards. It\nextracts key facts, definitions, and Q&A pairs using regex patterns and\nsentence-structure analysis, then exports Anki-importable CSV files.\n\n## When to Use\n\nActivate this skill when you need to:\n\n- Convert a textbook chapter or lecture transcript into flashcards\n- Extract definitions, key facts, or Q&A from a body of text\n- Generate cloze (fill-in-the-blank) cards for memorization\n- Produce Anki-importable CSV from raw notes\n- Study for an exam by turning reading material into active recall cards\n\n## Modes\n\n### Q&A Mode (`--mode qa`)\n\nExtracts question-answer pairs and definition pairs:\n\n- **Definition patterns**: \"X is defined as Y\", \"X refers to Y\", \"X means Y\"\n- **Explicit questions**: sentences containing \"What/Why/How/When/Where\" markers\n- **List patterns**: \"There are N types of X: A, B, C\"\n- **Cause/effect**: \"X causes Y\", \"X results in Y\"\n- **Comparison**: \"Unlike X, Y does Z\"\n\n### Cloze Mode (`--mode cloze`)\n\nGenerates fill-in-the-blank cards by identifying key terms in each sentence and\nmasking them:\n\n- Nouns and proper nouns are candidates for clozing\n- Numbers, dates, and named entities are high-priority cloze targets\n- Each card uses Anki's `{{c1::...}}` cloze syntax\n\n### Auto Mode (`--mode auto`, default)\n\nRuns both modes and merges results, deduplicating by question text.\n\n## Quick Reference\n\n| Need                        | Command                                                         |\n| --------------------------- | --------------------------------------------------------------- |\n| Q&A cards from a text file  | `python3 scripts/flashcard_forge.py notes.txt`                  |\n| Cloze cards                 | `python3 scripts/flashcard_forge.py notes.txt --mode cloze`     |\n| Anki CSV output             | `python3 scripts/flashcard_forge.py notes.txt -o deck.csv`      |\n| Custom cloze count          | `python3 scripts/flashcard_forge.py notes.txt --max-cloze 3`    |\n| Min sentence length filter  | `python3 scripts/flashcard_forge.py notes.txt --min-length 20`  |\n| JSON output                 | `python3 scripts/flashcard_forge.py notes.txt --format json`    |\n\n## How It Works\n\n1. **Read & clean** — load the text, normalize whitespace, strip markdown\n   artifacts.\n2. **Segment** — split into sentences using punctuation-aware tokenization.\n3. **Extract** — apply regex patterns (see `references/extraction-patterns.md`)\n   to find definitions, Q&A, lists, cause/effect, and comparisons.\n4. **Rank** — score each candidate by information density (presence of key\n   terms, numbers, definitions).\n5. **Deduplicate** — remove near-identical cards using Jaccard similarity.\n6. **Export** — write Anki-importable CSV (semicolon-separated, quoted) or JSON.\n\nSee `references/anki-import.md` for how to import the CSV into Anki.\n\n## Files\n\n- `references/extraction-patterns.md` — catalog of regex extraction patterns\n- `references/anki-import.md` — step-by-step Anki import guide\n- `references/study-strategies.md` — best practices for flashcard-based learning\n- `scripts/flashcard_forge.py` — the main extraction and export script\n- `scripts/sample_text.txt` — example input demonstrating all pattern types\n\n## Common Pitfalls\n\n1. **Over-generation.** A long text can produce hundreds of mediocre cards. Use\n   `--max-cards` to cap output and `--min-length` to filter trivial sentences.\n\n2. **CSV delimiter conflicts.** Anki expects semicolon-separated values for\n   basic cards. The script handles quoting automatically; don't open the CSV in\n   Excel and re-save (it may change the delimiter).\n\n3. **Cloze mode needs cloze note type.** Cloze cards only work with Anki's\n   \"Cloze\" note type, not \"Basic.\" See `references/anki-import.md`.\n\n4. **Poor input quality.** Garbled OCR or deeply nested markdown confuses the\n   sentence segmenter. Pre-clean the text for best results.\n\n5. **Duplicates across runs.** The dedup step is within-file only. If you merge\n   multiple outputs, dedup manually or use `--format json` and post-process.\n\n## Verification Checklist\n\n- [ ] Input text is reasonably clean (no raw HTML, minimal OCR artifacts)\n- [ ] Chosen mode matches your Anki deck type (qa → Basic, cloze → Cloze)\n- [ ] `--max-cards` set if the input is large\n- [ ] CSV opens correctly in a text editor (fields quoted, semicolon-separated)\n- [ ] Test-imported into Anki and reviewed 5-10 cards for quality\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.2:README.md\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\nA [Hermes Agent](https://hermes-agent.nousresearch.com/docs) / OpenClaw skill\nthat converts study material — PDF excerpts, lecture notes, articles, textbook\nchapters — into **Anki-importable flashcards** using regex-based extraction and\nsentence analysis.\n\n## Why\n\nStudents spend hours manually making flashcards from reading material. Most of\nthat work is mechanical: find the definitions, extract the key facts, format\nthem as Q&A or cloze cards. Flashcard Forge automates the extraction so you can\nfocus on reviewing, not transcribing.\n\n## What's Included\n\n- **`SKILL.md`** — core skill: modes, quick-reference table, how-it-works.\n- **`references/`**\n  - `extraction-patterns.md` — catalog of regex patterns the extractor uses.\n  - `anki-import.md` — step-by-step guide to importing CSV into Anki.\n  - `study-strategies.md` — best practices for flashcard-based learning.\n- **`scripts/flashcard_forge.py`** — the main script (stdlib only, no deps).\n- **`scripts/sample_text.txt`** — example input demonstrating all pattern types.\n\n## Quick Start\n\n```bash\n# Generate Q&A flashcards (default mode)\npython3 scripts/flashcard_forge.py notes.txt -o deck.csv\n\n# Generate cloze (fill-in-the-blank) cards\npython3 scripts/flashcard_forge.py notes.txt --mode cloze -o cloze.csv\n\n# Auto mode: both Q&A and cloze, deduplicated\npython3 scripts/flashcard_forge.py notes.txt --mode auto -o deck.csv\n\n# Cap output to 50 cards, filter short sentences\npython3 scripts/flashcard_forge.py notes.txt --max-cards 50 --min-length 25\n\n# JSON output for programmatic use\npython3 scripts/flashcard_forge.py notes.txt --format json -o deck.json\n```\n\nExample CSV output:\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light energy into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\nExample cloze output:\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"Photosynthesis occurs in the {{c1::chloroplasts}} of plant cells\";\"\"\n```\n\n## Modes\n\n| Mode    | Card Type  | Best For                          |\n| ------- | ---------- | --------------------------------- |\n| `qa`    | Basic Q&A  | Definitions, explicit questions   |\n| `cloze` | Cloze      | Fill-in-the-blank memorization    |\n| `auto`  | Both       | General use (default)             |\n\n## Anki Import\n\n1. Open Anki → File → Import\n2. Select the CSV file\n3. Set type to **Basic** (for qa) or **Cloze** (for cloze)\n4. Ensure field separator is semicolon (`;`)\n5. Click Import\n\nSee `references/anki-import.md` for detailed instructions with screenshots.\n\n## Installation (Hermes Agent)\n\nCopy or symlink this directory into your skills folder:\n\n```bash\ncp -r flashcard-forge ~/.hermes/skills/\n```\n\nHermes auto-discovers skills with a valid `SKILL.md`. See the\n[skills docs](https://hermes-agent.nousresearch.com/docs) for details.\n\n## Requirements\n\n- Python 3.8+ (stdlib only — no pip install needed)\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.2:_meta.json\n\n{\n  \"ownerId\": \"kn75wwn4x6djaf28jbykeamazd81gtdp\",\n  \"slug\": \"flashcard-forge\",\n  \"version\": \"0.1.2\",\n  \"publishedAt\": 1786688362104\n}\n\nFile v0.1.2:references/anki-import.md\n\n# Anki Import Guide\n\nFlashcard Forge outputs CSV files designed for direct import into\n[Anki](https://apps.ankiweb.net/). This guide walks through the import process\nfor both Q&A (Basic) and cloze card types.\n\n## CSV Format\n\n### Q&A CSV (Basic cards)\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Front;Back`\n- **Fields are quoted** to handle commas and newlines within card text\n\n### Cloze CSV (Cloze cards)\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"DNA stands for {{c1::deoxyribonucleic acid}}\";\"\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Text;Extra`\n- Cloze deletions use `{{c1::...}}` syntax\n- The `Extra` field is for additional context (often empty)\n\n## Importing Q&A Cards (Basic)\n\n1. **Open Anki** and select or create a deck.\n2. Go to **File → Import...** (or press `Ctrl+I` / `Cmd+I`).\n3. Select your `.csv` file.\n4. In the import dialog:\n   - **Type**: Basic\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`) — Anki usually auto-detects\n5. Verify the field mapping: column 1 → Front, column 2 → Back.\n6. Click **Import**.\n\n### Importing Cloze Cards\n\n1. **Ensure you have a Cloze note type.** Anki includes one by default. If you\n   don't see it, go to Tools → Manage Note Types → Add → Cloze.\n2. Go to **File → Import...**\n3. Select your cloze `.csv` file.\n4. In the import dialog:\n   - **Type**: Cloze\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`)\n5. Verify the field mapping: column 1 → Text, column 2 → Extra.\n6. Click **Import**.\n\n> **Important:** Cloze cards with no `{{c1::...}}` deletion will fail to import.\n> Flashcard Forge guarantees at least one cloze per card.\n\n## Common Import Issues\n\n### \"The first field of this note type must be unique\"\n\nThis happens if Anki detects duplicate front text. Options:\n\n- Enable \"Allow HTML in fields\" is **not** the fix — instead, update existing\n  cards on import.\n- Or, pre-deduplicate your CSV. Flashcard Forge deduplicates within a single\n  run; if you're merging multiple runs, dedup manually.\n\n### Garbled characters\n\nEnsure the CSV is UTF-8 encoded. Flashcard Forge always writes UTF-8. If you\nopened and re-saved the file in Excel, it may have changed the encoding —\nre-export from the script instead.\n\n### Wrong delimiter detected\n\nIf Anki shows all data in one column, the delimiter wasn't auto-detected. In\nthe import dialog, manually set the field separator to semicolon.\n\n### Cloze cards show as blank\n\nThe note type must be **Cloze**, not Basic. If you imported cloze CSV as Basic\ncards, delete them and re-import with the correct type.\n\n## Bulk Import Tips\n\n- **Large decks**: Import in batches of 200-500 cards to avoid performance\n  issues.\n- **Tags**: Add tags during import (e.g., `biology`, `chapter-3`) for easier\n  filtering.\n- **Review after import**: Always review 10-20 cards to catch extraction errors\n  before committing to a study schedule.\n\n## Verification Checklist\n\n- [ ] CSV opens correctly in a plain text editor\n- [ ] Fields are semicolon-separated and quoted\n- [ ] Cloze CSV contains `{{c1::...}}` syntax\n- [ ] Note type matches card mode (Basic for qa, Cloze for cloze)\n- [ ] Imported cards render correctly in Anki browser\n- [ ] Sample review session shows correct front/back\n\nFile v0.1.2:references/extraction-patterns.md\n\n# Extraction Patterns\n\nThis document catalogs the regex patterns Flashcard Forge uses to extract\nflashcard-worthy content from text. Each pattern targets a specific sentence\nstructure common in educational material.\n\n## Definition Patterns\n\nThese extract \"term → definition\" pairs, producing cards with the term as the\nfront and the definition as the back.\n\n### \"X is Y\"\n\n```regex\n\\b([A-Z][a-z]+(?:\\s+\\w+){0,4})\\s+is\\s+(?:a|an|the)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Photosynthesis is a process by which plants make food.\"\n- \"Mitosis is a type of cell division.\"\n\n### \"X is defined as Y\"\n\n```regex\n\\b(.+?)\\s+is\\s+defined\\s+as\\s+(.+?)[.]\n```\n\n### \"X refers to Y\" / \"X means Y\"\n\n```regex\n\\b(.+?)\\s+(?:refers\\s+to|means)\\s+(.+?)[.]\n```\n\n### \"X: Y\" (colon definitions)\n\n```regex\n^([A-Z][^:]{2,40}):\\s+(.+?)[.]?$\n```\n\nMatches:\n- \"Photosynthesis: The process by which plants convert light to energy.\"\n\n## Q&A Patterns\n\n### Explicit question markers\n\n```regex\n\\b(What|Why|How|When|Where|Who|Which)\\s+.+?\\?\\s*(.+?)[.]?\n```\n\nMatches embedded questions and their answers:\n- \"What is DNA? It is the genetic material in cells.\"\n\n### \"The question is...\" / \"The answer is...\"\n\n```regex\n\\bThe\\s+(?:question|answer)\\s+is\\s+(.+?)[.]\n```\n\n## List Patterns\n\n### \"There are N types of X: A, B, C\"\n\n```regex\n\\bThere\\s+are\\s+(\\w+)\\s+(types|kinds|categories|forms)\\s+of\\s+(.+?):\\s*(.+?)[.]\n```\n\nProduces one card per list item with the category as context.\n\n### Numbered/enumerated items\n\n```regex\n^(?:\\d+[.)]\\s+|[-*]\\s+)(.+)$\n```\n\n## Cause/Effect Patterns\n\n```regex\n\\b(.+?)\\s+(?:causes|leads\\s+to|results\\s+in|produces|triggers)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Smoking causes lung cancer.\"\n- \"Insulin deficiency results in diabetes.\"\n\n## Comparison Patterns\n\n```regex\n\\b(?:Unlike|Whereas|While|In\\s+contrast\\s+to)\\s+(.+?),\\s+(.+?)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Unlike prokaryotes, eukaryotes have a nucleus.\"\n\n## Cloze Targets\n\nFor cloze mode, the following are high-priority candidates for masking:\n\n| Category         | Pattern                                    |\n| ---------------- | ------------------------------------------ |\n| Proper nouns     | `\\b[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)*\\b`       |\n| Numbers/Dates    | `\\b\\d{1,4}(?:\\s?(?:BCE|CE|AD|BC))?\\b`      |\n| Years            | `\\b(?:1[5-9]\\d{2}|20\\d{2})\\b`             |\n| Percentages      | `\\b\\d+(?:\\.\\d+)?\\s?%\\b`                    |\n| Chemical formulas| `\\b[A-Z][a-z]?\\d*(?:[A-Z][a-z]?\\d*)+\\b`    |\n| Key terms (all-caps acronyms) | `\\b[A-Z]{2,}\\b`              |\n\n## Scoring Heuristics\n\nEach extracted candidate is scored for information density:\n\n| Signal                   | Points |\n| ------------------------ | ------ |\n| Contains a number        | +2     |\n| Contains a definition    | +3     |\n| Contains a comparison    | +2     |\n| Sentence length 15-40    | +1     |\n| Sentence length > 50     | -1     |\n| Contains a list          | +2     |\n| Contains cause/effect    | +2     |\n\nCandidates scoring below a threshold (default: 2) are discarded.\n\n## Tuning\n\nAll patterns are defined as constants at the top of `flashcard_forge.py`.\nAdjust them to match the style of your input material:\n\n- **Textbook style** (formal definitions): strengthen definition patterns.\n- **Lecture transcript** (conversational): add patterns for \"so basically\" and\n  \"in other words.\"\n- **Scientific paper** (dense): lower `--min-length` and increase\n  `--max-cards`.\n\nFile v0.1.2:references/study-strategies.md\n\n# Study Strategies for Flashcard-Based Learning\n\nFlashcard Forge generates cards; these strategies help you use them effectively.\n\n## Core Principles\n\n### 1. Active Recall Over Recognition\n\nFlashcards work because they force you to **retrieve** information, not just\nrecognize it. Always try to answer before flipping the card. If you just read\nboth sides passively, you're wasting the medium.\n\n### 2. Spaced Repetition\n\nAnki's algorithm schedules reviews at increasing intervals:\n- New card → 1 day → 3 days → 7 days → 21 days → 60 days → ...\n\nTrust the algorithm. Don't cram all cards daily — that defeats the spacing\neffect. Review what Anki tells you to review, when it tells you.\n\n### 3. One Idea Per Card\n\nIf a card has multiple facts, split it. \"List the 3 types of muscle\" is a poor\ncard; three separate cards (one per muscle type) are better.\n\nFlashcard Forge's list-pattern extractor attempts to split lists into\nindividual cards, but review the output and split any that are still overloaded.\n\n## Card Quality\n\n### Good Cards\n\n- **Specific**: \"What enzyme unwinds DNA during replication?\" → \"Helicase\"\n- **Atomic**: One fact, one answer\n- **Contextual**: Include just enough context to disambiguate\n- **Varied**: Mix definitions, comparisons, cause/effect, and cloze\n\n### Bad Cards\n\n- **Vague**: \"Tell me about cells\" → too broad\n- **Multi-answer**: \"What are the 4 bases in DNA and how do they pair?\" → split\n- **Yes/No**: \"Is the mitochondria the powerhouse?\" → too easy to guess\n- **Wall of text**: Front or back longer than 2 sentences\n\n## Workflow\n\n### Daily Review (15-30 minutes)\n\n1. Open Anki, review all due cards.\n2. Answer each card **before** flipping.\n3. Rate honestly:\n   - **Again** (red): didn't know it → resets to relearn\n   - **Hard** (orange): barely got it → shorter interval\n   - **Good** (green): normal → standard interval\n   - **Easy** (blue): instant recall → longer interval\n4. Aim for 85-95% retention. Lower = cards too hard. Higher = cards too easy.\n\n### Weekly Deck Maintenance\n\n1. Review flagged/difficult cards — are they poorly written?\n2. Delete cards you consistently get right (they've served their purpose).\n3. Add new cards for material you struggled with this week.\n4. Check for duplicates (Anki's \"Find Duplicates\" tool).\n\n### Pre-Exam Intensive\n\n1. Import new material with Flashcard Forge 2-3 weeks before the exam.\n2. Review daily, focusing on new and due cards.\n3. In the final week, use Anki's \"cram\" mode to review all cards in the deck.\n4. Don't add new cards in the last 3 days — focus on consolidating.\n\n## Cloze vs Q&A\n\n| Use Q&A When                          | Use Cloze When                        |\n| ------------------------------------- | ------------------------------------- |\n| Testing a definition                  | Testing recall within context         |\n| Explicit question-answer structure    | Filling in a key term in a sentence   |\n| The \"answer\" is a short phrase        | The fact is embedded in a sentence    |\n| You want flexibility in phrasing      | You want to test recognition          |\n\nFlashcard Forge's `auto` mode generates both and deduplicates, giving you a\nmixed deck that engages different recall pathways.\n\n## Pitfalls\n\n1. **Card overload.** More cards ≠ better. 200 good cards beat 1000 mediocre\n   ones. Cap output with `--max-cards` and curate aggressively.\n\n2. **Passive review.** If you're not struggling to recall, the cards aren't\n   working. If recall is effortless, the card may be too easy — delete or\n   rephrase.\n\n3. **Neglecting difficult cards.** Anki's \"ease hell\" happens when you mark\n   cards \"Again\" repeatedly. Reset the ease or rewrite the card.\n\n4. **Stale decks.** If you haven't reviewed a deck in months, the backlog can\n   be demoralizing. Use Anki's \"Forget\" to reset cards to new, or archive the\n   deck.\n\n## Further Reading\n\n- [Anki Manual](https://docs.ankiweb.net/) — official documentation\n- [Augmenting Long-term Memory](https://supermemo.guru/wiki/Augmenting_Long-term_memory)\n  by Michael Nielsen — excellent essay on spaced repetition\n- [20 Rules of Formulating Knowledge](https://supermemo.guru/wiki/20_rules_of_formulating_knowledge)\n  by Piotr Woźniak — the canonical guide to writing good flashcards\n\nFile v0.1.2:scripts/sample_text.txt\n\nBiology 101 — Chapter 3: Cellular Biology\n\nThe cell is the basic structural and functional unit of life. All living\norganisms are composed of one or more cells. Cells were discovered by Robert\nHooke in 1665 when he observed cork under a microscope.\n\nThere are two types of cells: prokaryotic cells and eukaryotic cells.\nProkaryotic cells lack a nucleus. Eukaryotic cells have a membrane-bound\nnucleus.\n\nThe mitochondria is the powerhouse of the cell. It is responsible for producing\nATP through cellular respiration. Mitochondria have their own DNA, which\nsuggests they originated from free-living bacteria.\n\nPhotosynthesis is the process by which plants convert light energy into\nchemical energy. It occurs in the chloroplasts of plant cells. The overall\nequation is: 6CO2 + 6H2O + light energy produces C6H12O6 + 6O2.\n\nWhat is DNA? DNA is deoxyribonucleic acid, the molecule that carries genetic\ninformation in all living organisms. DNA was discovered by James Watson and\nFrancis Crick in 1953.\n\nUnlike prokaryotes, eukaryotes have membrane-bound organelles. The nucleus,\nmitochondria, and endoplasmic reticulum are all examples of organelles.\n\nThe cell membrane is defined as a selectively permeable barrier that surrounds\nthe cell. It controls what enters and exits the cell.\n\nOsmosis refers to the diffusion of water across a semipermeable membrane.\nMitosis is a type of cell division that produces two identical daughter cells.\n\nThere are four phases of mitosis: prophase, metaphase, anaphase, and telophase.\n\nInsufficient insulin results in diabetes. Smoking causes lung cancer and\nincreases the risk of heart disease.\n\nDNA stands for deoxyribonucleic acid. RNA stands for ribonucleic acid.\n\nFile v0.1.2:skill-card.md\n\n## Description:\n\nConvert text from PDF excerpts, lecture notes, articles, and textbook chapters into spaced-repetition flashcards, with Anki-importable CSV, Q&A, cloze-deletion, and JSON output modes.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[voronindenis5](https://clawhub.ai/user/voronindenis5)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nStudents, educators, and agents supporting study workflows use this skill to convert selected source text into reviewable flashcards for Anki or downstream processing. It is useful for extracting definitions, key facts, Q&A pairs, and cloze-deletion prompts from study material.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The script reads local study files selected by the user, which may include unrelated private documents if broad input paths are used.\n\nMitigation: Run it only on intended study source files and use explicit input paths.\n\nRisk: Reusing an output path may overwrite an existing flashcard file.\n\nMitigation: Choose a fresh output path or confirm the existing file can be replaced before running the command.\n\nRisk: Automatically extracted cards can be low quality when the source text is noisy, overly long, or poorly structured.\n\nMitigation: Review generated cards before importing them into Anki, and use filtering options such as max cards, minimum sentence length, and mode selection.\n\n## Reference(s):\n\n- [Server-resolved GitHub source](https://github.com/voronindenis5/flashcard-forge)\n- [ClawHub skill page](https://clawhub.ai/voronindenis5/skills/flashcard-forge)\n- [Anki Import Guide](references/anki-import.md)\n- [Extraction Patterns](references/extraction-patterns.md)\n- [Study Strategies for Flashcard-Based Learning](references/study-strategies.md)\n- [Anki](https://apps.ankiweb.net/)\n- [Anki Manual](https://docs.ankiweb.net/)\n- [Augmenting Long-term Memory](https://supermemo.guru/wiki/Augmenting_Long-term_memory)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with shell commands; generated flashcard files are CSV or JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [CSV output is semicolon-separated and quoted for Anki import; JSON output contains front, back, type, and source fields.]\n\n## Skill Version(s):\n\n0.1.2 (source: server release metadata; SKILL.md frontmatter states 1.0.0)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.2:LICENSE\n\nMIT License\n\nCopyright (c) 2026 Denis Voronin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v0.1.1: 12 files, 19332 bytes\n\nFiles: LICENSE (1057b), README.md (3073b), references (0b), references/anki-import.md (3507b), references/extraction-patterns.md (3387b), references/study-strategies.md (4281b), scripts (0b), scripts/flashcard_forge.py (20338b), scripts/sample_text.txt (1700b), skill-card.md (2587b), SKILL.md (5070b), _meta.json (134b)\n\nFile v0.1.1:SKILL.md\n\n---\nname: flashcard-forge\ndescription: >\n  Convert any text — PDF excerpts, lecture notes, articles, textbook chapters —\n  into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and\n  cloze-deletion modes using regex-based extraction and sentence analysis.\nversion: 1.0.0\nauthor: Denis Voronin\nlicense: MIT\ntags:\n  - education\n  - flashcards\n  - anki\n  - spaced-repetition\n  - study\n  - text-processing\n---\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\n`Flashcard Forge` is a skill that transforms study material (PDFs, lecture\nnotes, articles, textbook chapters) into spaced-repetition flashcards. It\nextracts key facts, definitions, and Q&A pairs using regex patterns and\nsentence-structure analysis, then exports Anki-importable CSV files.\n\n## When to Use\n\nActivate this skill when you need to:\n\n- Convert a textbook chapter or lecture transcript into flashcards\n- Extract definitions, key facts, or Q&A from a body of text\n- Generate cloze (fill-in-the-blank) cards for memorization\n- Produce Anki-importable CSV from raw notes\n- Study for an exam by turning reading material into active recall cards\n\n## Modes\n\n### Q&A Mode (`--mode qa`)\n\nExtracts question-answer pairs and definition pairs:\n\n- **Definition patterns**: \"X is defined as Y\", \"X refers to Y\", \"X means Y\"\n- **Explicit questions**: sentences containing \"What/Why/How/When/Where\" markers\n- **List patterns**: \"There are N types of X: A, B, C\"\n- **Cause/effect**: \"X causes Y\", \"X results in Y\"\n- **Comparison**: \"Unlike X, Y does Z\"\n\n### Cloze Mode (`--mode cloze`)\n\nGenerates fill-in-the-blank cards by identifying key terms in each sentence and\nmasking them:\n\n- Nouns and proper nouns are candidates for clozing\n- Numbers, dates, and named entities are high-priority cloze targets\n- Each card uses Anki's `{{c1::...}}` cloze syntax\n\n### Auto Mode (`--mode auto`, default)\n\nRuns both modes and merges results, deduplicating by question text.\n\n## Quick Reference\n\n| Need                        | Command                                                         |\n| --------------------------- | --------------------------------------------------------------- |\n| Q&A cards from a text file  | `python3 scripts/flashcard_forge.py notes.txt`                  |\n| Cloze cards                 | `python3 scripts/flashcard_forge.py notes.txt --mode cloze`     |\n| Anki CSV output             | `python3 scripts/flashcard_forge.py notes.txt -o deck.csv`      |\n| Custom cloze count          | `python3 scripts/flashcard_forge.py notes.txt --max-cloze 3`    |\n| Min sentence length filter  | `python3 scripts/flashcard_forge.py notes.txt --min-length 20`  |\n| JSON output                 | `python3 scripts/flashcard_forge.py notes.txt --format json`    |\n\n## How It Works\n\n1. **Read & clean** — load the text, normalize whitespace, strip markdown\n   artifacts.\n2. **Segment** — split into sentences using punctuation-aware tokenization.\n3. **Extract** — apply regex patterns (see `references/extraction-patterns.md`)\n   to find definitions, Q&A, lists, cause/effect, and comparisons.\n4. **Rank** — score each candidate by information density (presence of key\n   terms, numbers, definitions).\n5. **Deduplicate** — remove near-identical cards using Jaccard similarity.\n6. **Export** — write Anki-importable CSV (semicolon-separated, quoted) or JSON.\n\nSee `references/anki-import.md` for how to import the CSV into Anki.\n\n## Files\n\n- `references/extraction-patterns.md` — catalog of regex extraction patterns\n- `references/anki-import.md` — step-by-step Anki import guide\n- `references/study-strategies.md` — best practices for flashcard-based learning\n- `scripts/flashcard_forge.py` — the main extraction and export script\n- `scripts/sample_text.txt` — example input demonstrating all pattern types\n\n## Common Pitfalls\n\n1. **Over-generation.** A long text can produce hundreds of mediocre cards. Use\n   `--max-cards` to cap output and `--min-length` to filter trivial sentences.\n\n2. **CSV delimiter conflicts.** Anki expects semicolon-separated values for\n   basic cards. The script handles quoting automatically; don't open the CSV in\n   Excel and re-save (it may change the delimiter).\n\n3. **Cloze mode needs cloze note type.** Cloze cards only work with Anki's\n   \"Cloze\" note type, not \"Basic.\" See `references/anki-import.md`.\n\n4. **Poor input quality.** Garbled OCR or deeply nested markdown confuses the\n   sentence segmenter. Pre-clean the text for best results.\n\n5. **Duplicates across runs.** The dedup step is within-file only. If you merge\n   multiple outputs, dedup manually or use `--format json` and post-process.\n\n## Verification Checklist\n\n- [ ] Input text is reasonably clean (no raw HTML, minimal OCR artifacts)\n- [ ] Chosen mode matches your Anki deck type (qa → Basic, cloze → Cloze)\n- [ ] `--max-cards` set if the input is large\n- [ ] CSV opens correctly in a text editor (fields quoted, semicolon-separated)\n- [ ] Test-imported into Anki and reviewed 5-10 cards for quality\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.1:README.md\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\nA [Hermes Agent](https://hermes-agent.nousresearch.com/docs) / OpenClaw skill\nthat converts study material — PDF excerpts, lecture notes, articles, textbook\nchapters — into **Anki-importable flashcards** using regex-based extraction and\nsentence analysis.\n\n## Why\n\nStudents spend hours manually making flashcards from reading material. Most of\nthat work is mechanical: find the definitions, extract the key facts, format\nthem as Q&A or cloze cards. Flashcard Forge automates the extraction so you can\nfocus on reviewing, not transcribing.\n\n## What's Included\n\n- **`SKILL.md`** — core skill: modes, quick-reference table, how-it-works.\n- **`references/`**\n  - `extraction-patterns.md` — catalog of regex patterns the extractor uses.\n  - `anki-import.md` — step-by-step guide to importing CSV into Anki.\n  - `study-strategies.md` — best practices for flashcard-based learning.\n- **`scripts/flashcard_forge.py`** — the main script (stdlib only, no deps).\n- **`scripts/sample_text.txt`** — example input demonstrating all pattern types.\n\n## Quick Start\n\n```bash\n# Generate Q&A flashcards (default mode)\npython3 scripts/flashcard_forge.py notes.txt -o deck.csv\n\n# Generate cloze (fill-in-the-blank) cards\npython3 scripts/flashcard_forge.py notes.txt --mode cloze -o cloze.csv\n\n# Auto mode: both Q&A and cloze, deduplicated\npython3 scripts/flashcard_forge.py notes.txt --mode auto -o deck.csv\n\n# Cap output to 50 cards, filter short sentences\npython3 scripts/flashcard_forge.py notes.txt --max-cards 50 --min-length 25\n\n# JSON output for programmatic use\npython3 scripts/flashcard_forge.py notes.txt --format json -o deck.json\n```\n\nExample CSV output:\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light energy into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\nExample cloze output:\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"Photosynthesis occurs in the {{c1::chloroplasts}} of plant cells\";\"\"\n```\n\n## Modes\n\n| Mode    | Card Type  | Best For                          |\n| ------- | ---------- | --------------------------------- |\n| `qa`    | Basic Q&A  | Definitions, explicit questions   |\n| `cloze` | Cloze      | Fill-in-the-blank memorization    |\n| `auto`  | Both       | General use (default)             |\n\n## Anki Import\n\n1. Open Anki → File → Import\n2. Select the CSV file\n3. Set type to **Basic** (for qa) or **Cloze** (for cloze)\n4. Ensure field separator is semicolon (`;`)\n5. Click Import\n\nSee `references/anki-import.md` for detailed instructions with screenshots.\n\n## Installation (Hermes Agent)\n\nCopy or symlink this directory into your skills folder:\n\n```bash\ncp -r flashcard-forge ~/.hermes/skills/\n```\n\nHermes auto-discovers skills with a valid `SKILL.md`. See the\n[skills docs](https://hermes-agent.nousresearch.com/docs) for details.\n\n## Requirements\n\n- Python 3.8+ (stdlib only — no pip install needed)\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn75wwn4x6djaf28jbykeamazd81gtdp\",\n  \"slug\": \"flashcard-forge\",\n  \"version\": \"0.1.1\",\n  \"publishedAt\": 1786449471446\n}\n\nFile v0.1.1:references/anki-import.md\n\n# Anki Import Guide\n\nFlashcard Forge outputs CSV files designed for direct import into\n[Anki](https://apps.ankiweb.net/). This guide walks through the import process\nfor both Q&A (Basic) and cloze card types.\n\n## CSV Format\n\n### Q&A CSV (Basic cards)\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Front;Back`\n- **Fields are quoted** to handle commas and newlines within card text\n\n### Cloze CSV (Cloze cards)\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"DNA stands for {{c1::deoxyribonucleic acid}}\";\"\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Text;Extra`\n- Cloze deletions use `{{c1::...}}` syntax\n- The `Extra` field is for additional context (often empty)\n\n## Importing Q&A Cards (Basic)\n\n1. **Open Anki** and select or create a deck.\n2. Go to **File → Import...** (or press `Ctrl+I` / `Cmd+I`).\n3. Select your `.csv` file.\n4. In the import dialog:\n   - **Type**: Basic\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`) — Anki usually auto-detects\n5. Verify the field mapping: column 1 → Front, column 2 → Back.\n6. Click **Import**.\n\n### Importing Cloze Cards\n\n1. **Ensure you have a Cloze note type.** Anki includes one by default. If you\n   don't see it, go to Tools → Manage Note Types → Add → Cloze.\n2. Go to **File → Import...**\n3. Select your cloze `.csv` file.\n4. In the import dialog:\n   - **Type**: Cloze\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`)\n5. Verify the field mapping: column 1 → Text, column 2 → Extra.\n6. Click **Import**.\n\n> **Important:** Cloze cards with no `{{c1::...}}` deletion will fail to import.\n> Flashcard Forge guarantees at least one cloze per card.\n\n## Common Import Issues\n\n### \"The first field of this note type must be unique\"\n\nThis happens if Anki detects duplicate front text. Options:\n\n- Enable \"Allow HTML in fields\" is **not** the fix — instead, update existing\n  cards on import.\n- Or, pre-deduplicate your CSV. Flashcard Forge deduplicates within a single\n  run; if you're merging multiple runs, dedup manually.\n\n### Garbled characters\n\nEnsure the CSV is UTF-8 encoded. Flashcard Forge always writes UTF-8. If you\nopened and re-saved the file in Excel, it may have changed the encoding —\nre-export from the script instead.\n\n### Wrong delimiter detected\n\nIf Anki shows all data in one column, the delimiter wasn't auto-detected. In\nthe import dialog, manually set the field separator to semicolon.\n\n### Cloze cards show as blank\n\nThe note type must be **Cloze**, not Basic. If you imported cloze CSV as Basic\ncards, delete them and re-import with the correct type.\n\n## Bulk Import Tips\n\n- **Large decks**: Import in batches of 200-500 cards to avoid performance\n  issues.\n- **Tags**: Add tags during import (e.g., `biology`, `chapter-3`) for easier\n  filtering.\n- **Review after import**: Always review 10-20 cards to catch extraction errors\n  before committing to a study schedule.\n\n## Verification Checklist\n\n- [ ] CSV opens correctly in a plain text editor\n- [ ] Fields are semicolon-separated and quoted\n- [ ] Cloze CSV contains `{{c1::...}}` syntax\n- [ ] Note type matches card mode (Basic for qa, Cloze for cloze)\n- [ ] Imported cards render correctly in Anki browser\n- [ ] Sample review session shows correct front/back\n\nFile v0.1.1:references/extraction-patterns.md\n\n# Extraction Patterns\n\nThis document catalogs the regex patterns Flashcard Forge uses to extract\nflashcard-worthy content from text. Each pattern targets a specific sentence\nstructure common in educational material.\n\n## Definition Patterns\n\nThese extract \"term → definition\" pairs, producing cards with the term as the\nfront and the definition as the back.\n\n### \"X is Y\"\n\n```regex\n\\b([A-Z][a-z]+(?:\\s+\\w+){0,4})\\s+is\\s+(?:a|an|the)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Photosynthesis is a process by which plants make food.\"\n- \"Mitosis is a type of cell division.\"\n\n### \"X is defined as Y\"\n\n```regex\n\\b(.+?)\\s+is\\s+defined\\s+as\\s+(.+?)[.]\n```\n\n### \"X refers to Y\" / \"X means Y\"\n\n```regex\n\\b(.+?)\\s+(?:refers\\s+to|means)\\s+(.+?)[.]\n```\n\n### \"X: Y\" (colon definitions)\n\n```regex\n^([A-Z][^:]{2,40}):\\s+(.+?)[.]?$\n```\n\nMatches:\n- \"Photosynthesis: The process by which plants convert light to energy.\"\n\n## Q&A Patterns\n\n### Explicit question markers\n\n```regex\n\\b(What|Why|How|When|Where|Who|Which)\\s+.+?\\?\\s*(.+?)[.]?\n```\n\nMatches embedded questions and their answers:\n- \"What is DNA? It is the genetic material in cells.\"\n\n### \"The question is...\" / \"The answer is...\"\n\n```regex\n\\bThe\\s+(?:question|answer)\\s+is\\s+(.+?)[.]\n```\n\n## List Patterns\n\n### \"There are N types of X: A, B, C\"\n\n```regex\n\\bThere\\s+are\\s+(\\w+)\\s+(types|kinds|categories|forms)\\s+of\\s+(.+?):\\s*(.+?)[.]\n```\n\nProduces one card per list item with the category as context.\n\n### Numbered/enumerated items\n\n```regex\n^(?:\\d+[.)]\\s+|[-*]\\s+)(.+)$\n```\n\n## Cause/Effect Patterns\n\n```regex\n\\b(.+?)\\s+(?:causes|leads\\s+to|results\\s+in|produces|triggers)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Smoking causes lung cancer.\"\n- \"Insulin deficiency results in diabetes.\"\n\n## Comparison Patterns\n\n```regex\n\\b(?:Unlike|Whereas|While|In\\s+contrast\\s+to)\\s+(.+?),\\s+(.+?)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Unlike prokaryotes, eukaryotes have a nucleus.\"\n\n## Cloze Targets\n\nFor cloze mode, the following are high-priority candidates for masking:\n\n| Category         | Pattern                                    |\n| ---------------- | ------------------------------------------ |\n| Proper nouns     | `\\b[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)*\\b`       |\n| Numbers/Dates    | `\\b\\d{1,4}(?:\\s?(?:BCE|CE|AD|BC))?\\b`      |\n| Years            | `\\b(?:1[5-9]\\d{2}|20\\d{2})\\b`             |\n| Percentages      | `\\b\\d+(?:\\.\\d+)?\\s?%\\b`                    |\n| Chemical formulas| `\\b[A-Z][a-z]?\\d*(?:[A-Z][a-z]?\\d*)+\\b`    |\n| Key terms (all-caps acronyms) | `\\b[A-Z]{2,}\\b`              |\n\n## Scoring Heuristics\n\nEach extracted candidate is scored for information density:\n\n| Signal                   | Points |\n| ------------------------ | ------ |\n| Contains a number        | +2     |\n| Contains a definition    | +3     |\n| Contains a comparison    | +2     |\n| Sentence length 15-40    | +1     |\n| Sentence length > 50     | -1     |\n| Contains a list          | +2     |\n| Contains cause/effect    | +2     |\n\nCandidates scoring below a threshold (default: 2) are discarded.\n\n## Tuning\n\nAll patterns are defined as constants at the top of `flashcard_forge.py`.\nAdjust them to match the style of your input material:\n\n- **Textbook style** (formal definitions): strengthen definition patterns.\n- **Lecture transcript** (conversational): add patterns for \"so basically\" and\n  \"in other words.\"\n- **Scientific paper** (dense): lower `--min-length` and increase\n  `--max-cards`.\n\nFile v0.1.1:references/study-strategies.md\n\n# Study Strategies for Flashcard-Based Learning\n\nFlashcard Forge generates cards; these strategies help you use them effectively.\n\n## Core Principles\n\n### 1. Active Recall Over Recognition\n\nFlashcards work because they force you to **retrieve** information, not just\nrecognize it. Always try to answer before flipping the card. If you just read\nboth sides passively, you're wasting the medium.\n\n### 2. Spaced Repetition\n\nAnki's algorithm schedules reviews at increasing intervals:\n- New card → 1 day → 3 days → 7 days → 21 days → 60 days → ...\n\nTrust the algorithm. Don't cram all cards daily — that defeats the spacing\neffect. Review what Anki tells you to review, when it tells you.\n\n### 3. One Idea Per Card\n\nIf a card has multiple facts, split it. \"List the 3 types of muscle\" is a poor\ncard; three separate cards (one per muscle type) are better.\n\nFlashcard Forge's list-pattern extractor attempts to split lists into\nindividual cards, but review the output and split any that are still overloaded.\n\n## Card Quality\n\n### Good Cards\n\n- **Specific**: \"What enzyme unwinds DNA during replication?\" → \"Helicase\"\n- **Atomic**: One fact, one answer\n- **Contextual**: Include just enough context to disambiguate\n- **Varied**: Mix definitions, comparisons, cause/effect, and cloze\n\n### Bad Cards\n\n- **Vague**: \"Tell me about cells\" → too broad\n- **Multi-answer**: \"What are the 4 bases in DNA and how do they pair?\" → split\n- **Yes/No**: \"Is the mitochondria the powerhouse?\" → too easy to guess\n- **Wall of text**: Front or back longer than 2 sentences\n\n## Workflow\n\n### Daily Review (15-30 minutes)\n\n1. Open Anki, review all due cards.\n2. Answer each card **before** flipping.\n3. Rate honestly:\n   - **Again** (red): didn't know it → resets to relearn\n   - **Hard** (orange): barely got it → shorter interval\n   - **Good** (green): normal → standard interval\n   - **Easy** (blue): instant recall → longer interval\n4. Aim for 85-95% retention. Lower = cards too hard. Higher = cards too easy.\n\n### Weekly Deck Maintenance\n\n1. Review flagged/difficult cards — are they poorly written?\n2. Delete cards you consistently get right (they've served their purpose).\n3. Add new cards for material you struggled with this week.\n4. Check for duplicates (Anki's \"Find Duplicates\" tool).\n\n### Pre-Exam Intensive\n\n1. Import new material with Flashcard Forge 2-3 weeks before the exam.\n2. Review daily, focusing on new and due cards.\n3. In the final week, use Anki's \"cram\" mode to review all cards in the deck.\n4. Don't add new cards in the last 3 days — focus on consolidating.\n\n## Cloze vs Q&A\n\n| Use Q&A When                          | Use Cloze When                        |\n| ------------------------------------- | ------------------------------------- |\n| Testing a definition                  | Testing recall within context         |\n| Explicit question-answer structure    | Filling in a key term in a sentence   |\n| The \"answer\" is a short phrase        | The fact is embedded in a sentence    |\n| You want flexibility in phrasing      | You want to test recognition          |\n\nFlashcard Forge's `auto` mode generates both and deduplicates, giving you a\nmixed deck that engages different recall pathways.\n\n## Pitfalls\n\n1. **Card overload.** More cards ≠ better. 200 good cards beat 1000 mediocre\n   ones. Cap output with `--max-cards` and curate aggressively.\n\n2. **Passive review.** If you're not struggling to recall, the cards aren't\n   working. If recall is effortless, the card may be too easy — delete or\n   rephrase.\n\n3. **Neglecting difficult cards.** Anki's \"ease hell\" happens when you mark\n   cards \"Again\" repeatedly. Reset the ease or rewrite the card.\n\n4. **Stale decks.** If you haven't reviewed a deck in months, the backlog can\n   be demoralizing. Use Anki's \"Forget\" to reset cards to new, or archive the\n   deck.\n\n## Further Reading\n\n- [Anki Manual](https://docs.ankiweb.net/) — official documentation\n- [Augmenting Long-term Memory](https://supermemo.guru/wiki/Augmenting_Long-term_memory)\n  by Michael Nielsen — excellent essay on spaced repetition\n- [20 Rules of Formulating Knowledge](https://supermemo.guru/wiki/20_rules_of_formulating_knowledge)\n  by Piotr Woźniak — the canonical guide to writing good flashcards\n\nFile v0.1.1:scripts/sample_text.txt\n\nBiology 101 — Chapter 3: Cellular Biology\n\nThe cell is the basic structural and functional unit of life. All living\norganisms are composed of one or more cells. Cells were discovered by Robert\nHooke in 1665 when he observed cork under a microscope.\n\nThere are two types of cells: prokaryotic cells and eukaryotic cells.\nProkaryotic cells lack a nucleus. Eukaryotic cells have a membrane-bound\nnucleus.\n\nThe mitochondria is the powerhouse of the cell. It is responsible for producing\nATP through cellular respiration. Mitochondria have their own DNA, which\nsuggests they originated from free-living bacteria.\n\nPhotosynthesis is the process by which plants convert light energy into\nchemical energy. It occurs in the chloroplasts of plant cells. The overall\nequation is: 6CO2 + 6H2O + light energy produces C6H12O6 + 6O2.\n\nWhat is DNA? DNA is deoxyribonucleic acid, the molecule that carries genetic\ninformation in all living organisms. DNA was discovered by James Watson and\nFrancis Crick in 1953.\n\nUnlike prokaryotes, eukaryotes have membrane-bound organelles. The nucleus,\nmitochondria, and endoplasmic reticulum are all examples of organelles.\n\nThe cell membrane is defined as a selectively permeable barrier that surrounds\nthe cell. It controls what enters and exits the cell.\n\nOsmosis refers to the diffusion of water across a semipermeable membrane.\nMitosis is a type of cell division that produces two identical daughter cells.\n\nThere are four phases of mitosis: prophase, metaphase, anaphase, and telophase.\n\nInsufficient insulin results in diabetes. Smoking causes lung cancer and\nincreases the risk of heart disease.\n\nDNA stands for deoxyribonucleic acid. RNA stands for ribonucleic acid.\n\nFile v0.1.1:skill-card.md\n\n## Description:\n\nConvert study text such as PDF excerpts, lecture notes, articles, and textbook chapters into spaced-repetition flashcards, including Anki-importable CSV with Q&A and cloze-deletion modes using regex-based extraction and sentence analysis.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[voronindenis5](https://clawhub.ai/user/voronindenis5)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nStudents, educators, and developers use this skill to turn raw study material into flashcards for active recall and spaced-repetition review. It is useful for generating Q&A cards, cloze cards, and Anki-ready CSV or JSON outputs from local text files.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Local study notes may contain sensitive private content that becomes part of generated flashcard output.\n\nMitigation: Use non-sensitive inputs or confirm that private notes are acceptable to transform before generating CSV or JSON files.\n\nRisk: User-selected output paths can overwrite or place generated flashcard files where not intended.\n\nMitigation: Choose explicit output paths and check for existing files before writing output.\n\nRisk: Regex-based extraction can produce inaccurate or low-quality cards from garbled OCR, noisy markup, or very large source texts.\n\nMitigation: Clean input text first, cap large runs with max-card settings, and review generated cards before importing them into a study deck.\n\n## Reference(s):\n\n- [Server-resolved source repository](https://github.com/voronindenis5/flashcard-forge)\n- [Extraction Patterns](references/extraction-patterns.md)\n- [Anki Import Guide](references/anki-import.md)\n- [Study Strategies for Flashcard-Based Learning](references/study-strategies.md)\n- [Anki](https://apps.ankiweb.net/)\n- [Anki Manual](https://docs.ankiweb.net/)\n\n## Skill Output:\n\n**Output Type(s):** [Files, Text, Shell commands, Guidance]\n\n**Output Format:** [Markdown guidance with command examples plus Anki-importable CSV or JSON flashcard files.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [CSV output uses semicolon-separated quoted fields; JSON output is an array of flashcard objects with front, back, type, and source fields.]\n\n## Skill Version(s):\n\n0.1.1 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.1:LICENSE\n\nMIT License\n\nCopyright (c) 2026 Denis Voronin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v0.1.0: 12 files, 19433 bytes\n\nFiles: LICENSE (1057b), README.md (3073b), references (0b), references/anki-import.md (3507b), references/extraction-patterns.md (3387b), references/study-strategies.md (4281b), scripts (0b), scripts/flashcard_forge.py (20338b), scripts/sample_text.txt (1700b), skill-card.md (2808b), SKILL.md (5070b), _meta.json (134b)\n\nFile v0.1.0:SKILL.md\n\n---\nname: flashcard-forge\ndescription: >\n  Convert any text — PDF excerpts, lecture notes, articles, textbook chapters —\n  into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and\n  cloze-deletion modes using regex-based extraction and sentence analysis.\nversion: 1.0.0\nauthor: Denis Voronin\nlicense: MIT\ntags:\n  - education\n  - flashcards\n  - anki\n  - spaced-repetition\n  - study\n  - text-processing\n---\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\n`Flashcard Forge` is a skill that transforms study material (PDFs, lecture\nnotes, articles, textbook chapters) into spaced-repetition flashcards. It\nextracts key facts, definitions, and Q&A pairs using regex patterns and\nsentence-structure analysis, then exports Anki-importable CSV files.\n\n## When to Use\n\nActivate this skill when you need to:\n\n- Convert a textbook chapter or lecture transcript into flashcards\n- Extract definitions, key facts, or Q&A from a body of text\n- Generate cloze (fill-in-the-blank) cards for memorization\n- Produce Anki-importable CSV from raw notes\n- Study for an exam by turning reading material into active recall cards\n\n## Modes\n\n### Q&A Mode (`--mode qa`)\n\nExtracts question-answer pairs and definition pairs:\n\n- **Definition patterns**: \"X is defined as Y\", \"X refers to Y\", \"X means Y\"\n- **Explicit questions**: sentences containing \"What/Why/How/When/Where\" markers\n- **List patterns**: \"There are N types of X: A, B, C\"\n- **Cause/effect**: \"X causes Y\", \"X results in Y\"\n- **Comparison**: \"Unlike X, Y does Z\"\n\n### Cloze Mode (`--mode cloze`)\n\nGenerates fill-in-the-blank cards by identifying key terms in each sentence and\nmasking them:\n\n- Nouns and proper nouns are candidates for clozing\n- Numbers, dates, and named entities are high-priority cloze targets\n- Each card uses Anki's `{{c1::...}}` cloze syntax\n\n### Auto Mode (`--mode auto`, default)\n\nRuns both modes and merges results, deduplicating by question text.\n\n## Quick Reference\n\n| Need                        | Command                                                         |\n| --------------------------- | --------------------------------------------------------------- |\n| Q&A cards from a text file  | `python3 scripts/flashcard_forge.py notes.txt`                  |\n| Cloze cards                 | `python3 scripts/flashcard_forge.py notes.txt --mode cloze`     |\n| Anki CSV output             | `python3 scripts/flashcard_forge.py notes.txt -o deck.csv`      |\n| Custom cloze count          | `python3 scripts/flashcard_forge.py notes.txt --max-cloze 3`    |\n| Min sentence length filter  | `python3 scripts/flashcard_forge.py notes.txt --min-length 20`  |\n| JSON output                 | `python3 scripts/flashcard_forge.py notes.txt --format json`    |\n\n## How It Works\n\n1. **Read & clean** — load the text, normalize whitespace, strip markdown\n   artifacts.\n2. **Segment** — split into sentences using punctuation-aware tokenization.\n3. **Extract** — apply regex patterns (see `references/extraction-patterns.md`)\n   to find definitions, Q&A, lists, cause/effect, and comparisons.\n4. **Rank** — score each candidate by information density (presence of key\n   terms, numbers, definitions).\n5. **Deduplicate** — remove near-identical cards using Jaccard similarity.\n6. **Export** — write Anki-importable CSV (semicolon-separated, quoted) or JSON.\n\nSee `references/anki-import.md` for how to import the CSV into Anki.\n\n## Files\n\n- `references/extraction-patterns.md` — catalog of regex extraction patterns\n- `references/anki-import.md` — step-by-step Anki import guide\n- `references/study-strategies.md` — best practices for flashcard-based learning\n- `scripts/flashcard_forge.py` — the main extraction and export script\n- `scripts/sample_text.txt` — example input demonstrating all pattern types\n\n## Common Pitfalls\n\n1. **Over-generation.** A long text can produce hundreds of mediocre cards. Use\n   `--max-cards` to cap output and `--min-length` to filter trivial sentences.\n\n2. **CSV delimiter conflicts.** Anki expects semicolon-separated values for\n   basic cards. The script handles quoting automatically; don't open the CSV in\n   Excel and re-save (it may change the delimiter).\n\n3. **Cloze mode needs cloze note type.** Cloze cards only work with Anki's\n   \"Cloze\" note type, not \"Basic.\" See `references/anki-import.md`.\n\n4. **Poor input quality.** Garbled OCR or deeply nested markdown confuses the\n   sentence segmenter. Pre-clean the text for best results.\n\n5. **Duplicates across runs.** The dedup step is within-file only. If you merge\n   multiple outputs, dedup manually or use `--format json` and post-process.\n\n## Verification Checklist\n\n- [ ] Input text is reasonably clean (no raw HTML, minimal OCR artifacts)\n- [ ] Chosen mode matches your Anki deck type (qa → Basic, cloze → Cloze)\n- [ ] `--max-cards` set if the input is large\n- [ ] CSV opens correctly in a text editor (fields quoted, semicolon-separated)\n- [ ] Test-imported into Anki and reviewed 5-10 cards for quality\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.0:README.md\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\nA [Hermes Agent](https://hermes-agent.nousresearch.com/docs) / OpenClaw skill\nthat converts study material — PDF excerpts, lecture notes, articles, textbook\nchapters — into **Anki-importable flashcards** using regex-based extraction and\nsentence analysis.\n\n## Why\n\nStudents spend hours manually making flashcards from reading material. Most of\nthat work is mechanical: find the definitions, extract the key facts, format\nthem as Q&A or cloze cards. Flashcard Forge automates the extraction so you can\nfocus on reviewing, not transcribing.\n\n## What's Included\n\n- **`SKILL.md`** — core skill: modes, quick-reference table, how-it-works.\n- **`references/`**\n  - `extraction-patterns.md` — catalog of regex patterns the extractor uses.\n  - `anki-import.md` — step-by-step guide to importing CSV into Anki.\n  - `study-strategies.md` — best practices for flashcard-based learning.\n- **`scripts/flashcard_forge.py`** — the main script (stdlib only, no deps).\n- **`scripts/sample_text.txt`** — example input demonstrating all pattern types.\n\n## Quick Start\n\n```bash\n# Generate Q&A flashcards (default mode)\npython3 scripts/flashcard_forge.py notes.txt -o deck.csv\n\n# Generate cloze (fill-in-the-blank) cards\npython3 scripts/flashcard_forge.py notes.txt --mode cloze -o cloze.csv\n\n# Auto mode: both Q&A and cloze, deduplicated\npython3 scripts/flashcard_forge.py notes.txt --mode auto -o deck.csv\n\n# Cap output to 50 cards, filter short sentences\npython3 scripts/flashcard_forge.py notes.txt --max-cards 50 --min-length 25\n\n# JSON output for programmatic use\npython3 scripts/flashcard_forge.py notes.txt --format json -o deck.json\n```\n\nExample CSV output:\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light energy into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\nExample cloze output:\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"Photosynthesis occurs in the {{c1::chloroplasts}} of plant cells\";\"\"\n```\n\n## Modes\n\n| Mode    | Card Type  | Best For                          |\n| ------- | ---------- | --------------------------------- |\n| `qa`    | Basic Q&A  | Definitions, explicit questions   |\n| `cloze` | Cloze      | Fill-in-the-blank memorization    |\n| `auto`  | Both       | General use (default)             |\n\n## Anki Import\n\n1. Open Anki → File → Import\n2. Select the CSV file\n3. Set type to **Basic** (for qa) or **Cloze** (for cloze)\n4. Ensure field separator is semicolon (`;`)\n5. Click Import\n\nSee `references/anki-import.md` for detailed instructions with screenshots.\n\n## Installation (Hermes Agent)\n\nCopy or symlink this directory into your skills folder:\n\n```bash\ncp -r flashcard-forge ~/.hermes/skills/\n```\n\nHermes auto-discovers skills with a valid `SKILL.md`. See the\n[skills docs](https://hermes-agent.nousresearch.com/docs) for details.\n\n## Requirements\n\n- Python 3.8+ (stdlib only — no pip install needed)\n\n## License\n\nMIT © Denis Voronin\n\nFile v0.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn75wwn4x6djaf28jbykeamazd81gtdp\",\n  \"slug\": \"flashcard-forge\",\n  \"version\": \"0.1.0\",\n  \"publishedAt\": 1785959321461\n}\n\nFile v0.1.0:references/anki-import.md\n\n# Anki Import Guide\n\nFlashcard Forge outputs CSV files designed for direct import into\n[Anki](https://apps.ankiweb.net/). This guide walks through the import process\nfor both Q&A (Basic) and cloze card types.\n\n## CSV Format\n\n### Q&A CSV (Basic cards)\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Front;Back`\n- **Fields are quoted** to handle commas and newlines within card text\n\n### Cloze CSV (Cloze cards)\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"DNA stands for {{c1::deoxyribonucleic acid}}\";\"\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Text;Extra`\n- Cloze deletions use `{{c1::...}}` syntax\n- The `Extra` field is for additional context (often empty)\n\n## Importing Q&A Cards (Basic)\n\n1. **Open Anki** and select or create a deck.\n2. Go to **File → Import...** (or press `Ctrl+I` / `Cmd+I`).\n3. Select your `.csv` file.\n4. In the import dialog:\n   - **Type**: Basic\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`) — Anki usually auto-detects\n5. Verify the field mapping: column 1 → Front, column 2 → Back.\n6. Click **Import**.\n\n### Importing Cloze Cards\n\n1. **Ensure you have a Cloze note type.** Anki includes one by default. If you\n   don't see it, go to Tools → Manage Note Types → Add → Cloze.\n2. Go to **File → Import...**\n3. Select your cloze `.csv` file.\n4. In the import dialog:\n   - **Type**: Cloze\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`)\n5. Verify the field mapping: column 1 → Text, column 2 → Extra.\n6. Click **Import**.\n\n> **Important:** Cloze cards with no `{{c1::...}}` deletion will fail to import.\n> Flashcard Forge guarantees at least one cloze per card.\n\n## Common Import Issues\n\n### \"The first field of this note type must be unique\"\n\nThis happens if Anki detects duplicate front text. Options:\n\n- Enable \"Allow HTML in fields\" is **not** the fix — instead, update existing\n  cards on import.\n- Or, pre-deduplicate your CSV. Flashcard Forge deduplicates within a single\n  run; if you're merging multiple runs, dedup manually.\n\n### Garbled characters\n\nEnsure the CSV is UTF-8 encoded. Flashcard Forge always writes UTF-8. If you\nopened and re-saved the file in Excel, it may have changed the encoding —\nre-export from the script instead.\n\n### Wrong delimiter detected\n\nIf Anki shows all data in one column, the delimiter wasn't auto-detected. In\nthe import dialog, manually set the field separator to semicolon.\n\n### Cloze cards show as blank\n\nThe note type must be **Cloze**, not Basic. If you imported cloze CSV as Basic\ncards, delete them and re-import with the correct type.\n\n## Bulk Import Tips\n\n- **Large decks**: Import in batches of 200-500 cards to avoid performance\n  issues.\n- **Tags**: Add tags during import (e.g., `biology`, `chapter-3`) for easier\n  filtering.\n- **Review after import**: Always review 10-20 cards to catch extraction errors\n  before committing to a study schedule.\n\n## Verification Checklist\n\n- [ ] CSV opens correctly in a plain text editor\n- [ ] Fields are semicolon-separated and quoted\n- [ ] Cloze CSV contains `{{c1::...}}` syntax\n- [ ] Note type matches card mode (Basic for qa, Cloze for cloze)\n- [ ] Imported cards render correctly in Anki browser\n- [ ] Sample review session shows correct front/back\n\nFile v0.1.0:references/extraction-patterns.md\n\n# Extraction Patterns\n\nThis document catalogs the regex patterns Flashcard Forge uses to extract\nflashcard-worthy content from text. Each pattern targets a specific sentence\nstructure common in educational material.\n\n## Definition Patterns\n\nThese extract \"term → definition\" pairs, producing cards with the term as the\nfront and the definition as the back.\n\n### \"X is Y\"\n\n```regex\n\\b([A-Z][a-z]+(?:\\s+\\w+){0,4})\\s+is\\s+(?:a|an|the)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Photosynthesis is a process by which plants make food.\"\n- \"Mitosis is a type of cell division.\"\n\n### \"X is defined as Y\"\n\n```regex\n\\b(.+?)\\s+is\\s+defined\\s+as\\s+(.+?)[.]\n```\n\n### \"X refers to Y\" / \"X means Y\"\n\n```regex\n\\b(.+?)\\s+(?:refers\\s+to|means)\\s+(.+?)[.]\n```\n\n### \"X: Y\" (colon definitions)\n\n```regex\n^([A-Z][^:]{2,40}):\\s+(.+?)[.]?$\n```\n\nMatches:\n- \"Photosynthesis: The process by which plants convert light to energy.\"\n\n## Q&A Patterns\n\n### Explicit question markers\n\n```regex\n\\b(What|Why|How|When|Where|Who|Which)\\s+.+?\\?\\s*(.+?)[.]?\n```\n\nMatches embedded questions and their answers:\n- \"What is DNA? It is the genetic material in cells.\"\n\n### \"The question is...\" / \"The answer is...\"\n\n```regex\n\\bThe\\s+(?:question|answer)\\s+is\\s+(.+?)[.]\n```\n\n## List Patterns\n\n### \"There are N types of X: A, B, C\"\n\n```regex\n\\bThere\\s+are\\s+(\\w+)\\s+(types|kinds|categories|forms)\\s+of\\s+(.+?):\\s*(.+?)[.]\n```\n\nProduces one card per list item with the category as context.\n\n### Numbered/enumerated items\n\n```regex\n^(?:\\d+[.)]\\s+|[-*]\\s+)(.+)$\n```\n\n## Cause/Effect Patterns\n\n```regex\n\\b(.+?)\\s+(?:causes|leads\\s+to|results\\s+in|produces|triggers)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Smoking causes lung cancer.\"\n- \"Insulin deficiency results in diabetes.\"\n\n## Comparison Patterns\n\n```regex\n\\b(?:Unlike|Whereas|While|In\\s+contrast\\s+to)\\s+(.+?),\\s+(.+?)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Unlike prokaryotes, eukaryotes have a nucleus.\"\n\n## Cloze Targets\n\nFor cloze mode, the following are high-priority candidates for masking:\n\n| Category         | Pattern                                    |\n| ---------------- | ------------------------------------------ |\n| Proper nouns     | `\\b[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)*\\b`       |\n| Numbers/Dates    | `\\b\\d{1,4}(?:\\s?(?:BCE|CE|AD|BC))?\\b`      |\n| Years            | `\\b(?:1[5-9]\\d{2}|20\\d{2})\\b`             |\n| Percentages      | `\\b\\d+(?:\\.\\d+)?\\s?%\\b`                    |\n| Chemical formulas| `\\b[A-Z][a-z]?\\d*(?:[A-Z][a-z]?\\d*)+\\b`    |\n| Key terms (all-caps acronyms) | `\\b[A-Z]{2,}\\b`              |\n\n## Scoring Heuristics\n\nEach extracted candidate is scored for information density:\n\n| Signal                   | Points |\n| ------------------------ | ------ |\n| Contains a number        | +2     |\n| Contains a definition    | +3     |\n| Contains a comparison    | +2     |\n| Sentence length 15-40    | +1     |\n| Sentence length > 50     | -1     |\n| Contains a list          | +2     |\n| Contains cause/effect    | +2     |\n\nCandidates scoring below a threshold (default: 2) are discarded.\n\n## Tuning\n\nAll patterns are defined as constants at the top of `flashcard_forge.py`.\nAdjust them to match the style of your input material:\n\n- **Textbook style** (formal definitions): strengthen definition patterns.\n- **Lecture transcript** (conversational): add patterns for \"so basically\" and\n  \"in other words.\"\n- **Scientific paper** (dense): lower `--min-length` and increase\n  `--max-cards`.\n\nFile v0.1.0:references/study-strategies.md\n\n# Study Strategies for Flashcard-Based Learning\n\nFlashcard Forge generates cards; these strategies help you use them effectively.\n\n## Core Principles\n\n### 1. Active Recall Over Recognition\n\nFlashcards work because they force you to **retrieve** information, not just\nrecognize it. Always try to answer before flipping the card. If you just read\nboth sides passively, you're wasting the medium.\n\n### 2. Spaced Repetition\n\nAnki's algorithm schedules reviews at increasing intervals:\n- New card → 1 day → 3 days → 7 days → 21 days → 60 days → ...\n\nTrust the algorithm. Don't cram all cards daily — that defeats the spacing\neffect. Review what Anki tells you to review, when it tells you.\n\n### 3. One Idea Per Card\n\nIf a card has multiple facts, split it. \"List the 3 types of muscle\" is a poor\ncard; three separate cards (one per muscle type) are better.\n\nFlashcard Forge's list-pattern extractor attempts to split lists into\nindividual cards, but review the output and split any that are still overloaded.\n\n## Card Quality\n\n### Good Cards\n\n- **Specific**: \"What enzyme unwinds DNA during replication?\" → \"Helicase\"\n- **Atomic**: One fact, one answer\n- **Contextual**: Include just enough context to disambiguate\n- **Varied**: Mix definitions, comparisons, cause/effect, and cloze\n\n### Bad Cards\n\n- **Vague**: \"Tell me about cells\" → too broad\n- **Multi-answer**: \"What are the 4 bases in DNA and how do they pair?\" → split\n- **Yes/No**: \"Is the mitochondria the powerhouse?\" → too easy to guess\n- **Wall of text**: Front or back longer than 2 sentences\n\n## Workflow\n\n### Daily Review (15-30 minutes)\n\n1. Open Anki, review all due cards.\n2. Answer each card **before** flipping.\n3. Rate honestly:\n   - **Again** (red): didn't know it → resets to relearn\n   - **Hard** (orange): barely got it → shorter interval\n   - **Good** (green): normal → standard interval\n   - **Easy** (blue): instant recall → longer interval\n4. Aim for 85-95% retention. Lower = cards too hard. Higher = cards too easy.\n\n### Weekly Deck Maintenance\n\n1. Review flagged/difficult cards — are they poorly written?\n2. Delete cards you consistently get right (they've served their purpose).\n3. Add new cards for material you struggled with this week.\n4. Check for duplicates (Anki's \"Find Duplicates\" tool).\n\n### Pre-Exam Intensive\n\n1. Import new material with Flashcard Forge 2-3 weeks before the exam.\n2. Review daily, focusing on new and due cards.\n3. In the final week, use Anki's \"cram\" mode to review all cards in the deck.\n4. Don't add new cards in the last 3 days — focus on consolidating.\n\n## Cloze vs Q&A\n\n| Use Q&A When                          | Use Cloze When                        |\n| ------------------------------------- | ------------------------------------- |\n| Testing a definition                  | Testing recall within context         |\n| Explicit question-answer structure    | Filling in a key term in a sentence   |\n| The \"answer\" is a short phrase        | The fact is embedded in a sentence    |\n| You want flexibility in phrasing      | You want to test recognition          |\n\nFlashcard Forge's `auto` mode generates both and deduplicates, giving you a\nmixed deck that engages different recall pathways.\n\n## Pitfalls\n\n1. **Card overload.** More cards ≠ better. 200 good cards beat 1000 mediocre\n   ones. Cap output with `--max-cards` and curate aggressively.\n\n2. **Passive review.** If you're not struggling to recall, the cards aren't\n   working. If recall is effortless, the card may be too easy — delete or\n   rephrase.\n\n3. **Neglecting difficult cards.** Anki's \"ease hell\" happens when you mark\n   cards \"Again\" repeatedly. Reset the ease or rewrite the card.\n\n4. **Stale decks.** If you haven't reviewed a deck in months, the backlog can\n   be demoralizing. Use Anki's \"Forget\" to reset cards to new, or archive the\n   deck.\n\n## Further Reading\n\n- [Anki Manual](https://docs.ankiweb.net/) — official documentation\n- [Augmenting Long-term Memory](https://supermemo.guru/wiki/Augmenting_Long-term_memory)\n  by Michael Nielsen — excellent essay on spaced repetition\n- [20 Rules of Formulating Knowledge](https://supermemo.guru/wiki/20_rules_of_formulating_knowledge)\n  by Piotr Woźniak — the canonical guide to writing good flashcards\n\nFile v0.1.0:scripts/sample_text.txt\n\nBiology 101 — Chapter 3: Cellular Biology\n\nThe cell is the basic structural and functional unit of life. All living\norganisms are composed of one or more cells. Cells were discovered by Robert\nHooke in 1665 when he observed cork under a microscope.\n\nThere are two types of cells: prokaryotic cells and eukaryotic cells.\nProkaryotic cells lack a nucleus. Eukaryotic cells have a membrane-bound\nnucleus.\n\nThe mitochondria is the powerhouse of the cell. It is responsible for producing\nATP through cellular respiration. Mitochondria have their own DNA, which\nsuggests they originated from free-living bacteria.\n\nPhotosynthesis is the process by which plants convert light energy into\nchemical energy. It occurs in the chloroplasts of plant cells. The overall\nequation is: 6CO2 + 6H2O + light energy produces C6H12O6 + 6O2.\n\nWhat is DNA? DNA is deoxyribonucleic acid, the molecule that carries genetic\ninformation in all living organisms. DNA was discovered by James Watson and\nFrancis Crick in 1953.\n\nUnlike prokaryotes, eukaryotes have membrane-bound organelles. The nucleus,\nmitochondria, and endoplasmic reticulum are all examples of organelles.\n\nThe cell membrane is defined as a selectively permeable barrier that surrounds\nthe cell. It controls what enters and exits the cell.\n\nOsmosis refers to the diffusion of water across a semipermeable membrane.\nMitosis is a type of cell division that produces two identical daughter cells.\n\nThere are four phases of mitosis: prophase, metaphase, anaphase, and telophase.\n\nInsufficient insulin results in diabetes. Smoking causes lung cancer and\nincreases the risk of heart disease.\n\nDNA stands for deoxyribonucleic acid. RNA stands for ribonucleic acid.\n\nFile v0.1.0:skill-card.md\n\n## Description:\n\nConvert any text, including PDF excerpts, lecture notes, articles, and textbook chapters, into spaced-repetition flashcards with Anki-importable CSV, Q&A, and cloze-deletion modes using regex-based extraction and sentence analysis.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[voronindenis5](https://clawhub.ai/user/voronindenis5)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nExternal learners, educators, and developers use this skill to convert study material into active-recall flashcards for Anki. It is suited for extracting definitions, key facts, Q&A pairs, and cloze-deletion cards from reasonably clean text.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The script reads study files supplied by the user and generated decks can contain source text from private notes.\n\nMitigation: Review input and output locations before running, and treat generated CSV or JSON decks as sensitive when the source material is private.\n\nRisk: Automatically extracted cards may be low quality, over-generated, duplicated across runs, or affected by poor OCR and messy input formatting.\n\nMitigation: Use caps and filters such as max cards and minimum sentence length, pre-clean noisy text, and review a sample of generated cards before importing or studying.\n\nRisk: Anki import can fail or create unusable cards if the output mode, delimiter, encoding, or note type is mismatched.\n\nMitigation: Import Q&A output as Basic cards and cloze output as Cloze cards, confirm semicolon-separated UTF-8 CSV formatting, and test import a small batch first.\n\n## Reference(s):\n\n- [Source repository](https://github.com/voronindenis5/flashcard-forge)\n- [ClawHub skill page](https://clawhub.ai/voronindenis5/skills/flashcard-forge)\n- [Extraction Patterns](references/extraction-patterns.md)\n- [Anki Import Guide](references/anki-import.md)\n- [Study Strategies for Flashcard-Based Learning](references/study-strategies.md)\n- [Anki](https://apps.ankiweb.net/)\n- [Anki Manual](https://docs.ankiweb.net/)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance, files]\n\n**Output Format:** [Markdown guidance with shell commands; generated flashcard files are CSV or JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Generated CSV uses semicolon-separated quoted fields for Anki Basic or Cloze note types; JSON output is an array of flashcard objects.]\n\n## Skill Version(s):\n\n0.1.0 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.0:LICENSE\n\nMIT License\n\nCopyright (c) 2026 Denis Voronin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","readmeExcerpt":"Skill: flashcard-forge Owner: voronindenis5 Summary: Convert 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. Tags: latest:0.1.2 Version history: v0.1.2 | 2026-08-14T06:19:22.104Z | auto - Removed the documentation file skill-card.md. - No code or ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Generate Q&A flashcards (default mode)\npython3 scripts/flashcard_forge.py notes.txt -o deck.csv\n\n# Generate cloze (fill-in-the-blank) cards\npython3 scripts/flashcard_forge.py notes.txt --mode cloze -o cloze.csv\n\n# Auto mode: both Q&A and cloze, deduplicated\npython3 scripts/flashcard_forge.py notes.txt --mode auto -o deck.csv\n\n# Cap output to 50 cards, filter short sentences\npython3 scripts/flashcard_forge.py notes.txt --max-cards 50 --min-length 25\n\n# JSON output for programmatic use\npython3 scripts/flashcard_forge.py notes.txt --format json -o deck.json"},{"language":"text","snippet":"Front;Back\n\"What is photosynthesis?\";\"The process by which plants convert light energy into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\""},{"language":"text","snippet":"Text;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"Photosynthesis occurs in the {{c1::chloroplasts}} of plant cells\";\"\""},{"language":"bash","snippet":"cp -r flashcard-forge ~/.hermes/skills/"},{"language":"text","snippet":"Front;Back\n\"What is photosynthesis?\";\"The process by which plants convert light into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\""},{"language":"text","snippet":"Text;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"DNA stands for {{c1::deoxyribonucleic acid}}\";\"\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: flashcard-forge\ndescription: >\n  Convert any text — PDF excerpts, lecture notes, articles, textbook chapters —\n  into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and\n  cloze-deletion modes using regex-based extraction and sentence analysis.\nversion: 1.0.0\nauthor: Denis Voronin\nlicense: MIT\ntags:\n  - education\n  - flashcards\n  - anki\n  - spaced-repetition\n  - study\n  - text-processing\n---\n\n# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\n`Flashcard Forge` is a skill that transforms study material (PDFs, lecture\nnotes, articles, textbook chapters) into spaced-repetition flashcards. It\nextracts key facts, definitions, and Q&A pairs using regex patterns and\nsentence-structure analysis, then exports Anki-importable CSV files.\n\n## When to Use\n\nActivate this skill when you need to:\n\n- Convert a textbook chapter or lecture transcript into flashcards\n- Extract definitions, key facts, or Q&A from a body of text\n- Generate cloze (fill-in-the-blank) cards for memorization\n- Produce Anki-importable CSV from raw notes\n- Study for an exam by turning reading material into active recall cards\n\n## Modes\n\n### Q&A Mode (`--mode qa`)\n\nExtracts question-answer pairs and definition pairs:\n\n- **Definition patterns**: \"X is defined as Y\", \"X refers to Y\", \"X means Y\"\n- **Explicit questions**: sentences containing \"What/Why/How/When/Where\" markers\n- **List patterns**: \"There are N types of X: A, B, C\"\n- **Cause/effect**: \"X causes Y\", \"X results in Y\"\n- **Comparison**: \"Unlike X, Y does Z\"\n\n### Cloze Mode (`--mode cloze`)\n\nGenerates fill-in-the-blank cards by identifying key terms in each sentence and\nmasking them:\n\n- Nouns and proper nouns are candidates for clozing\n- Numbers, dates, and named entities are high-priority cloze targets\n- Each card uses Anki's `{{c1::...}}` cloze syntax\n\n### Auto Mode (`--mode auto`, default)\n\nRuns both modes and merges results, deduplicating by question text.\n\n## Quick Reference\n\n| Need                        | Command                                                         |\n| --------------------------- | --------------------------------------------------------------- |\n| Q&A cards from a text file  | `python3 scripts/flashcard_forge.py notes.txt`                  |\n| Cloze cards                 | `python3 scripts/flashcard_forge.py notes.txt --mode cloze`     |\n| Anki CSV output             | `python3 scripts/flashcard_forge.py notes.txt -o deck.csv`      |\n| Custom cloze count          | `python3 scripts/flashcard_forge.py notes.txt --max-cloze 3`    |\n| Min sentence length filter  | `python3 scripts/flashcard_forge.py notes.txt --min-length 20`  |\n| JSON output                 | `python3 scripts/flashcard_forge.py notes.txt --format json`    |\n\n## How It Works\n\n1. **Read & clean** — load the text, normalize whitespace, strip markdown\n   artifacts.\n2. **Segment** — split into sentences using punctuation-aware tokenization.\n3. **Extract** — apply regex patterns (see `referenc"},{"path":"README.md","content":"# Flashcard Forge\n\n> Turn walls of text into decks you'll actually review.\n\nA [Hermes Agent](https://hermes-agent.nousresearch.com/docs) / OpenClaw skill\nthat converts study material — PDF excerpts, lecture notes, articles, textbook\nchapters — into **Anki-importable flashcards** using regex-based extraction and\nsentence analysis.\n\n## Why\n\nStudents spend hours manually making flashcards from reading material. Most of\nthat work is mechanical: find the definitions, extract the key facts, format\nthem as Q&A or cloze cards. Flashcard Forge automates the extraction so you can\nfocus on reviewing, not transcribing.\n\n## What's Included\n\n- **`SKILL.md`** — core skill: modes, quick-reference table, how-it-works.\n- **`references/`**\n  - `extraction-patterns.md` — catalog of regex patterns the extractor uses.\n  - `anki-import.md` — step-by-step guide to importing CSV into Anki.\n  - `study-strategies.md` — best practices for flashcard-based learning.\n- **`scripts/flashcard_forge.py`** — the main script (stdlib only, no deps).\n- **`scripts/sample_text.txt`** — example input demonstrating all pattern types.\n\n## Quick Start\n\n```bash\n# Generate Q&A flashcards (default mode)\npython3 scripts/flashcard_forge.py notes.txt -o deck.csv\n\n# Generate cloze (fill-in-the-blank) cards\npython3 scripts/flashcard_forge.py notes.txt --mode cloze -o cloze.csv\n\n# Auto mode: both Q&A and cloze, deduplicated\npython3 scripts/flashcard_forge.py notes.txt --mode auto -o deck.csv\n\n# Cap output to 50 cards, filter short sentences\npython3 scripts/flashcard_forge.py notes.txt --max-cards 50 --min-length 25\n\n# JSON output for programmatic use\npython3 scripts/flashcard_forge.py notes.txt --format json -o deck.json\n```\n\nExample CSV output:\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light energy into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\nExample cloze output:\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"Photosynthesis occurs in the {{c1::chloroplasts}} of plant cells\";\"\"\n```\n\n## Modes\n\n| Mode    | Card Type  | Best For                          |\n| ------- | ---------- | --------------------------------- |\n| `qa`    | Basic Q&A  | Definitions, explicit questions   |\n| `cloze` | Cloze      | Fill-in-the-blank memorization    |\n| `auto`  | Both       | General use (default)             |\n\n## Anki Import\n\n1. Open Anki → File → Import\n2. Select the CSV file\n3. Set type to **Basic** (for qa) or **Cloze** (for cloze)\n4. Ensure field separator is semicolon (`;`)\n5. Click Import\n\nSee `references/anki-import.md` for detailed instructions with screenshots.\n\n## Installation (Hermes Agent)\n\nCopy or symlink this directory into your skills folder:\n\n```bash\ncp -r flashcard-forge ~/.hermes/skills/\n```\n\nHermes auto-discovers skills with a valid `SKILL.md`. See the\n[skills docs](https://hermes-agent.nousresearch.com/docs) for details.\n\n## Requirements\n\n- Python 3.8+ (stdlib only — no pip"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn75wwn4x6djaf28jbykeamazd81gtdp\",\n  \"slug\": \"flashcard-forge\",\n  \"version\": \"0.1.2\",\n  \"publishedAt\": 1786688362104\n}"},{"path":"references/anki-import.md","content":"# Anki Import Guide\n\nFlashcard Forge outputs CSV files designed for direct import into\n[Anki](https://apps.ankiweb.net/). This guide walks through the import process\nfor both Q&A (Basic) and cloze card types.\n\n## CSV Format\n\n### Q&A CSV (Basic cards)\n\n```\nFront;Back\n\"What is photosynthesis?\";\"The process by which plants convert light into chemical energy\"\n\"Mitochondria\";\"The powerhouse of the cell, responsible for ATP production\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Front;Back`\n- **Fields are quoted** to handle commas and newlines within card text\n\n### Cloze CSV (Cloze cards)\n\n```\nText;Extra\n\"The powerhouse of the cell is the {{c1::mitochondria}}\";\"\"\n\"DNA stands for {{c1::deoxyribonucleic acid}}\";\"\"\n```\n\n- **Separator**: semicolon (`;`)\n- **Header row**: `Text;Extra`\n- Cloze deletions use `{{c1::...}}` syntax\n- The `Extra` field is for additional context (often empty)\n\n## Importing Q&A Cards (Basic)\n\n1. **Open Anki** and select or create a deck.\n2. Go to **File → Import...** (or press `Ctrl+I` / `Cmd+I`).\n3. Select your `.csv` file.\n4. In the import dialog:\n   - **Type**: Basic\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`) — Anki usually auto-detects\n5. Verify the field mapping: column 1 → Front, column 2 → Back.\n6. Click **Import**.\n\n### Importing Cloze Cards\n\n1. **Ensure you have a Cloze note type.** Anki includes one by default. If you\n   don't see it, go to Tools → Manage Note Types → Add → Cloze.\n2. Go to **File → Import...**\n3. Select your cloze `.csv` file.\n4. In the import dialog:\n   - **Type**: Cloze\n   - **Deck**: choose your target deck\n   - **Field separator**: semicolon (`;`)\n5. Verify the field mapping: column 1 → Text, column 2 → Extra.\n6. Click **Import**.\n\n> **Important:** Cloze cards with no `{{c1::...}}` deletion will fail to import.\n> Flashcard Forge guarantees at least one cloze per card.\n\n## Common Import Issues\n\n### \"The first field of this note type must be unique\"\n\nThis happens if Anki detects duplicate front text. Options:\n\n- Enable \"Allow HTML in fields\" is **not** the fix — instead, update existing\n  cards on import.\n- Or, pre-deduplicate your CSV. Flashcard Forge deduplicates within a single\n  run; if you're merging multiple runs, dedup manually.\n\n### Garbled characters\n\nEnsure the CSV is UTF-8 encoded. Flashcard Forge always writes UTF-8. If you\nopened and re-saved the file in Excel, it may have changed the encoding —\nre-export from the script instead.\n\n### Wrong delimiter detected\n\nIf Anki shows all data in one column, the delimiter wasn't auto-detected. In\nthe import dialog, manually set the field separator to semicolon.\n\n### Cloze cards show as blank\n\nThe note type must be **Cloze**, not Basic. If you imported cloze CSV as Basic\ncards, delete them and re-import with the correct type.\n\n## Bulk Import Tips\n\n- **Large decks**: Import in batches of 200-500 cards to avoid performance\n  issues.\n- **Tags**: Add tags during import (e.g., `biology`, `chapter-3`) for ea"},{"path":"references/extraction-patterns.md","content":"# Extraction Patterns\n\nThis document catalogs the regex patterns Flashcard Forge uses to extract\nflashcard-worthy content from text. Each pattern targets a specific sentence\nstructure common in educational material.\n\n## Definition Patterns\n\nThese extract \"term → definition\" pairs, producing cards with the term as the\nfront and the definition as the back.\n\n### \"X is Y\"\n\n```regex\n\\b([A-Z][a-z]+(?:\\s+\\w+){0,4})\\s+is\\s+(?:a|an|the)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Photosynthesis is a process by which plants make food.\"\n- \"Mitosis is a type of cell division.\"\n\n### \"X is defined as Y\"\n\n```regex\n\\b(.+?)\\s+is\\s+defined\\s+as\\s+(.+?)[.]\n```\n\n### \"X refers to Y\" / \"X means Y\"\n\n```regex\n\\b(.+?)\\s+(?:refers\\s+to|means)\\s+(.+?)[.]\n```\n\n### \"X: Y\" (colon definitions)\n\n```regex\n^([A-Z][^:]{2,40}):\\s+(.+?)[.]?$\n```\n\nMatches:\n- \"Photosynthesis: The process by which plants convert light to energy.\"\n\n## Q&A Patterns\n\n### Explicit question markers\n\n```regex\n\\b(What|Why|How|When|Where|Who|Which)\\s+.+?\\?\\s*(.+?)[.]?\n```\n\nMatches embedded questions and their answers:\n- \"What is DNA? It is the genetic material in cells.\"\n\n### \"The question is...\" / \"The answer is...\"\n\n```regex\n\\bThe\\s+(?:question|answer)\\s+is\\s+(.+?)[.]\n```\n\n## List Patterns\n\n### \"There are N types of X: A, B, C\"\n\n```regex\n\\bThere\\s+are\\s+(\\w+)\\s+(types|kinds|categories|forms)\\s+of\\s+(.+?):\\s*(.+?)[.]\n```\n\nProduces one card per list item with the category as context.\n\n### Numbered/enumerated items\n\n```regex\n^(?:\\d+[.)]\\s+|[-*]\\s+)(.+)$\n```\n\n## Cause/Effect Patterns\n\n```regex\n\\b(.+?)\\s+(?:causes|leads\\s+to|results\\s+in|produces|triggers)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Smoking causes lung cancer.\"\n- \"Insulin deficiency results in diabetes.\"\n\n## Comparison Patterns\n\n```regex\n\\b(?:Unlike|Whereas|While|In\\s+contrast\\s+to)\\s+(.+?),\\s+(.+?)\\s+(.+?)[.]\n```\n\nMatches:\n- \"Unlike prokaryotes, eukaryotes have a nucleus.\"\n\n## Cloze Targets\n\nFor cloze mode, the following are high-priority candidates for masking:\n\n| Category         | Pattern                                    |\n| ---------------- | ------------------------------------------ |\n| Proper nouns     | `\\b[A-Z][a-z]+(?:\\s+[A-Z][a-z]+)*\\b`       |\n| Numbers/Dates    | `\\b\\d{1,4}(?:\\s?(?:BCE|CE|AD|BC))?\\b`      |\n| Years            | `\\b(?:1[5-9]\\d{2}|20\\d{2})\\b`             |\n| Percentages      | `\\b\\d+(?:\\.\\d+)?\\s?%\\b`                    |\n| Chemical formulas| `\\b[A-Z][a-z]?\\d*(?:[A-Z][a-z]?\\d*)+\\b`    |\n| Key terms (all-caps acronyms) | `\\b[A-Z]{2,}\\b`              |\n\n## Scoring Heuristics\n\nEach extracted candidate is scored for information density:\n\n| Signal                   | Points |\n| ------------------------ | ------ |\n| Contains a number        | +2     |\n| Contains a definition    | +3     |\n| Contains a comparison    | +2     |\n| Sentence length 15-40    | +1     |\n| Sentence length > 50     | -1     |\n| Contains a list          | +2     |\n| Contains cause/effect    | +2     |\n\nCandidates scoring below a threshold (default: 2) are discarded.\n\n## Tuning\n\nAl"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1706,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T12:05:53.269Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:19:52.297Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}