技能图谱SKILLSGROVE
技能图谱/效率工具/Raccoon-Office/Box-Agent/obsidian

obsidian

安装

$npx skills add https://github.com/Raccoon-Office/Box-Agent --skill obsidian
$git clone --depth 1 https://github.com/Raccoon-Office/Box-Agent.git /tmp/Box-Agent && mkdir -p ~/.claude/skills && cp -r /tmp/Box-Agent/box_agent/skills/obsidian ~/.claude/skills/obsidian
请帮我安装这个 Agent Skill:https://github.com/Raccoon-Office/Box-Agent/tree/df679b5f24ed9c39f91bf1d84b10df7c71a4937c/box_agent/skills/obsidian ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MITUse this skill whenever the user asks to create, export, save, append, prepend, open, or write Markdown notes in Obsidian. It explains when to call the native obsidian_* tools backed by the official Obsidian CLI, and how to avoid unsafe direct bash CLI writes.
以下 SKILL.md 内容转载自 Raccoon-Office/Box-Agent(提交 df679b5),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2025 MiniMax (original Mini-Agent) 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

Obsidian 笔记助手

当用户明确要求把内容写入、导出、保存、追加或打开到 Obsidian 时,使用本 skill,并优先调用 Box-Agent 的原生 obsidian_* 工具。

何时使用

出现这些信号就进入本流程:

  • “导出到 Obsidian”
  • “保存到 Obsidian”
  • “写入 Obsidian”
  • “追加到某篇 Obsidian 笔记”
  • “生成今天的 todo 到 Obsidian”
  • “打开 / 更新 / 覆盖 Obsidian 笔记”

工具选择

  • 新建普通笔记:调用 obsidian_create_note。
  • 追加、前置或覆盖已有笔记:调用 obsidian_update_note。
  • 今天的 Daily Note / todo / 日记:调用 obsidian_daily_note。

引用上下文写回

当 prompt 中存在 <obsidian_context ... path="...">,表示 officev3 已从 Vault 原文件读取该笔记内容作为上下文。

  • 只读问题(提问、总结、统计、分析)直接参考 obsidian_context 回答。
  • 如果用户明确要求修改、保存、追加、前置或覆盖这篇被引用的 Obsidian 笔记,必须使用 context 中的 Vault 相对 path 调用 obsidian_update_note。
  • 不要修改 workspace 文件、.data-sources 副本或自行复制出的 Markdown 文件;Obsidian 写回以 Vault 原文件为准。

路径规则

  • path 必须是 Vault 相对路径,例如 Projects/AI 周报.md。
  • 不要传绝对路径。
  • 不要使用 ..。
  • 写入目标必须是 .md 文件。

Bash 边界

可以用 bash 做诊断:

obsidian version
obsidian help
which obsidian

不要用 bash 直接执行写入或打开类命令,例如:

obsidian create ...
obsidian append ...
obsidian prepend ...
obsidian open ...
obsidian daily ...

这些操作必须走 obsidian_* 原生工具,因为工具会处理 Vault 配置、路径校验、权限确认、CLI 参数转义和失败提示。

示例

用户:“帮我生成今天的 todo 项到 Obsidian。”

做法:整理 todo 内容后调用:

obsidian_daily_note(action="append", content="<Markdown todo>", open_after=true)

用户:“把这份报告导出为 Obsidian 笔记。”

做法:调用:

obsidian_create_note(title="报告标题", content="<Markdown report>", open_after=true)
查看许可证全文(MIT)
MIT License

Copyright (c) 2025 MiniMax (original Mini-Agent)
Copyright (c) 2025 Raccoon Office (Box-Agent modifications)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.