/ 目录 / 演练场 / obsidian-plugin-skill
● 社区 gapmiss ⚡ 即开即用

obsidian-plugin-skill

作者 gapmiss · gapmiss/obsidian-plugin-skill

An Agent Skill that teaches Claude how to build Obsidian plugins — Plugin API, manifest.json, release flow.

obsidian-plugin-skill loads the Obsidian Plugin API shape into Claude's working memory: manifest.json + versions.json, main.ts plugin skeleton, settings tabs, commands, ribbon icons, editor extensions, and the release-via-GitHub-tag flow the official Community store expects. Useful when you want to prototype a plugin in an afternoon.

为什么要用

核心特性

实时演示

实际使用效果

obsidian-plugin-skill.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "obsidian-plugin-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/gapmiss/obsidian-plugin-skill",
        "~/.claude/skills/obsidian-plugin-skill"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "obsidian-plugin-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/gapmiss/obsidian-plugin-skill",
        "~/.claude/skills/obsidian-plugin-skill"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "obsidian-plugin-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/gapmiss/obsidian-plugin-skill",
        "~/.claude/skills/obsidian-plugin-skill"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "obsidian-plugin-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/gapmiss/obsidian-plugin-skill",
        "~/.claude/skills/obsidian-plugin-skill"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "obsidian-plugin-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/gapmiss/obsidian-plugin-skill",
        "~/.claude/skills/obsidian-plugin-skill"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "obsidian-plugin-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/gapmiss/obsidian-plugin-skill",
          "~/.claude/skills/obsidian-plugin-skill"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add obsidian-plugin-skill -- git clone https://github.com/gapmiss/obsidian-plugin-skill ~/.claude/skills/obsidian-plugin-skill

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: obsidian-plugin-skill

How to build and release your first Obsidian plugin

👤 Obsidian power users who want to scratch an itch ⏱ ~120 min intermediate

何时使用: You have a concrete workflow improvement and want a plugin in a day.

前置条件
  • Node 18+ — nvm install 18
  • A local vault for testing — Create a new Obsidian vault just for development
  • Skill cloned — git clone https://github.com/gapmiss/obsidian-plugin-skill ~/.claude/skills/obsidian-plugin-skill
步骤
  1. Scaffold the plugin
    Scaffold an Obsidian plugin called 'smart-outline' with a command and a settings tab.✓ 已复制
    → Folder with manifest, main.ts, build config
  2. Add the feature
    Implement: on command, open a modal showing the outline of the active note.✓ 已复制
    → Working modal reading from the active MarkdownView
  3. Side-load and test
    Install into the dev vault's plugins folder and reload Obsidian.✓ 已复制
    → Plugin shows up, command works
  4. Prepare a release
    Create versions.json and tag a v0.1.0 release.✓ 已复制
    → GitHub release with main.js + manifest.json attached

结果: A working, installable plugin you can submit to the Community store.

注意事项
  • Forgetting versions.json — Community store rejects — Skill reminds; always keep it in sync with manifest.json
  • Referencing Obsidian internals that aren't part of the API — Stick to the public API; treat internals as volatile
搭配使用: filesystem · github

Add a proper settings tab to an existing plugin

👤 Existing plugin authors improving UX ⏱ ~30 min intermediate

何时使用: Your plugin has grown and needs user-configurable options.

步骤
  1. Design the settings
    Based on my plugin's README, what settings should be user-configurable?✓ 已复制
    → Short list with rationale
  2. Implement PluginSettingTab
    Add a PluginSettingTab with those controls.✓ 已复制
    → Settings UI in Obsidian

结果: A settings tab users can actually use.

注意事项
  • Too many settings — Ruthlessly cut — unused settings are clutter

组合

与其他 MCP 搭配,撬动十倍杠杆

obsidian-plugin-skill + filesystem

Read an existing plugin and extend it

Read my-plugin/, add a new command that exports the active note as PDF.✓ 已复制
obsidian-plugin-skill + github

Automate tagging and release creation

Tag v0.2.0 and publish release with the built assets.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
plugin-scaffolding plugin intent New plugin 0
feature-authoring feature spec + API surface Every feature 0
settings-tab options UX improvements 0
release-flow version bump Before publishing 0

成本与限制

运行它的成本

API 配额
none
每次调用 Token 数
5–20k per plugin
费用
free
提示
Work feature-by-feature rather than dumping a full plugin spec on Claude

安全

权限、密钥、影响范围

凭据存储: GitHub token for releases (if automating)
数据出站: none at skill layer

故障排查

常见错误与修复

Obsidian doesn't load the plugin

Confirm manifest.json is valid JSON and in the right vault path; reload via Ctrl+R.

验证: cat .obsidian/plugins/my-plugin/manifest.json | jq .
Build produces no main.js

Run the esbuild command; check tsconfig target.

验证: ls main.js

替代方案

obsidian-plugin-skill 对比其他方案

替代方案何时用它替代权衡
logseqYou're on Logseq rather than ObsidianDifferent plugin API

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills