Agent Skillsdavepoon/buildwithclaude › obsidian-rest-api

obsidian-rest-api

GitHub

提供 Obsidian Local REST API 的完整 HTTP 调用封装,弥补 MCP 工具缺失。支持笔记移动/重命名、原子覆盖、执行命令及周期性笔记 CRUD,优先用于 MCP 无法覆盖的操作场景。

plugins/all-skills/skills/obsidian-rest-api/SKILL.md davepoon/buildwithclaude

触发场景

需要移动或重命名笔记 需要原子性覆盖文件内容 需要执行 Obsidian 内部命令 MCP 工具不支持的操作

安装

npx skills add davepoon/buildwithclaude --skill obsidian-rest-api -g -y
更多选项

非标准路径

npx skills add https://github.com/davepoon/buildwithclaude/tree/main/plugins/all-skills/skills/obsidian-rest-api -g -y

不安装直接使用

npx skills use davepoon/buildwithclaude@obsidian-rest-api

指定 Agent (Claude Code)

npx skills add davepoon/buildwithclaude --skill obsidian-rest-api -a claude-code -g -y

安装 repo 全部 skill

npx skills add davepoon/buildwithclaude --all -g -y

预览 repo 内 skill

npx skills add davepoon/buildwithclaude --list

SKILL.md

Frontmatter
{
    "name": "obsidian-rest-api",
    "license": "MIT",
    "category": "development-code",
    "description": "Call the Obsidian Local REST API directly (over HTTP) for vault operations the mcp__obsidian__* tools do NOT expose — move\/rename a note, overwrite a whole file atomically (PUT), act on the currently-open active file, run an Obsidian command, open a note in the UI, list all tags, or do date-specific periodic-note CRUD. Prefer the mcp__obsidian__* tools for plain read\/append\/patch\/delete\/search; fall back to this skill only when the required method is missing from MCP."
}

Obsidian Local REST API

The connected obsidian MCP server exposes only a subset of the Obsidian Local REST API (plugin obsidian-local-rest-api). This skill provides the full API surface plus an authenticated request wrapper, so a missing MCP method is called over HTTP instead of being worked around with hacks (e.g. delete+recreate to rename a note).

When to Use This Skill

Use the mcp__obsidian__* tools first for read, append, patch, delete, and search. Fall back to this skill only for operations that have no MCP tool:

  • Move / rename a note (preserves history, updates internal links)
  • Overwrite a whole file atomically (PUT) instead of delete+recreate
  • Act on the currently-open "active" file in the Obsidian UI
  • Run an Obsidian command from the command palette
  • Open / focus a note in the UI
  • List all vault tags with counts
  • Create/update/delete date-specific periodic notes

What This Skill Does

  1. Resolves the API host, port, and key from the connected obsidian MCP server config (~/.claude.json) or OBSIDIAN_* env vars — no hardcoded secrets.
  2. Handles the plugin's self-signed TLS certificate.
  3. Exposes every endpoint of the Local REST API (see references/api_reference.md), with the header enums (Operation, Target-Type, Target-Scope), the custom MOVE contract, and the search (JsonLogic/Dataview) formats.

How to Use

Call the wrapper scripts/olrapi.sh <METHOD> <path> [curl args...]:

S=scripts/olrapi.sh   # adjust to the skill's install path

# rename/move a note (the most common reason to reach for this skill)
"$S" MOVE "/vault/Path/To/Old Name.md" -H 'Destination: Path/To/New Name.md'

# move into a folder, keeping the filename (trailing slash on Destination)
"$S" MOVE "/vault/Inbox/todo.md" -H 'Destination: Archive/'

# atomically overwrite a whole note
"$S" PUT "/vault/Path/Note.md" -H 'Content-Type: text/markdown' --data-binary @/tmp/body.md

# read a note as structured JSON (frontmatter + tags + stat)
"$S" GET "/vault/Path/Note.md" -H 'Accept: application/vnd.olrapi.note+json'

# list tags, run a command, open a note in the UI
"$S" GET /tags/
"$S" POST "/commands/editor:toggle-bold/"
"$S" POST "/open/Path/Note.md?newLeaf=true"

The wrapper prints <<HTTP nnn>> after the body. Success: 200/204. On MOVE, 409 means the destination exists — add -H 'Allow-Overwrite: true' to force. For non-trivial calls, load references/api_reference.md.

Path & encoding rules

  • {filename} is vault-relative (no leading slash on the vault path).
  • Percent-encode non-ASCII in URL paths and in the MOVE Destination header (e.g. r%C3%A9sum%C3%A9.md). Destination rejects absolute (/…) paths.
  • Target a sub-part of a note with Target-Type (heading|block|frontmatter)
    • Target headers on GET/PATCH/POST.

Example

User: "Rename 3-Resources/Draft.md to 3-Resources/Final.md in my vault."

Output:

scripts/olrapi.sh MOVE "/vault/3-Resources/Draft.md" \
  -H 'Destination: 3-Resources/Final.md'
# <<HTTP 204>>  — moved, history preserved, internal links updated

Tips

  • Regenerate the reference against the live plugin if it was updated: scripts/olrapi.sh GET /openapi.yaml. GET / shows the plugin version.
  • Prefer PUT over delete+recreate for whole-file overwrites — it is atomic and keeps the file's identity.
  • The API serves HTTPS on port 27124 (self-signed → curl -k) and HTTP on 27123.

版本历史

  • 502fc01 当前 2026-07-05 15:06

同 Skill 集合

plugins/agent-triforce/skills/code-health/SKILL.md
plugins/agent-triforce/skills/feature-spec/SKILL.md
plugins/agent-triforce/skills/implement-feature/SKILL.md
plugins/agent-triforce/skills/release-check/SKILL.md
plugins/agent-triforce/skills/review-findings/SKILL.md
plugins/agent-triforce/skills/security-audit/SKILL.md
plugins/agents-uc-taskmanager/skills/init/SKILL.md
plugins/agents-uc-taskmanager/skills/work-pipeline/SKILL.md
plugins/agents-uc-taskmanager/skills/work-status/SKILL.md
plugins/aigent-os/skills/close/SKILL.md
plugins/aigent-os/skills/open/SKILL.md
plugins/all-skills/skills/activecampaign-automation/SKILL.md
plugins/all-skills/skills/agent-analytics/SKILL.md
plugins/all-skills/skills/airtable-automation/SKILL.md
plugins/all-skills/skills/amplitude-automation/SKILL.md
plugins/all-skills/skills/anti-ui-slop/SKILL.md
plugins/all-skills/skills/artifacts-builder/SKILL.md
plugins/all-skills/skills/asana-automation/SKILL.md
plugins/all-skills/skills/aurakit/SKILL.md
plugins/all-skills/skills/bamboohr-automation/SKILL.md
plugins/all-skills/skills/basecamp-automation/SKILL.md
plugins/all-skills/skills/bitbucket-automation/SKILL.md
plugins/all-skills/skills/box-automation/SKILL.md
plugins/all-skills/skills/brand-guidelines/SKILL.md
plugins/all-skills/skills/brevo-automation/SKILL.md
plugins/all-skills/skills/cal-com-automation/SKILL.md
plugins/all-skills/skills/calendly-automation/SKILL.md
plugins/all-skills/skills/canva-automation/SKILL.md
plugins/all-skills/skills/canvas-design/SKILL.md
plugins/all-skills/skills/changelog-generator/SKILL.md
plugins/all-skills/skills/circleci-automation/SKILL.md
plugins/all-skills/skills/clawring/SKILL.md
plugins/all-skills/skills/clickup-automation/SKILL.md
plugins/all-skills/skills/close-automation/SKILL.md
plugins/all-skills/skills/coda-automation/SKILL.md
plugins/all-skills/skills/coding-agent-pm/SKILL.md
plugins/all-skills/skills/coinpaprika-api/SKILL.md
plugins/all-skills/skills/competitive-ads-extractor/SKILL.md
plugins/all-skills/skills/confluence-automation/SKILL.md
plugins/all-skills/skills/content-research-writer/SKILL.md
plugins/all-skills/skills/convertkit-automation/SKILL.md
plugins/all-skills/skills/datadog-automation/SKILL.md
plugins/all-skills/skills/developer-growth-analysis/SKILL.md
plugins/all-skills/skills/dexpaprika-api/SKILL.md
plugins/all-skills/skills/discord-automation/SKILL.md
plugins/all-skills/skills/dispatch/SKILL.md
plugins/all-skills/skills/docusign-automation/SKILL.md
plugins/all-skills/skills/docx/SKILL.md
plugins/all-skills/skills/domain-name-brainstormer/SKILL.md
plugins/all-skills/skills/dropbox-automation/SKILL.md

元信息

文件数
0
版本
13c9cb5
Hash
2bc49888
收录时间
2026-07-05 15:06

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 09:50
浙ICP备14020137号-1 $访客地图$