obsidian-integration

把 Obsidian 笔记库变成可被 WorkBuddy 读写的自动化服务。教程 + 工具包:安装 Local REST API 与 Advanced URI 两个插件,发现真实端口、用 Bearer Token 鉴权,通过 HTTPS 读写/搜索笔记,并用 Advanced URI 触发任意 Obsidian 命令(含 notetweet 发推等社区插件命令)。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "obsidian-integration":https://skillpi.com/zh/skills/deepskill-60ea60f062a833f8fb0d31907ab239c5de0694cde330faf7fc3d63e9fc36f3c3。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3cdd1ed9/obsidian-integration。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

把 Obsidian 笔记库变成可被 WorkBuddy 读写的自动化服务。教程 + 工具包:安装 Local REST API 与 Advanced URI 两个插件,发现真实端口、用 Bearer Token 鉴权,通过 HTTPS 读写/搜索笔记,并用 Advanced URI 触发任意 Obsidian 命令(含 notetweet 发推等社区插件命令)。

0 下载

介绍来源: third_party · user_3cdd1ed9 · 1.0.1 参考来源

SkillPi 解读

能完成的任务
把 Obsidian 笔记库变成可被 WorkBuddy 读写的自动化服务。教程 + 工具包:安装 Local REST API 与 Advanced URI 两个插件,发现真实端口、用 Bearer Token 鉴权,通过 HTTPS 读写/搜索笔记,并用 Advanced URI 触发任意 Obsidian 命令(含 notetweet 发推等社区插件命令)。
适合谁
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
软件、账号及付费要求
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: obsidian-integration
description: 把 Obsidian 笔记库变成可被 WorkBuddy 读写的自动化服务。教程 + 工具包:安装 Local REST API 与 Advanced URI 两个插件,发现真实端口、用 Bearer Token 鉴权,通过 HTTPS 读写/搜索笔记,并用 Advanced URI 触发任意 Obsidian 命令(含 notetweet 发推等社区插件命令)。

Obsidian Integration (Tutorial + Toolkit)

Overview

This skill turns an Obsidian vault into an addressable, automatable service. Two community plugins provide complementary capabilities:

  • Local REST API — a secure HTTPS REST interface for file operations (read, write, create, delete, search notes). It does NOT execute plugin commands.
  • Advanced URI — extends the obsidian:// protocol so external callers can trigger any Obsidian command (including community-plugin commands such as posting a tweet).

Together they let WorkBuddy: save bookmarks/notes into the vault, read/analyze notes, and fire in-Obsidian actions (e.g. the notetweet plugin's "post file as thread" command).

The combination is the answer to "Local REST API can't run commands" — Advanced URI supplies exactly the command-execution piece that Local REST API is missing.

When To Use

  • User says "connect Obsidian", "save this to my vault", "read my Obsidian notes", etc.
  • User wants to trigger an Obsidian plugin command from outside the app.
  • User wants to automate posting to X/Twitter from notes (notetweet / x-post-saver plugins).

Prerequisites (one-time, inside Obsidian)

  1. Install Local REST API — Settings → Community plugins → Browse → "Local REST API". Enable it, then open its settings and click Generate Token. Note the token and the port (default 27123, but the real port is often different — see Step 1).
  2. Install Advanced URI — same browse flow, search "Advanced URI", enable it.
  3. (Optional, for posting) Install notetweet or x-post-saver and configure X API keys in their settings (stored in Obsidian's encrypted Secret Storage).

Obsidian must be running for both the REST API and URI commands to work.

Step 1 — Discover the real API port

The default port (27123) is frequently occupied, and Obsidian picks another on launch. Find it:

netstat -ano | grep -E "2712[0-9]"
# Example output:  TCP  127.0.0.1:27124  0.0.0.0:0  LISTENING  34448

Use whichever port is LISTENING (here 27124). Store it as BASE in scripts.

Step 2 — Authenticate

The token from Local REST API settings is used as a Bearer token on every HTTPS request:

Authorization: Bearer <token>

The API serves over HTTPS with a self-signed certificate — clients must disable cert verification (curl --insecure, or ssl.CERT_NONE in Python). Plain HTTP returns HTTP 000.

Step 3 — Verify the connection

Read any existing note (URL-encode the filename):

curl -s -H "Authorization: Bearer <token>" \
  "https://127.0.0.1:27124/vault/%E6%AC%A2%E8%BF%8E.md" --insecure

HTTP 200 with note body = success.

Core Capability A — File operations (Local REST API)

Action Method + Path Notes
Read note GET /vault/<file> URL-encode filename
Write/create note PUT /vault/<file> Body = markdown, Content-Type: text/markdown
Append POST /vault/<file>
Delete DELETE /vault/<file>
List vault GET /vault/ Returns JSON {"files":[...]}
Search GET /search/?query=<q> Full-text

See scripts/obsidian_helper.py for a ready-to-run client.

Core Capability B — Trigger commands (Advanced URI)

Format (note the adv-uri host, not obsidian):

obsidian://adv-uri?vault=<vault>&filepath=<file>&commandid=<command-id>
  • commandid is recommended over commandname (stable). Find a plugin's command id in its source manifest.json / command registration.
  • Optional confirm=true auto-clicks the first modal button.
  • Opening a file + running a command: include filepath so the command targets that note.

Windows launch gotcha: PowerShell blocks URIs containing %VAR%-style segments (URL-encoded non-ASCII like %E6%AC%A2). Pass the raw (un-encoded) filename instead:

Start-Process "obsidian://adv-uri?vault=test1&filepath=欢迎.md&commandid=editor:save-file"

From Bash/Git Bash use cmd /c start "" "<uri>" or call PowerShell as above.

Common Workflows

Save arbitrary content into the vault

Write a note via PUT /vault/<filename> (Capability A). Filename from title/source; append metadata (source, timestamp, tags) as YAML frontmatter or a --- footer.

Read & analyze a note

GET /vault/<file>, then summarize / extract / cross-link as requested.

Post a tweet/thread from a note

  1. Write the note with THREAD START / THREAD END markers (notetweet format).
  2. Trigger the plugin command via Advanced URI, e.g. commandid=<notetweet-post-file-as-thread-id>.
  3. Always confirm with the user before any real external post — it is a public action.

Troubleshooting

Symptom Cause / Fix
HTTP 000 on HTTPS Wrong port, or Obsidian not running. Re-check netstat.
HTTP 000 on HTTP API is HTTPS-only. Use https:// + --insecure.
401 Bad/expired token. Regenerate in plugin settings.
PowerShell refuses URI %-encoded non-ASCII in URI. Use raw Chinese filename.
Command did nothing Obsidian not focused/running, or wrong commandid. Verify plugin installed.

Resources

  • scripts/obsidian_helper.py — runnable client: read, write, search, list, cmd.
  • references/api_reference.md — endpoint details and Python/PowerShell snippets.

当前收录版本

1.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 Obsidian 笔记库的自动化读写与命令触发能力,解决用户将本地知识库接入 WorkBuddy 的实际痛点
  • 支持通过 Local REST API 进行文件操作,通过 Advanced URI 触发任意 Obsidian 命令,功能互补性强
触发精准90/100

亮点

  • 触发词精准完整,覆盖多种变体(connect Obsidian, save to vault, read notes, trigger command),边界清晰
结构规范95/100

待提升项

  • description写错位置 原报告严重程度:轻微

    顶层 frontmatter 中 description 为空,实际内容位于 skill_body 内部

    改进建议:将 description 内容移至顶层 frontmatter

  • 文档过长 原报告严重程度:轻微

    skill_body 内容约 600 行,超出建议长度

    改进建议:考虑将部分细节移至引用文件,保持主文档简洁

亮点

  • 文档结构完整,包含 Overview、When To Use、Prerequisites、Step-by-step 指南、Core Capabilities、Workflows、Troubleshooting、Resources
  • 提供端到端示例(curl/PowerShell),frontmatter 完整
执行可靠90/100

亮点

  • 工具来源明确(Local REST API、Advanced URI 插件),参数说明详细(端口发现、Bearer Token、HTTPS+自签名证书处理)
  • 覆盖主要异常(端口占用、证书验证、PowerShell URI 编码问题、命令未执行),不可逆操作(发推)明确要求用户确认
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 调用命令或脚本

    先读脚本与参数,使用普通权限和限定目录;安装或执行前由使用工具再次确认。

    主文档提及 · 第 103 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • 127.0.0.1

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

翻译待完成,请参阅来源文档。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。