Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Obsidian Local REST API

БесплатноБез исполняемых скриптовНе проверен

Read, write, search, create, append, patch, and manage notes in a user-owned Obsidian vault via the Local REST API plugin (Windows, macOS, or Linux). Use when…

nj070574-gifот nj070574-gif1 421 установка в других каталогах

Об этом скилле

Obsidian Local REST API Skill

Control a user-owned Obsidian vault from OpenClaw using the Local REST API plugin. Works on any OS where Obsidian Desktop runs (Windows, macOS, Linux). No extra CLI tools needed — just curl.


Scope & least privilege

  • Binaries: curl and python3 only.
  • Network: outbound only, to the single OBSIDIAN_URL the user configures (their own vault). No telemetry, no third-party endpoints.
  • Credentials: OBSIDIAN_API_KEY is read from the environment at call time only — never inlined into a command, never printed, never logged.
  • Destructive operations require confirmation: overwrite (PUT), DELETE, and PATCH with replace/delete change or remove user data — confirm with the user before running them. Reads, listings, searches and appends are non-destructive.

TLS & credential handling (read before running any command)

The Local REST API plugin uses a self-signed certificate by default. Do not disable TLS verification — doing so sends the bearer API key and note contents over an unverified connection that a man-in-the-middle can read. Instead, export the plugin's certificate once (Obsidian → Settings → Local REST API → download the certificate), point OBSIDIAN_CA_CERT at it, and set a shell helper that every example below uses:

# Recommended — verified TLS:
export OBSIDIAN_CA_CERT="/path/to/obsidian-local-rest-api.crt"
CACERT="--cacert $OBSIDIAN_CA_CERT"

Alternatively, front the plugin with a reverse proxy holding a CA-issued (e.g. Let's Encrypt) certificate, in which case the system CA store verifies it and you can leave CACERT empty.

Trusted-LAN-only fallback (discouraged). If you have not yet exported the cert and are strictly on a trusted LAN, you may set CACERT="-k", which skips verification. This exposes the API key on the wire — never use it across any untrusted network, and rotate the key afterwards if you do.

The API key itself travels in the Authorization header. Never paste the literal key into a command; always reference $OBSIDIAN_API_KEY.


Critical: Known Pitfalls (Read First)

These issues were discovered in real-world use and will cause silent failures if ignored:

1. Trailing slashes are mandatory on directory paths

The API returns {"message":"Not Found","errorCode":40400} if you omit trailing slashes on directory endpoints.

Path Result
$OBSIDIAN_URL/vault/ ✅ Correct — lists vault root
$OBSIDIAN_URL/vault ❌ 40400 error
$OBSIDIAN_URL/vault/My%20Folder/ ✅ Correct — lists subfolder
$OBSIDIAN_URL/vault/My%20Folder ❌ 40400 error

2. The root health check endpoint is / — nothing else

There is no /api/, /api/healthz, /healthz, /status, or /health endpoint.

Path Result
$OBSIDIAN_URL/ ✅ Returns plugin status JSON
$OBSIDIAN_URL/api/ ❌ 40400 error
$OBSIDIAN_URL/api/healthz ❌ 40400 error

3. Shell variable expansion may fail in exec contexts

$OBSIDIAN_URL and $OBSIDIAN_API_KEY are available in the gateway process but child shells spawned by the exec tool may not inherit them depending on your OpenClaw configuration. Always test variable expansion before using them in curl:

echo "URL=$OBSIDIAN_URL KEY_LEN=${#OBSIDIAN_API_KEY}"

If either is empty, the exec shell isn't inheriting the gateway's environment. Fix the inheritance (confirm the Environment= lines are in the systemd unit and restart the service), or re-export the vars in the shell by sourcing them from the service config. Never paste the literal API key into commands — it lands in shell history and session logs.

4. Don't dump raw JSON at the user

Interpret API responses and reply in concise prose (in the user's language). See the Output Formatting section.


Prerequisites

  1. Obsidian Desktop installed and running with a vault open.
  2. Local REST API plugin installed and enabled in Obsidian:
    • Open Obsidian → Settings → Community plugins → Browse → search "Local REST API" → Install → Enable.
  3. API Key copied from: Settings → Local REST API → API Key.
  4. Certificate exported from the same settings page (for verified TLS — see "TLS & credential handling").
  5. Port noted (default: 27124). HTTPS is strongly recommended.
  6. Env vars set in your OpenClaw service (see Setup below).

Setup

The sudo commands below are standard one-time host setup that you run by hand to add env vars to your own service. The skill itself never runs sudo and never edits system files — at runtime it only makes curl calls to your vault.

1. Add env vars to your OpenClaw systemd service

sudo nano /etc/systemd/system/openclaw.service

Add these lines in the [Service] block (the CA cert line is optional but recommended):

Environment=OBSIDIAN_URL=https://YOUR_OBSIDIAN_
Полный SKILL.md на ClawHub

Установить Obsidian Local REST API в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Obsidian Local REST API?

Read, write, search, create, append, patch, and manage notes in a user-owned Obsidian vault via the Local REST API plugin (Windows, macOS, or Linux). Use when the user explicitly asks to work with their Obsidian vault — save/read/search/update a note, write or update a runbook, list the vault. Triggers (Obsidian-scoped): "save this to Obsidian", "add to my Obsidian vault", "read my Obsidian note on X", "search my Obsidian vault for X", "update the runbook in Obsidian", "list my Obsidian vault". Owner-operated — connects only to the user's own configured vault. Writes, overwrites and deletes require explicit user confirmation.

Как установить скилл Obsidian Local REST API?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Obsidian Local REST API запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Obsidian Local REST API с