flashcard-engine

Spaced repetition flashcard system with SM-2 scheduling, Markdown support, and Anki import. Use when you need to study or manage flashcard decks, grade cards, check review schedules, or import/export card data. Triggers include "flashcards", "spaced repetition", "study cards", "Anki import", "SM-2", "review schedule".

7 stars

Best use case

flashcard-engine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Spaced repetition flashcard system with SM-2 scheduling, Markdown support, and Anki import. Use when you need to study or manage flashcard decks, grade cards, check review schedules, or import/export card data. Triggers include "flashcards", "spaced repetition", "study cards", "Anki import", "SM-2", "review schedule".

Teams using flashcard-engine should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/flashcard-engine/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/education-learning/flashcard-engine/skills/flashcard-engine/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/flashcard-engine/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How flashcard-engine Compares

Feature / Agentflashcard-engineStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Spaced repetition flashcard system with SM-2 scheduling, Markdown support, and Anki import. Use when you need to study or manage flashcard decks, grade cards, check review schedules, or import/export card data. Triggers include "flashcards", "spaced repetition", "study cards", "Anki import", "SM-2", "review schedule".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# flashcard-engine

Spaced repetition flashcard system with SM-2 scheduling. Cards support Markdown. Import from Anki or CSV.

## When to use

- Studying card decks with spaced repetition scheduling
- Creating or editing flashcard decks and cards
- Importing Anki .apkg decks or CSV card files
- Checking the review schedule for upcoming due cards
- Exporting decks to CSV or JSON

## Prerequisites

- Node.js 20+
- Server running locally (default port 4000)

## Quick Start

```bash
pnpm install
pnpm dev
# Server: http://localhost:4000
# Client: http://localhost:5173
```

## Study Flow

1. Open the dashboard at http://localhost:5173
2. Click a deck that has due cards (red badge)
3. Read the card front
4. Press Space or click "Show answer"
5. Read the answer
6. Grade 0-5 (or press 0-5 on keyboard):
   - 0 = Again (forgot completely)
   - 1 = Hard
   - 2 = Difficult
   - 3 = Good
   - 4 = Easy
   - 5 = Perfect (instant recall)
7. Repeat until no more due cards

## API Reference

### Study

```
GET  /api/decks/:id/study        Next due card for this deck
POST /api/cards/:id/review       Grade a card

Body: { "grade": 4 }
Response: { "nextReview": "2024-04-01", "interval": 8 }
```

### Decks

```
GET    /api/decks             List all decks with due counts
POST   /api/decks             Create deck { name, description }
GET    /api/decks/:id         Deck with full stats
PATCH  /api/decks/:id         Update deck { name?, description? }
DELETE /api/decks/:id         Delete deck and all cards
```

### Cards

```
GET    /api/decks/:id/cards   List cards in deck
POST   /api/decks/:id/cards   Create card { front, back, tags? }
PATCH  /api/cards/:id         Update card { front?, back?, tags? }
DELETE /api/cards/:id         Delete card
```

### Import

```
POST /api/import/csv          Upload CSV file (multipart/form-data, field: file)
POST /api/import/anki         Upload .apkg file (multipart/form-data, field: file)
```

### Export

```
GET /api/decks/:id/export/csv    Download deck as CSV
GET /api/decks/:id/export/json   Download deck as JSON
```

## Environment Variables

| Variable | Default | Description |
|---|---|---|
| `PORT` | `4000` | Server port |
| `DATA_DIR` | `~/.flashcard-engine` | SQLite storage directory |
| `CORS_ORIGIN` | `http://localhost:5173` | Allowed CORS origin |
| `LOG_LEVEL` | `info` | Log level: debug, info, warn, error |

## SM-2 Grades

| Grade | Label | Meaning |
|---|---|---|
| 0 | Again | Complete blackout |
| 1 | Hard | Remembered with significant difficulty |
| 2 | Difficult | Remembered with effort |
| 3 | Good | Correct with some hesitation |
| 4 | Easy | Correct after brief thought |
| 5 | Perfect | Instant recall |

Grades 0-2 reset the card's interval. Grades 3-5 increase the interval using the SM-2 formula.

## Troubleshooting

### No cards are due

All cards have been reviewed. Check the Schedule page for upcoming due dates.

### Import fails for Anki .apkg

The .apkg must be from Anki 2.x. Verify the file is not corrupted. Very large decks (10,000+ cards) may take up to 30 seconds to import.

### Deck shows 0 due but I have unreviewed cards

New cards are separate from due cards. Configure "New cards per day" in Settings to introduce new cards alongside reviews.

Related Skills

Skill: queue-engine

7
from heldernoid/agentic-build-templates

## When to use this skill

reminder-engine

7
from heldernoid/agentic-build-templates

Server-side cron scheduler that polls a reminders table and delivers appointment reminders via WebSocket to the browser, which then shows Web Notifications API alerts. Use when building or debugging reminder delivery in appointment or scheduling applications.

sql-tutorial-engine

7
from heldernoid/agentic-build-templates

No description provided.

docker-engine

7
from heldernoid/agentic-build-templates

Interact with the Docker Engine API via dockerode in Node.js/TypeScript -- listing containers, streaming logs, collecting stats, and running Compose operations as subprocesses.

prompt-engineering

7
from heldernoid/agentic-build-templates

No description provided.

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview

reading-list

7
from heldernoid/agentic-build-templates

Operate the reading-list API to save, manage, tag, search, and export articles.

email-digest

7
from heldernoid/agentic-build-templates

Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.

websocket-realtime

7
from heldernoid/agentic-build-templates

Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".