
Anki Connect
Read and modify Anki decks, notes, cards, and sync state through the local AnkiConnect HTTP API with safe confirmation on writes.
Install
npx skills add https://github.com/intellectronica/agent-skills --skill anki-connectWhat is this skill?
- Maps natural-language Anki tasks to AnkiConnect actions on localhost:8765
- Startup flow: launch Anki if needed and verify Anki-Connect readiness via curl
- CRITICAL one-confirmation-per-intent policy for destructive or modifying note/card operations
- Covers decks, notes, cards, models, media, and sync operations
- Uses curl/jq (or equivalent) for reliable JSON request/response handling
Adoption & trust: 547 installs on skills.sh; 270 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Primary fit
Build/integrations is the right shelf because the skill is an API bridge to a local desktop app, not a go-to-market or ops monitor. Integrations covers translating user intent into AnkiConnect JSON, curl/jq calls, and interpreting deck/note operations.
Common Questions / FAQ
Is Anki Connect safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Anki Connect
# AnkiConnect ## Overview Enable reliable interaction with Anki through the AnkiConnect local HTTP API. Use this skill to translate user requests into AnkiConnect actions, craft JSON requests, run them via curl/jq (or equivalent tools), and interpret results safely. ## Preconditions and Environment - If Anki is not running, launch Anki, then wait until the AnkiConnect server responds at `http://127.0.0.1:8765` (default). Verify readiness using curl, e.g. `curl -sS http://127.0.0.1:8765` should return `Anki-Connect`. ## Safety and Confirmation Policy (Critical) **CRITICAL — NO EXCEPTIONS** Before any destructive or modifying operation on **notes or cards** (adding, updating, deleting, rescheduling, suspending, unsuspending, changing deck, or changing fields/tags), request confirmation from the user. Use the **AskUserQuestion** tool if available; otherwise ask via chat. Only request confirmation **once** per logical operation, even if it requires multiple API calls (e.g., search + update + verify). Group confirmation by intent and scope (e.g., “Update 125 notes matching query X”). Treat the following as confirmation-required by default: - Notes: `addNote`, `addNotes`, `updateNoteFields`, `updateNoteTags`, `updateNote`, `updateNoteModel`, `deleteNotes`, `removeEmptyNotes`, `replaceTags`, `replaceTagsInAllNotes`, `clearUnusedTags`. - Cards: `setEaseFactors`, `setSpecificValueOfCard`, `suspend`, `unsuspend`, `forgetCards`, `relearnCards`, `answerCards`, `setDueDate`, `changeDeck`. - Deck or model modifications that materially change cards/notes (deck deletion, model edits). Ask even if the action is not explicitly listed above. ## API Fundamentals ### Request Format Every request is JSON with: - `action`: string action name - `version`: API version (use `6` unless user specifies otherwise) - `params`: object of parameters (optional) ### Response Format Every response is JSON with: - `result`: return value - `error`: `null` on success or a string describing the error Always check `error` before using `result`. ### Permissions - Use `requestPermission` first when interacting from a non-trusted origin; it is the only action that accepts any origin. - Use `version` to ensure compatibility; older versions may omit the `error` field in responses when `version` ≤ 4. ## curl + jq Patterns Prefer `jq` to build JSON and parse responses. Keep requests explicit and structured. ### Minimal request template ```bash jq -n --arg action "deckNames" --argjson version 6 '{action:$action, version:$version}' \ | curl -sS http://127.0.0.1:8765 -X POST -H 'Content-Type: application/json' -d @- ``` ### With params ```bash jq -n \ --arg action "findNotes" \ --argjson version 6 \ --arg query "deck:French tag:verbs" \ '{action:$action, version:$version, params:{query:$query}}' \ | curl -sS http://127.0.0.1:8765 -X POST -H 'Content-Type: application/json' -d @- ``` ### Handling result/error ```bash curl -sS http://127.0.0.1:8765 -X POST -H 'Content-Type: application/json' -d @- \ | jq -e 'if .error then halt_error(1) else .result end' ``` ### Batching multiple actions Use `multi` to reduce round-trips and to group actions under a single confirmation when modifying data. ```bash jq -n --argjson version 6 --arg query "deck:French" \ '{action:"multi", version:$version, params:{actions:[ {action:"findNotes", params:{query:$query}}, {action:"notesInfo", params:{notes:[]}} ]}}' \ | curl -sS http://127.0.0.1:8765 -X POST -H 'Content-Type: application/json' -d @- ``` Replace the empty array with the result of the previous action when chaining; in CLI usage, split into two calls unless using a scripting language. ## Core Workflow Guidance ### 1) Verify connectivity and version -