wiki-cli

GitHub

提供 Obsidian CLI 只读访问技能,涵盖传输检测、安全探测、读取与搜索功能。强调仅用于读取,禁止写入操作,变更需通过事务核心处理,确保路径安全及回退机制。

skills/wiki-cli/SKILL.md AgriciDaniel/claude-obsidian

触发场景

需要读取或搜索 Obsidian 知识库内容 检测本地 Obsidian CLI 环境可用性

安装

npx skills add AgriciDaniel/claude-obsidian --skill wiki-cli -g -y
更多选项

不安装直接使用

npx skills use AgriciDaniel/claude-obsidian@wiki-cli

指定 Agent (Claude Code)

npx skills add AgriciDaniel/claude-obsidian --skill wiki-cli -a claude-code -g -y

安装 repo 全部 skill

npx skills add AgriciDaniel/claude-obsidian --all -g -y

预览 repo 内 skill

npx skills add AgriciDaniel/claude-obsidian --list

SKILL.md

Frontmatter
{
    "name": "wiki-cli",
    "description": "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."
}

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.

版本历史

  • 32ac5a0 当前 2026-09-22 11:46

    修复 wiki 引用链接解析规则,将其锚定到技能目录而非工作目录,以解决路径解析问题。

  • 1c1bc49 2026-08-19 22:45

    v2.0.0 发布公开制品,更新为自包含的备用传输层实现,优先推荐官方 kepano/obsidian-skills。

  • cb93ff6 2026-07-25 04:50

同 Skill 集合

skills/autoresearch/SKILL.md
skills/canvas/SKILL.md
skills/defuddle/SKILL.md
skills/obsidian-bases/SKILL.md
skills/obsidian-markdown/SKILL.md
skills/save/SKILL.md
skills/think/SKILL.md
skills/wiki-fold/SKILL.md
skills/wiki-ingest/SKILL.md
skills/wiki-lint/SKILL.md
skills/wiki-mode/SKILL.md
skills/wiki-query/SKILL.md
skills/wiki-retrieve/SKILL.md
skills/wiki/SKILL.md

元信息

文件数
0
版本
b0d8867
Hash
468df53c
收录时间
2026-07-25 04:50

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 10:07
浙ICP备14020137号-1