wiki-cli
它能做什么
这个技能会确认你的智能体如何读取 Obsidian 知识库,然后进行搜索或阅读。适合在 Obsidian 中做笔记、并希望快速进行只读查询的人。
适用场景
- ✓当你想通过命令行搜索或阅读 Obsidian 知识库中的笔记时。
- ✓当你想在知识库中查找反向链接或标签时。
- ✓当你需要在智能体读取任何内容之前,先确认它如何访问你的知识库时。
技能链接
https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-cli/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 Obsidian 知识库中搜索我写过的关于预算的所有内容,并列出链接到这些内容的笔记。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会运行一次快速检查,确认 Obsidian 命令行是否可用,因为仅仅安装它是不够的。如果不可用,智能体会改为直接读取知识库文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Obsidian CLI read transport
Use this skill only to detect transport and read or search a selected vault.
The official executable is obsidian; binary presence alone does not prove it
is usable.
Resolve the installed product root from this skill's own location, not from the vault or current working directory:
PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
DETECT_TRANSPORT="$PRODUCT_ROOT/scripts/detect-transport.sh"
test -f "$DETECT_TRANSPORT"
Every ../wiki/references/ link in this file resolves the same way, relative
to this skill's own directory under $PRODUCT_ROOT, never relative to the
selected vault's wiki/ directory.
Detect safely
Probe without persisting host state:
bash "$DETECT_TRANSPORT" --peek --vault "$VAULT"
Trust available.cli.usable, not merely present or exit status. A supported
CLI can still be unavailable because the Obsidian app is not running, command
line access is disabled, or its response is an error. Use filesystem reads as
the portable fallback.
Persist a refreshed .vault-meta/transport.json only when the user or setup
workflow asks for a transport snapshot:
bash "$DETECT_TRANSPORT" --force --vault "$VAULT"
That file is derived runtime configuration, not knowledge content. Preserve a
valid manual_override recorded by the detector.
Read and search
Run official CLI commands from the selected vault so Obsidian resolves the correct workspace. Confirm supported syntax with the installed CLI before relying on optional commands. Typical read-only forms are:
(cd "$VAULT" && obsidian read path="$NOTE")
(cd "$VAULT" && obsidian search query="$QUERY")
Use read-only commands for backlinks, tags, or Bases results only when the
detector reports the CLI ready. Otherwise read files under $VAULT directly
and use rg for search. Reject absolute note arguments, traversal, symlinks, or
resolved paths outside the selected vault.
Mutation boundary
Do not use CLI create, write, append, property-set, daily-append, move, rename, or delete commands. Do not replace those commands with direct filesystem writes. Any knowledge or configuration change must be expressed as one reviewed transaction through the portable core; see operation transactions.
Transport choice never changes mutation semantics. The CLI is an optional read surface, not a lock manager, transaction engine, or Git checkpoint mechanism.
Checkpoint
Observe actual capability, think about the least complex read transport, verify that every resolved path stays in the vault, and accept filesystem fallback when the CLI is not ready.
常见问题
它会改动我的笔记吗?
不会。该技能只用于读取和搜索。编辑需要通过单独的、经过审阅的流程。
为什么需要检查?
命令可能已安装,但仍无法使用,例如 Obsidian 应用未打开,因此该技能会先进行测试。
备用方案是什么?
如果命令行不可用,智能体会直接读取知识库文件。
详情
作者的原始描述
Detect and use the official Obsidian command-line interface for read-only vault access; use for wiki-cli, Obsidian CLI, Obsidian read, Obsidian search, vault transport, which transport, transport detection, backlinks, tags, or Obsidian command line. Mutations always go through the claude-obsidian transaction core.
热度
- GitHub 星标
- 16k
- 排名
- #10811
- 许可证
- MIT
- 更新时间
- 2026/10/25
评论
- …
同一仓库的更多技能
autoresearch
16k让你的智能体在设定的范围内研究某个主题,并起草带引用的报告。网络发现的内容只作为证据保存,不会自动加入你的笔记。
canvas
16k帮你的智能体在 Obsidian 中创建和更新可视化画板,画板可以容纳笔记、文件、链接和分组,适合制作思维导图和空间布局。
defuddle
16k帮你的智能体规划如何把网页清理成可读的文本,并保存源文件的本地副本。网络清理功能目前尚不可用。
obsidian-bases
16k帮你的智能体设计 Obsidian Bases 视图,使其像简单的数据库一样工作,支持筛选、公式,以及表格或卡片布局。