Claude Code skill · Obsidian · Anki

Your notes,
turned into flashcards.

Point Claude at a folder of your Obsidian vault. It writes the Anki cards worth learning, and keeps them in sync each time your notes change, without losing your review history.

› /anki-deck courses/linux
  • Your notes are never modified
  • Any Anki language
  • Python 3.9+, zero dependencies

Demo

One command. A whole deck.

Here is what happens when you run /anki-deck on a folder of course notes.

~/vault — claude

Simulated run, based on the real output of the skill. Card wording is written by Claude from your notes.

The project

Claude does the thinking.
The plugin does the bookkeeping.

Writing good flashcards is the slow part of spaced repetition. anki-deck hands that part to Claude, and leaves the mechanical sync to proven open-source tools.

Claude Code, via /anki-deck

  • Reads every note of the folder you point at
  • Picks what is worth remembering: definitions, commands, formulas, pitfalls
  • Writes self-contained questions, in the language of the note
  • Chooses basic, reversed or cloze cards
  • Updates the cards of a note when you edit it

Obsidian_to_Anki + AnkiConnect

  • Sends the card files to Anki
  • Writes each card's ID back into its file
  • Updates existing cards in place, so your review history is kept
  • Deletes cards you removed
  • Runs locally, on 127.0.0.1
0notes modified, ever
1command to build a deck
3card types: basic, reversed, cloze
∞re-runs, only changes are processed

How it works

From a note to a review, in four hops.

  1. 1

    Your notes

    Plain Markdown in your vault. Left untouched.

    courses/linux/nvim.md
  2. 2

    Card files

    Claude writes them in a mirror folder.

    flashcards/courses/linux/nvim.md
  3. 3

    AnkiConnect

    The Obsidian plugin pushes them to Anki's local API.

    127.0.0.1:8765
  4. 4

    Your deck

    Folders become decks, with tags.

    courses::linux

Run it again whenever you like

Each note is hashed. On the next run, the skill sorts your folder like this:

new cards written changed cards fixed, IDs kept ok skipped orphan you're asked first

Under the hood

Readable cards you can edit by hand.

Every card lives in a plain Markdown file next to your notes. Fix a typo there, and it is fixed in Anki on the next sync.

---
source: "[[courses/linux/nvim]]"
source_hash: "9f2c…"
---
TARGET DECK: courses::linux
FILE TAGS: courses linux

START
Basic
Front: In nvim, which command saves and quits?
Back: `:wq` (or `ZZ` in normal mode)
<!--ID: 1731942087123-->
END

START
Cloze
Text: In nvim, {{c1::`gg`}} jumps to the start
of the file and {{c2::`G`}} to the end.
END

Install

Up and running in two minutes.

The installer sets up AnkiConnect, the Obsidian plugin and the skill. It is safe to run again, and backs up your plugin settings.

  1. 1

    Get the skill

    Download it from Agensi, or clone it from GitHub.

    git clone https://github.com/tungsten-w/claude-anki-flashcards
  2. 2

    Run the installer

    Give it the path of your vault. Anki must have been started once.

    python3 install.py "/path/to/vault"
  3. 3

    Build a deck

    Open Claude Code in your vault and name a folder.

    /anki-deck courses/linux
Anki desktopObsidian 1.12+Claude CodePython 3.9+Linux · macOS · Windows

Stop writing flashcards by hand.

Spend your time reviewing, not typing.