Build a flashcards app
Flip, grade yourself, and see the cards you miss more often.
A card that flips takes fifteen minutes. The hard part is deciding what you see next, and that's where an agent will cut corners.
Rented flashcard apps come with a login, a paywall on your second deck and a streak built to farm your guilt. A study tool is a text file plus a scheduler, and it fits in one HTML file.
The spec and the cuts
- One HTML file under 50KB.
- Decks live in localStorage and every edit saves at once.
- The card is the unit: a front, a back and a box number. You grade yourself "got it" or "missed", and that's all the scheduler needs.
- Cut: cloud decks, images and audio (that's how you reinvent Anki), and full SM-2. Five Leitner boxes get you most of spaced repetition with far less math.
The prompts
Tick what you want and the prompts below change to match. Paste them into Claude Code (or Cursor, or any agent) one at a time, in order. Prompt 2 checks the scheduling logic, fixes what it finds and adds no features.
The copy buttons grab the current version.
1 · Build it
2 · The review-logic pass
3 · Import & keyboard flow
4 · Get human eyes on it before you study with it
Where agents go wrong
- Losing your decks. Agents write to storage only "on save", so a reload eats your edits. Save on every change, inside a try/catch, since a silent QuotaExceeded error looks like "my deck vanished".
- A paste that wipes the deck. One line with no
|can make a naive parser throw or overwrite a good deck with half of one. Parse into a fresh array and save only if the whole paste parsed. - Fake spaced repetition. This one matters most. Low-box cards have to come up more often. If every card comes up equally often whatever its box, you've built a round-robin that looks right and teaches nothing. Prompt 2 exists to prevent it.
- innerHTML for card text. A card containing
<img onerror>or a stray bracket will break the layout or run code. UsetextContent.
Why prompt 4 is in the plan
You wrote the cards, so you're the worst tester. A new user may not know to grade a card, or what "box 3" means. Prompt 4 connects your agent to my MCP server, which shares the live page so one or two people can pin notes on it. Your agent applies the ones you approve, anchored to what they pointed at.