Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

anki-connect安基连接

Agent Skill

anki-connect 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,009

周安装

401

GitHub Stars

253

下载量

3,240
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:anki-connect(安基连接)
来源仓库:https://github.com/intellectronica/agent-skills
仓库路径:skills/anki-connect
安装命令:
npx skills add https://github.com/intellectronica/agent-skills --skill anki-connect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/intellectronica/agent-skills --skill anki-connect

简介

用于查找、检索和筛选相关信息,适合根据关键词快速定位候选结果。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 使用时需要确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装前建议确认权限范围和维护状态,以及是否会触发文件读写操作。
  • 适用于 Codex、Claude、Cursor、Gemini CLI 中的信息检索任务。

SKILL.md

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

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

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

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.

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

  • Call requestPermission (safe).
  • Call version to confirm the API level and use version: 6 in requests.

2) Discover supported actions

  • Use apiReflect with scopes: ["actions"] to list supported actions.
  • Use this list to map user intent to action names.

3) Resolve user request into action sequence

  • Identify read-only vs destructive operations.
  • For destructive/modifying operations on notes/cards, request confirmation once with the scope and count.
  • Prefer findNotes/findCards + notesInfo/cardsInfo for previews before modification.

4) Execute and validate

  • Execute the call(s) in order.
  • Check error for each response.
  • Report summarized results and any IDs returned.

Common Task Recipes (CLI-Oriented)

List decks

  • Action: deckNames

Create deck

  • Action: createDeck
  • Confirmation required if the deck is being created as part of a card/note modification workflow.

Search notes / cards

  • Actions: findNotes, findCards
  • Use Anki search syntax (see “Search Syntax Quick Notes” below).

Preview note data

  • Action: notesInfo (note IDs)

Add notes

  • Actions: addNote, addNotes
  • Confirmation required.
  • Use canAddNotes or canAddNotesWithErrorDetail for preflight checks.

Update note fields or tags

  • Actions: updateNoteFields, updateNoteTags, or combined updateNote
  • Confirmation required.
  • Warning: Do not have the note open in the browser; updates may fail to apply.

Delete notes

  • Action: deleteNotes
  • Confirmation required.

Suspend/unsuspend cards

  • Actions: suspend, unsuspend
  • Confirmation required.

Move cards to a deck

  • Action: changeDeck
  • Confirmation required.

Set due date or reschedule

  • Action: setDueDate
  • Confirmation required.

Media upload/download

  • Actions: storeMediaFile, retrieveMediaFile, getMediaFilesNames, getMediaDirPath, deleteMediaFile
  • Use base64 (data), file path (path), or URL (url) for upload.

Sync

  • Action: sync

Search Syntax Quick Notes (for findNotes/findCards)

  • Separate terms by spaces; terms are ANDed by default.
  • Use or, parentheses, and - for NOT logic.
  • Use deck:Name, tag:tagname, note:ModelName, card:CardName.
  • Use front:... or other field names to limit by field.
  • Use re: for regex, w: for word-boundary searches, nc: to ignore accents.
  • Use is:due, is:new, is:learn, is:review, is:suspended, is:buried to filter card states.
  • Use prop: searches for properties like interval or due date.
  • Escape special characters with quotes or backslashes as needed.

Action Catalog (Use as a mapping reference)

Card Actions

  • getEaseFactors
  • setEaseFactors
  • setSpecificValueOfCard
  • suspend
  • unsuspend
  • suspended
  • areSuspended
  • areDue
  • getIntervals
  • findCards
  • cardsToNotes
  • cardsModTime
  • cardsInfo
  • forgetCards
  • relearnCards
  • answerCards
  • setDueDate

Deck Actions

  • deckNames
  • deckNamesAndIds
  • getDecks
  • createDeck
  • changeDeck
  • deleteDecks
  • getDeckConfig
  • saveDeckConfig
  • setDeckConfigId
  • cloneDeckConfigId
  • removeDeckConfigId
  • getDeckStats

Graphical Actions

  • guiBrowse
  • guiSelectCard
  • guiSelectedNotes
  • guiAddCards
  • guiEditNote
  • guiAddNoteSetData
  • guiCurrentCard
  • guiStartCardTimer
  • guiShowQuestion
  • guiShowAnswer
  • guiAnswerCard
  • guiUndo
  • guiDeckOverview
  • guiDeckBrowser
  • guiDeckReview
  • guiImportFile
  • guiExitAnki
  • guiCheckDatabase
  • guiPlayAudio

Media Actions

  • storeMediaFile
  • retrieveMediaFile
  • getMediaFilesNames
  • getMediaDirPath
  • deleteMediaFile

Miscellaneous Actions

  • requestPermission
  • version
  • apiReflect
  • sync
  • getProfiles
  • getActiveProfile
  • loadProfile
  • multi
  • exportPackage
  • importPackage
  • reloadCollection

Model Actions

  • modelNames
  • modelNamesAndIds
  • findModelsById
  • findModelsByName
  • modelFieldNames
  • modelFieldDescriptions
  • modelFieldFonts
  • modelFieldsOnTemplates
  • createModel
  • modelTemplates
  • modelStyling
  • updateModelTemplates
  • updateModelStyling
  • findAndReplaceInModels
  • modelTemplateRename
  • modelTemplateReposition
  • modelTemplateAdd
  • modelTemplateRemove
  • modelFieldRename
  • modelFieldReposition
  • modelFieldAdd
  • modelFieldRemove
  • modelFieldSetFont
  • modelFieldSetFontSize
  • modelFieldSetDescription

Note Actions

  • addNote
  • addNotes
  • canAddNotes
  • canAddNotesWithErrorDetail
  • updateNoteFields
  • updateNote
  • updateNoteModel
  • updateNoteTags
  • getNoteTags
  • addTags
  • removeTags
  • getTags
  • clearUnusedTags
  • replaceTags
  • replaceTagsInAllNotes
  • findNotes
  • notesInfo
  • notesModTime
  • deleteNotes
  • removeEmptyNotes

Statistic Actions

  • getNumCardsReviewedToday
  • getNumCardsReviewedByDay
  • getCollectionStatsHTML
  • cardReviews
  • getReviewsOfCards
  • getLatestReviewID
  • insertReviews

Notes and Pitfalls

  • Keep Anki in the foreground on macOS or disable App Nap to prevent AnkiConnect from pausing.
  • When updating a note, ensure it is not being viewed in the browser editor; updates may not apply.
  • importPackage paths are relative to the Anki collection.media folder, not the client.
  • deleteDecks requires cardsToo: true to delete cards along with decks.

Resources

No bundled scripts or assets are required for this skill.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.83%
按下载量换算966

OpenCode

20.98%
按下载量换算680

Gemini CLI

18.29%
按下载量换算593

Antigravity

12.64%
按下载量换算410

Codex

7.89%
按下载量换算256

Cursor

2.99%
按下载量换算97

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills