anki
NewManage Anki flashcards via AnkiConnect HTTP API. Supports deck operations, batch card creation from text/PDF/CSV/Excel, custom note templates, study statistics, and built-in flashcard generation with spaced repetition best practices.
Overview
<p align="center"> <img src="https://img.shields.io/badge/version-0.1.0-blue?style=for-the-badge" alt="Version"> <img src="https://img.shields.io/badge/AnkiConnect-v6-green?style=for-the-badge" alt="AnkiConnect v6"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-orange?style=for-the-badge" alt="GPL-3.0"></a> </p>
A Claude Code skill for managing Anki flashcards via AnkiConnect HTTP API. No MCP server needed — just curl.
Features
- •Deck Management — Create, list, and get statistics for decks
- •Card Creation — Add single or batch flashcards with tags and duplicate control
- •Template Builder — Create custom note types (models) with CSS and card templates
- •Study Statistics — View daily review counts, review history, and deck stats
- •Smart Generation — Built-in prompt for generating high-quality Q&A flashcards from any text
- •File Import — Generate flashcards from PDF, CSV, and Excel files (via bundled
pdfandxlsxskills) - •Batch Operations — Combine multiple API calls in a single request with
multi
Prerequisites
- Anki desktop running
- AnkiConnect plugin installed (code:
2055492159)
Installation
Plugin (Recommended)
# Add marketplace
/plugin marketplace add https://github.com/ishiko732/anki-skills.gitManual
# Clone the repository
git clone --recurse-submodules https://github.com/ishiko732/anki-skills.git ~/code/anki-skills
# Symlink skills to ~/.agents/skills/
ln -sfn ~/code/anki-skills/.agents/skills/anki ~/.agents/skills/anki
ln -sfn ~/code/anki-skills/.agents/skills/pdf ~/.agents/skills/pdf
ln -sfn ~/code/anki-skills/.agents/skills/xlsx ~/.agents/skills/xlsxVerify
bash ~/.agents/skills/anki/scripts/anki-connect.sh version
# → {"result": 6, "error": null}Usage
The skill activates automatically when you mention Anki-related tasks in Claude Code:
List my Anki decks
Create 5 flashcards about photosynthesis in the Biology deck
Import this PDF as flashcards
Show my review statistics for todayProject Structure
anki-skills/
├── .agents/skills/
│ ├── anki/ # Anki skill
│ │ ├── SKILL.md # Skill definition (auto-activate)
│ │ └── scripts/anki-connect.sh # curl wrapper for AnkiConnect API
│ ├── pdf → ../../vendor/anthropic-skills/skills/pdf
│ └── xlsx → ../../vendor/anthropic-skills/skills/xlsx
├── vendor/
│ └── anthropic-skills/ # git submodule (sparse-checkout)
│ └── skills/{pdf, xlsx}
├── .claude-plugin/
│ ├── plugin.json # Plugin metadata
│ └── marketplace.json # Marketplace listing
├── LICENSE # GPL-3.0
└── README.mdSupported AnkiConnect Actions
| Category | Actions |
|---|---|
| Connection | version |
| Decks | deckNames, deckNamesAndIds, createDeck, getDeckStats |
| Models | modelNames, createModel |
| Notes | addNote, addNotes, findNotes, updateNoteFields |
| Cards | findCards, cardsInfo |
| Statistics | getNumCardsReviewedToday, getNumCardsReviewedByDay, cardReviews, getReviewsOfCards |
| Batch | multi |
Flashcard Generation
The skill includes a built-in generation guide based on spaced repetition best practices:
- Rewrite source content clearly and concisely
- Split into sections, each focusing on one point
- Generate Q&A pairs — one fact per answer, no yes/no questions
Cards are presented in a table for review before being added to Anki.
Helper Script
# Usage
bash scripts/anki-connect.sh <action> [params_json]
# Examples
bash scripts/anki-connect.sh deckNames
bash scripts/anki-connect.sh addNote '{"note":{"deckName":"Default","modelName":"Basic","fields":{"Front":"Q","Back":"A"},"tags":["test"]}}'
# Override endpoint
ANKI_CONNECT_URL=http://192.168.1.100:8765 bash scripts/anki-connect.sh versionLicense
Install & Usage
mkdir -p .claude/skillsmkdir -p .claude/skills && curl -o .claude/skills/anki.md https://raw.githubusercontent.com/ishiko732/anki-skills/main/SKILL.md/ankiFrequently Asked Questions
What is anki?
Manage Anki flashcards via AnkiConnect HTTP API. Supports deck operations, batch card creation from text/PDF/CSV/Excel, custom note templates, study statistics, and built-in flashcard generation with spaced repetition best practices.
How to install anki?
To install anki, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /anki.
What is anki best for?
anki is a community categorized under General. It is designed for: api, anki, flashcards, spaced-repetition, ankiconnect, study, learning. Created by ishiko.