obsidian-skills

其他

kepano/obsidian-skills

用于教导 AI 助手操作 Obsidian 库的代理技能包。

项目简介

提供符合 Agent Skills 规范的技能集,使 Claude Code、Codex、OpenCode 等兼容代理能够创建和编辑 Obsidian Markdown、Bases、JSON Canvas 文件,并与 Obsidian CLI 交互。包含 Defuddle 用于从网页提取干净 Markdown。

README 预览

Agent Skills for use with Obsidian.\n\nThese skills follow the [Agent Skills specification](https://agentskills.io/specification) so they can be used by any skills-compatible agent, including Claude Code, Codex, and Open Code.\n\n## Installation\n\n### Marketplace\n\n```\n/plugin marketplace add kepano/obsidian-skills\n/plugin install obsidian@obsidian-skills\n```\n\n### npx skills\n\n```\nnpx skills add git@github.com:kepano/obsidian-skills.git\n```\n\nInstead of ssh, if you prefer to use https:\n\n```\nnpx skills add https://github.com/kepano/obsidian-skills\n```\n\n### Manually\n\n#### Claude Code\n\nAdd the contents of this repo to a `/.claude` folder in the root of your Obsidian vault (or whichever folder you're using with Claude Code). See more in the [official Claude Skills documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).\n\n#### Codex\n\nCopy the `skills/` directory into your Codex skills path (typically `~/.codex/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format.\n\n#### OpenCode\n\nClone the entire repo into the OpenCode skills directory (`~/.opencode/skills/`):\n\n```sh\ngit clone https://github.com/kepano/obsidian-skills.git ~/.opencode/skills/obsidian-skills\n```\n\nDo not copy only the inner `skills/` folder — clone the full repo so the directory structure is `~/.opencode/skills/obsidian-skills/skills//SKILL.md`.\n\nOpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode.\n\n## Skills\n\n| Skill | Description |\n|-------|-------------|\n| [obsidian-markdown](skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax |\n| [obsidian-bases](skills/obsidian-bases) | Crea

常见问题 (3)

故障排除
如何修复 Obsidian Bases 错误:"filters" 只能包含 "and"、"or" 或 "not" 中的一个键?

在 filters 下只使用一个顶层运算符。要组合包含与排除逻辑,应嵌套另一个运算符,而不是让 and、or 和 not 并列成为同级。

无效的 YAML:

filters:
  and: []
  or: []
  not: []

有效的 YAML:

filters:
  and:
    - 'inclusion condition'
    - not:
        - 'excluded condition'

例如,将必需的标签条件和模板排除条件放在同一个顶层 and 之下。obsidian-bases/SKILL.md 中错误的 schema 示例已在 PR #68 中修复。

来源 Issue #58
故障排除
为什么 `obsidian help` 在通过管道传递给 `head` 时会挂起或启动第二个 Obsidian Electron 实例?

obsidian help 会启动一个 Electron 进程,而不仅仅是打印静态帮助信息。当其输出通过管道传输并被提前关闭时(例如使用 | head),Electron 辅助进程可能无法收到干净的关闭信号,从而导致父 shell 被阻塞。请避免对该命令使用管道:直接在终端中运行 obsidian help,或使用 obsidian help > obsidian-help.txt 将其重定向到文件。如果需要限制执行时间,请使用 timeout 5 obsidian help > obsidian-help.txt。作为永久性的变通方法,可以在本地保留一份静态帮助文本的速查表,而不是运行 obsidian help。这是 CLI 行为问题,而非 Obsidian Skill 问题;请参阅 Obsidian 的 CLI 故障排除文档。

来源 Issue #89
故障排除
当 AI 智能体技能使用 Obsidian CLI 时,如何修复 'obsidian: command not found' 错误?

启用 Obsidian 内置的 CLI,而不是单独安装 obsidian-cli 软件包:

1. 打开 Obsidian 桌面应用。
2. 前往 **设置 → 常规 → 命令行界面(Command line interface)**。
3. 开启 **启用 CLI**。
4. 重启终端(或重新加载 shell 环境)。
5. 使用 which obsidian 或 obsidian --version 进行验证。

启用后,Obsidian 会创建该技能所需的 obsidian 命令。如果在设置过程中终端处于打开状态,请重启终端,以便检测到新命令。

来源 Issue #53