← Back to Skills Marketplace
kxindot

Obsidian WSL

by kxindot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
155
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install obsidian-wsl
Description
通过 notesmd-cli 操作 Obsidian 知识库 — 搜索、创建、编辑、移动、删除笔记及管理 frontmatter,无需 Obsidian 运行。
README (SKILL.md)

Obsidian WSL Skill

基于 notesmd-cli(v0.3.0+,原 obsidian-cli)操作 Obsidian 知识库。notesmd-cli 无需 Obsidian 运行即可工作,适合脚本、自动化和纯终端环境。

环境配置

知识库发现

notesmd-cli 通过 ~/.config/obsidian/obsidian.json 发现知识库。在有 Obsidian 桌面端的系统上会自动生成;在无头服务器或无 GUI 的环境中需手动创建:

{
  "vaults": {
    "my-brain": {
      "path": "/home/user/vaults/my-brain"
    }
  }
}
  • 键名可以是任意唯一 ID,CLI 使用目录名作为知识库名称
  • 路径必须为绝对路径,不支持 ~ 展开
  • 支持多个知识库:
{
  "vaults": {
    "personal": {
      "path": "/home/user/vaults/personal"
    },
    "work": {
      "path": "/home/user/vaults/work"
    }
  }
}

设置默认知识库

notesmd-cli set-default "my-brain"
notesmd-cli set-default --open-type editor

编辑器配置

无 Obsidian GUI 时,建议配置默认使用终端编辑器:

export EDITOR="vim"   # 或 code、nano 等
notesmd-cli set-default --open-type editor

所有支持 --open 的命令均可加 --editor(或 -e)在终端编辑器中打开。

常用命令速查

查看状态

notesmd-cli print-default              # 查看默认知识库名称和路径
notesmd-cli print-default --path-only  # 仅输出路径
notesmd-cli list-vaults                # 列出所有已注册知识库

搜索

notesmd-cli search                     # 交互式模糊搜索笔记名称
notesmd-cli search --editor            # 搜索并在编辑器中打开
notesmd-cli search-content "关键词"     # 搜索笔记内容
notesmd-cli search-content "关键词" --no-interactive  # 非交互,输出 grep 风格结果
notesmd-cli search-content "关键词" --format json      # JSON 输出,适合脚本

列出目录

notesmd-cli list                       # 列出知识库根目录
notesmd-cli list "子目录名"             # 列出子目录内容

读取笔记

notesmd-cli print "笔记名"             # 输出笔记内容
notesmd-cli print "路径/笔记名"         # 按路径输出

创建笔记

notesmd-cli create "笔记名"            # 创建空笔记
notesmd-cli create "文件夹/笔记名" --content "内容"  # 创建带内容的笔记
notesmd-cli create "笔记名" --content "内容" --append   # 追加内容
notesmd-cli create "笔记名" --content "内容" --overwrite  # 覆盖已有笔记
notesmd-cli create "笔记名" --content "内容" --open --editor  # 创建并在编辑器中打开

中间目录会自动创建。

移动/重命名

notesmd-cli move "旧路径" "新路径"      # 移动或重命名,自动更新知识库内所有链接
notesmd-cli move "旧路径" "新路径" --open --editor  # 移动后在编辑器中打开

删除

notesmd-cli delete "笔记路径"           # 删除笔记(谨慎使用)

Daily Notes

notesmd-cli daily                      # 创建/打开今日笔记
notesmd-cli daily --editor             # 在编辑器中打开

如果知识库中存在 .obsidian/daily-notes.json,CLI 会读取其中的 folder、format、template 配置。

Frontmatter 管理

notesmd-cli frontmatter "笔记名" --print                    # 查看 frontmatter
notesmd-cli frontmatter "笔记名" --edit --key "status" --value "done"  # 编辑字段
notesmd-cli frontmatter "笔记名" --delete --key "draft"     # 删除字段

直接操作文件系统

对于简单读写操作,直接操作知识库中的 .md 文件同样有效,Obsidian 会自动检测变更:

  • 读取:直接读取知识库中的 .md 文件
  • 编辑:直接修改文件
  • 注意:直接文件操作不会自动更新 wikilinks,如需重命名请使用 notesmd-cli move

排除文件

CLI 尊重 Obsidian 的排除设置(Settings -> Files & Links -> Excluded Files):

  • search:排除的笔记不出现在模糊搜索中
  • search-content:排除的文件夹不会被搜索
  • 其他命令(open、move、print、frontmatter)仍可访问排除的文件
Usage Guidance
This skill is coherent with its stated purpose, but it performs direct reads/writes/deletes in your Obsidian vault(s). Before installing: (1) verify you trust the notesmd-cli Homebrew tap (yakitrak) — review the formula/source if possible; (2) back up your vault(s) (or test in a copy) because commands like create/overwrite/move/delete will modify files; (3) note that the skill expects a vault registry at ~/.config/obsidian/obsidian.json — create it carefully with absolute paths; (4) the skill itself doesn't request network credentials or exfiltrate data in its instructions, but any tool that can write files should be used cautiously. If you want extra assurance, inspect the notesmd-cli source or install notesmd-cli manually and run commands in a safe test vault first.
Capability Analysis
Type: OpenClaw Skill Name: obsidian-wsl Version: 1.0.0 The skill provides a legitimate interface for managing Obsidian vaults using the 'notesmd-cli' tool. It includes standard installation steps via Homebrew (yakitrak/yakitrak/notesmd-cli) and documents common note-taking operations like searching, creating, and editing notes. No evidence of malicious intent, data exfiltration, or prompt injection was found in SKILL.md or _meta.json.
Capability Assessment
Purpose & Capability
Name/description match the required binary (notesmd-cli). The skill is instruction-only and documents using notesmd-cli to search, create, edit, move, delete notes and manage frontmatter — exactly what the binary provides.
Instruction Scope
SKILL.md instructs the agent to read and modify files inside the user's vault(s) (e.g., .md files) and to create/modify ~/.config/obsidian/obsidian.json to register vaults. These filesystem actions are expected for this purpose but are material: the skill can overwrite/delete notes, so users should expect file writes and deletions.
Install Mechanism
Install uses a Homebrew formula (yakitrak/yakitrak/notesmd-cli). Brew formulas are a standard install mechanism, but this is a third-party tap (yakitrak) rather than the official Homebrew/core; that increases review burden compared with an official formula or a well-known project page.
Credentials
The skill declares no required environment variables or credentials. The SKILL.md suggests setting EDITOR for convenience, which is reasonable and optional. No unrelated secrets or external service credentials are requested.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request permanent elevated privileges or modify other skills' config. Autonomous invocation (disable-model-invocation false) is the normal platform default.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install obsidian-wsl
  3. After installation, invoke the skill by name or use /obsidian-wsl
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
基于内置 obsidian skill 改写,适配 notesmd-cli(原 obsidian-cli),支持 Linux/WSL2 纯终端环境操作 Obsidian 知识库
Metadata
Slug obsidian-wsl
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Obsidian WSL?

通过 notesmd-cli 操作 Obsidian 知识库 — 搜索、创建、编辑、移动、删除笔记及管理 frontmatter,无需 Obsidian 运行。 It is an AI Agent Skill for Claude Code / OpenClaw, with 155 downloads so far.

How do I install Obsidian WSL?

Run "/install obsidian-wsl" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Obsidian WSL free?

Yes, Obsidian WSL is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Obsidian WSL support?

Obsidian WSL is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Obsidian WSL?

It is built and maintained by kxindot (@kxindot); the current version is v1.0.0.

💬 Comments