obsidian-cli-skills

v1.0.0

Obsidian CLI enables managing Obsidian vaults via command line, supporting note creation, search, move with wiki link update, delete, frontmatter edit, daily...

0· 595·2 current·2 all-time
by0xCryptoPriest@0x-cryptopriest
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
SKILL.md describes a CLI that manipulates Obsidian vaults (create, move, delete, edit frontmatter), which is coherent with the name/description. However the skill metadata lists no required binaries or install — yet every command in the instructions calls an external binary 'obsidian-cli'. The metadata should declare that binary (or include an install). Also the SKILL.md hard-codes a default vault path (/Users/luoxiaohei/.openclaw/obsidian_workspace) tied to a specific user, which is unexpected and may cause the agent to operate on unintended files if used as-is.
Instruction Scope
Instructions direct use of obsidian-cli to read and modify vault files (create/move/delete notes, update wiki links, edit frontmatter) and explicitly say the CLI reads ~/Library/Application Support/obsidian/obsidian.json for vault info. Reading/writing those local files is expected for this purpose, but the manual references to a user-specific default path and to system-level app data mean the skill will access user files and Obsidian configuration — users should expect local file modification.
Install Mechanism
There is no install spec (instruction-only), so nothing gets written by the skill itself. This is low-risk from an install standpoint. However, the absence of an install declaration contributes to the inconsistency because the SKILL.md clearly expects an obsidian-cli binary to be present.
Credentials
The skill declares no environment variables or credentials, and the instructions do not request secrets. The only external data referenced are local filesystem paths and Obsidian's config file, which are proportional to a vault-management CLI.
Persistence & Privilege
always is false and the skill does not request system-wide persistence or to modify other skills' configs. Autonomous invocation is allowed by default but not combined with other high-risk factors here.
What to consider before installing
This skill is an instruction-only guide for a CLI that manipulates your Obsidian vault files. Before installing or enabling it: 1) Confirm you have (or will install) the obsidian-cli binary — the skill metadata does not declare it but the instructions require it. 2) Inspect and if necessary change the default vault path in the SKILL.md — it contains a hard-coded user path (/Users/luoxiaohei/...) which may point outside your intended vault and could cause unintended file changes. 3) Back up your vault before using commands that delete or move files (delete/move/overwrite). 4) Expect the skill to read ~/Library/Application Support/obsidian/obsidian.json to discover vaults; if you are uncomfortable with that, do not enable the skill. 5) Because the skill can modify local files, avoid enabling it with broad autonomous privileges until you verify it behaves as expected. If the publisher can provide a declared required-binary entry and remove user-specific hard-coded paths, the inconsistencies would be resolved.

Like a lobster shell, security has layers — review code before you run it.

latestvk97ewx80zmc12n7b7hsavzwthh82b9em
595downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Obsidian CLI 探索记录

更新时间:2026-03-05

简介

Obsidian CLI 是一个命令行工具,用于操作 Obsidian vault(笔记库)。它可以完成搜索、创建、移动、删除笔记等操作。

环境配置

  • 默认 Vault/Users/luoxiaohei/.openclaw/obsidian_workspace
  • 设置默认 Vaultobsidian-cli set-default "<vault路径>"

命令列表

1. create - 创建笔记

obsidian-cli create "笔记名" --content "内容"

参数:

参数简写说明
--content-c笔记内容
--open-o创建后打开笔记
--overwrite-o覆盖已存在的笔记
--append-a追加到已存在的笔记
--vault-v指定 vault 名称

示例:

obsidian-cli create "新笔记" --content "这是笔记内容"
obsidian-cli create "test-note" --content "This is a test note" --open

2. print - 打印笔记内容

obsidian-cli print "笔记名"

示例:

obsidian-cli print "test-note"
# 输出: This is a test note

3. search - Fuzzy 搜索

obsidian-cli search "关键词"

说明: 交互式搜索,会打开 Obsidian 让你选择笔记。


4. search-content - 全文搜索

obsidian-cli search-content "关键词"

说明: 在笔记内容中搜索包含指定关键词的笔记。

⚠️ 注意: 当前版本测试有问题,可能需要指定 vault 参数。


5. move - 移动/重命名笔记

obsidian-cli move "旧路径" "新路径"

特点: 移动时会自动更新 wiki 链接。

示例:

obsidian-cli move "test-note" "test-note-moved"
# 输出: Moved note from .../test-note.md to .../test-note-moved.md

6. delete - 删除笔记

obsidian-cli delete "笔记名"

示例:

obsidian-cli delete "test-note-moved"
# 输出: Deleted note: /Users/luoxiaohei/.openclaw/obsidian_workspace/test-note-moved.md

7. frontmatter - 查看/修改 YAML 头信息

# 查看 frontmatter
obsidian-cli frontmatter "笔记名" --print

# 修改 frontmatter
obsidian-cli frontmatter "笔记名" --edit --key "key名" --value "值"

# 删除 frontmatter
obsidian-cli frontmatter "笔记名" --delete --key "key名"

示例:

# 查看
obsidian-cli frontmatter "test-note" --print

# 添加/修改
obsidian-cli frontmatter "test-note" --edit --key "tags" --value "test,cli"

# 删除
obsidian-cli frontmatter "test-note" --delete --key "draft"

8. daily - 创建/打开每日笔记

obsidian-cli daily

说明: 自动创建或打开当天的每日笔记(格式:YYYY-MM-DD.md)。


9. open - 在 Obsidian 中打开笔记

obsidian-cli open "笔记名"

示例:

obsidian-cli open "my-note"

10. print-default - 查看默认 Vault

obsidian-cli print-default
obsidian-cli print-default --path-only  # 只显示路径

输出示例:

Default vault name:  obsidian_workspace
Default vault path:  /Users/luoxiaohei/.openclaw/obsidian_workspace

11. set-default - 设置默认 Vault

obsidian-cli set-default "vault名称或路径"

示例:

obsidian-cli set-default "obsidian_workspace"
obsidian-cli set-default "/Users/luoxiaohei/.openclaw/obsidian_workspace"

12. completion - 生成自动补全脚本

obsidian-cli completion [shell]

支持的 shell: bash, zsh, fish, powershell

示例:

obsidian-cli completion zsh

常用命令速查

功能命令
查看默认 vaultobsidian-cli print-default
设置默认 vaultobsidian-cli set-default "vault名"
创建笔记obsidian-cli create "名" --content "内容"
查看笔记obsidian-cli print "名"
搜索笔记名obsidian-cli search "关键词"
全文搜索obsidian-cli search-content "关键词"
移动/重命名obsidian-cli move "旧" "新"
删除笔记obsidian-cli delete "名"
查看头信息obsidian-cli frontmatter "名" --print
修改头信息obsidian-cli frontmatter "名" --edit --key "x" --value "y"
每日笔记obsidian-cli daily
在 Obsidian 打开obsidian-cli open "名"

注意事项

  1. Vault 路径:CLI 通过 ~/Library/Application Support/obsidian/obsidian.json 获取 vault 信息
  2. Wiki 链接move 命令会自动更新 wiki 链接,这是相比普通 mv 的优势
  3. 搜索问题search-content 在部分环境可能有兼容性问题
  4. 默认 Vault:建议先设置默认 vault,避免每次都要指定 -v 参数

Comments

Loading comments...