Anki Skill para Claude
lroman242/anki-skill
Gerencie flashcards Anki pelo terminal durante coding sessions
Ver no GitHubSkill que integra Anki com Claude Code, permitindo criar, atualizar e deletar flashcards diretamente do terminal durante sessões de codificação. Funciona via AnkiConnect, capturando conceitos, padrões e técnicas aprendidas sem quebrar o fluxo de trabalho.
Instalação
npx convez-ai lroman242/anki-skill1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Capturar conceitos e gotchas durante sessões de aprendizado com Claude
- Criar decks de padrões de design e algoritmos para revisão spaced-repetition
- Montar material de preparação para entrevistas técnicas
- Construir katas e exercícios de implementação com constraints como pistas
Veredito

Skill bem pensada que resolve um problema real: reter conhecimento técnico sem sair do fluxo de codificação. Implementação clara com suporte a imagens e integração via AnkiConnect — prática para aprendizado contínuo de devs.
README
A tradução para o português deste README ainda está na fila.
Anki Skill
A Claude Code skill for managing Anki flashcards during coding sessions. Create, update, delete, and browse cards without leaving the terminal. When you're learning something new — a concept, gotcha, or mental model — Claude proposes a card, you approve it, and it's in your deck.
Usage scenarios
During a coding session — you hit a gotcha, learn a new concept, or want to remember a pattern. Ask Claude to add it to Anki mid-session without breaking your flow:
"/anki add this — the difference between
INNER JOINandLEFT JOINwhen one side has NULLs"
Learning a topic with Claude — you're exploring something new and want to retain the key ideas. Ask Claude to build a deck from the conversation:
"/anki we just covered B-trees, LSM trees, and SSTables. Create a deck with the most important things to remember for future review."
Interview prep — work through a problem with Claude, then have it card the patterns and techniques used, organized by topic deck:
"/anki we just solved a sliding window problem — card the pattern and when to recognize it"
Kata exercises — store implementation exercises as cards to revisit on a daily or weekly schedule. The front describes the task, the back holds key constraints or hints. Build a personal training deck over time:
"/anki add a kata — implement a worker pool with a fixed concurrency limit and graceful shutdown" "/anki add a kata — implement an LRU cache with O(1) get and put" "/anki add a kata — implement a fan-in function that merges multiple channels into one"
Claude proposes each card, you approve, and it lands in Anki. No copy-paste, no switching apps.
How it works
- You're coding or learning with Claude Code
- Claude notices something worth remembering, or you invoke
/anki - Claude proposes the card — front, back, deck, and tags
- On approval, the card is added to Anki via AnkiConnect
No dependencies — just curl, which is pre-installed on macOS and Ubuntu.
Prerequisites
- Anki desktop running on your machine
- AnkiConnect addon installed — open Anki, go to Tools > Add-ons > Get Add-ons, paste code
2055492159, restart Anki. This exposes a local API on port 8765 that the skill talks to.
Setup
- Copy this folder to
~/.claude/skills/anki/ - (Optional) Add a SessionStart hook to remind Claude about card creation:
{
"type": "command",
"command": "echo \"Reminder: You can create Anki flashcards with /anki. If you notice the user learning something new, proactively suggest a card.\""
}
Usage
Check connection and list decks
./scripts/anki_connect.sh
Create a card
./scripts/create_card.sh \
--deck "CS" \
--front "What problem does a bloom filter solve?" \
--back "Probabilistic membership test — O(1) space-efficient check with no false negatives, possible false positives." \
--tags "algorithms,data-structures"
Create a card with an image on the front
The text and image are centered, with the image on a new line below the text.
# From a local file
./scripts/create_card.sh \
--deck "CS" \
--front "What does this diagram show?" \
--back "B-tree node split" \
--image-path "/path/to/diagram.png" \
--tags "algorithms"
# From a URL (AnkiConnect downloads it)
./scripts/create_card.sh \
--deck "CS" \
--front "What pattern does this show?" \
--back "CQRS" \
--image-url "https://example.com/cqrs.png" \
--tags "architecture"
Update a card
Any combination of --front, --back, and --tags — only the fields you pass get updated.
./scripts/update_card.sh --id 1502298033753 --front "Better question?" --back "Cleaner answer"
./scripts/update_card.sh --id 1502298033753 --tags "algorithms,trees"
./scripts/update_card.sh --id 1502298033753 --back "Revised answer only"
Delete a card
./scripts/delete_card.sh --id 1502298033753
List cards
./scripts/list_cards.sh --deck "CS"
./scripts/list_cards.sh --tag "algorithms"
./scripts/list_cards.sh --query "tag:algorithms added:7"
Card quality rules
- Atomic — one fact per card
- Short, specific front — few words, one unambiguous answer
- Minimal back — no unnecessary text
- Visual over prose — file trees and code blocks over sentences
- No trivia — only things worth remembering long-term
- Tag consistently — lowercase, comma-separated
Good cards
Algorithms
- Front:
What is the time complexity of heapify? - Back:
O(n) — building a heap from an array is linear, not O(n log n)
Data structures
- Front:
When does a hash map degrade to O(n) lookup? - Back:
When all keys collide into the same bucket — worst case with a bad hash function
Software architecture
- Front:
What does the Strangler Fig pattern do? - Back:
Incrementally replaces a legacy system by routing new functionality to a new system until the old one can be retired
CS fundamentals
- Front:
What guarantee does a WAL provide? - Back:
Durability — changes are written to a log before being applied, so committed transactions survive crashes
Bad card
- Front:
Explain CAP theorem, PACELC, and distributed consistency models - Back: (four paragraphs) — too many facts, split into separate cards.
AnkiConnect API reference
Anki-Connect.md documents the full HTTP API exposed by the AnkiConnect addon — all available actions, request/response formats, and authentication. Useful if you want to extend the scripts or add new operations.
Project structure
anki-skill/
├── SKILL.md # Claude Code skill definition
├── README.md
├── Anki-Connect.md # Full AnkiConnect API reference
└── scripts/
├── anki_connect.sh # health check + list decks
├── create_card.sh # create a card (supports --image-path / --image-url)
├── update_card.sh # update front, back, or tags by note ID
├── delete_card.sh # delete a note by ID
└── list_cards.sh # list/filter cards