darrin-lim
building
index

anki-optimizer

end-to-end Python · Claude · SQLite 2026

Anki is only as good as the cards you put in it, and most of mine were bad in ways I couldn’t see — two facts crammed into one prompt, answers you could guess from context, cloze deletions that tested nothing. anki-optimizer finds those cards and fixes them.

What it does

It reads my deck, scores every card against SuperMemo’s 20 rules of formulating knowledge, and ranks them worst-first by how badly they’ll hurt recall. I review the suggestions, approve the rewrites I like, and they’re written straight back into Anki.

How it works

The Mac is the engine. It talks to Anki through the AnkiConnect add-on, scores cards with Claude, and stores every suggestion in a local SQLite database. It also serves a phone-friendly review page over my home WiFi, so I can triage cards from the couch. Approved rewrites are applied on the Mac and reach my iPhone through normal AnkiWeb sync.

Where it is

The full loop works end to end — score → review → apply → sync — with a one-command revert when I don’t like a change. There’s also a feedback loop: when I reject a suggestion I can say why, and that reason feeds into the next round of scoring, so the suggestions get better the more I use it.