obsidian
它能做什么
这个技能让智能体通过 Obsidian 官方命令行工具处理笔记文件夹。适合把笔记和链接保存在 Obsidian 中的人。
适用场景
- ✓你想在 Obsidian 笔记库中搜索或阅读笔记的时候。
- ✓你想查看某篇笔记的反向链接或大纲的时候。
- ✓你想让智能体在笔记库中编写或更新笔记的时候。
技能链接
https://github.com/steipete/agent-scripts/blob/main/skills/obsidian/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请找出所有提到营销计划的笔记,并列出指向每一篇笔记的链接。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在笔记库文件夹中运行 Obsidian 命令行工具,进行搜索、阅读和列出链接。在依赖它之前,会先确认 Obsidian 中已启用命令行功能。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Obsidian
Use this for local Obsidian vault work. An Obsidian vault is a normal folder of Markdown files plus .obsidian/ config.
Sources
- App config:
~/Library/Application Support/obsidian/obsidian.json - Default vault name:
obsidian - Usual local vault path:
~/obsidian - Official CLI:
obsidian - Vault commands resolve the vault from cwd; run them from
~/obsidian.
First Checks
command -v obsidian
obsidian version
obsidian vaults
cd ~/obsidian
obsidian commands filter=search:
Global commands like version and vaults work outside a vault. Vault-content
commands may print Vault not found. outside ~/obsidian. Use obsidian commands, not obsidian help, for CLI discovery.
If obsidian says CLI is disabled:
- Prefer asking the user to enable Settings -> General -> Advanced -> Command line interface.
- If you already confirmed the app config shape,
~/Library/Application Support/obsidian/obsidian.jsonuses"cli": true. - Restart Obsidian after changing app-level CLI config.
Read Workflow
Prefer official CLI for Obsidian-aware lookups:
cd ~/obsidian
obsidian search query="OpenClaw" format=json
obsidian search:context query="OpenClaw" limit=20 format=json
obsidian read path="Folder/Note.md"
obsidian file path="Folder/Note.md"
obsidian outline path="Folder/Note.md" format=json
obsidian backlinks path="Folder/Note.md" format=json
obsidian links path="Folder/Note.md"
obsidian properties path="Folder/Note.md" format=json
Use direct filesystem reads when you already know the path and need exact bytes:
sed -n '1,220p' "$HOME/obsidian/Folder/Note.md"
rg -n "term" "$HOME/obsidian"
Report which source you used when freshness or vault choice matters.
Write Workflow
Choose the narrowest write path:
- New note:
obsidian create path="Folder/Note.md" content="...". - Append/prepend daily notes:
obsidian daily:append content="...". - Simple note edits: use
apply_patchon the Markdown file. - Rename/move notes: prefer
obsidian move path="Old.md" to="Folder/New.md"so links can update. - Opening UI after a write: add
openonly when useful or requested.
Common commands:
cd ~/obsidian
obsidian create path="Notes/New.md" content="# New\n\nBody"
obsidian append path="Notes/New.md" content="More text"
obsidian move path="Notes/New.md" to="Archive/New.md"
obsidian daily:path
obsidian daily:read
obsidian daily:append content="- Follow-up item"
For multi-line content, prefer editing the .md file with apply_patch once the path is known. Avoid fragile shell quoting for long prose.
Bases, Canvas, Plugins
Use CLI discovery first:
cd ~/obsidian
obsidian bases
obsidian base:views path="Projects.base"
obsidian base:query path="Projects.base" view="Active" format=json
obsidian plugins format=json
obsidian plugins:enabled format=json
obsidian commands filter=workspace:
For .canvas, .base, and .json files, read/edit as structured data when possible. Keep formatting stable and validate JSON after edits.
Safety
- Do not bulk rewrite the vault. Use targeted paths and review diffs.
- Do not edit
.obsidian/unless the user asks or the task is explicitly settings/plugin work. - Do not delete notes unless explicitly asked; prefer trash over permanent delete.
- Do not create hidden dot-folder notes through the Obsidian URI/CLI path.
- Preserve frontmatter and wikilinks unless the task is to refactor them.
- If multiple vaults exist, do not guess; use
obsidian vaultsandobsidian.json.
常见问题
什么是笔记库(vault)?
就是一个普通的 Markdown 文件夹,加上一个存放 Obsidian 设置的隐藏文件夹。
我需要开启 Obsidian 的命令行功能吗?
需要。技能说明,必须在 Obsidian 的高级设置中启用它。
智能体在哪里运行命令?
在笔记库文件夹内运行,因为笔记库命令会从当前文件夹读取笔记库。
详情
作者的原始描述
Obsidian vault: search/read/write notes, backlinks, Bases, Canvas.
repo: steipete/agent-scripts
热度
- GitHub 星标
- 7.4k
- 排名
- #13239
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
beeper
7.4k帮你的智能体搜索本地 Beeper 聊天记录,找到消息,并判断模糊线索指的是哪个聊天或联系人。
cloudflare-registrar
7.4k帮你的智能体查询 Cloudflare Registrar 的域名价格和可用性,并在确认后注册或列出域名。
codexbar
7.4k帮你的智能体查看你在 Codex、Claude、Kimi 等 AI 服务中还剩多少用量,包括限额、额度和重置时间。
create-cli
7.4k帮你的智能体设计命令行工具的命令、参数、帮助文本、输出和错误提示,让人和脚本都能顺利使用。