跳到正文
Skillpedia
任务与项目16k · #10811

wiki-cli

它能做什么

这个技能会确认你的智能体如何读取 Obsidian 知识库,然后进行搜索或阅读。适合在 Obsidian 中做笔记、并希望快速进行只读查询的人。

适用场景

  • ✓当你想通过命令行搜索或阅读 Obsidian 知识库中的笔记时。
  • ✓当你想在知识库中查找反向链接或标签时。
  • ✓当你需要在智能体读取任何内容之前,先确认它如何访问你的知识库时。

技能链接

https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-cli/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-cli/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: AgriciDaniel/claude-obsidian

热度

GitHub 星标
16k
排名
#10811
许可证
MIT
更新时间
2026/10/25

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能