Obsidian Developer Skill
This skill transforms Claude into an expert Obsidian plugin developer and automation engineer. It leverages the obsidian-devtools MCP server to inspect, debug, and automate the Obsidian app.
Quick Start
- •Connect:
obsidian_launch_debug()— starts Obsidian with CDP enabled - •Discover:
obsidian_discover_api("app.vault")— explore available methods - •Execute:
obsidian_eval("app.vault.getName()")— run any JavaScript - •Automate: Use patterns from
patterns/for common tasks
Workflow
- •
Connect: Ensure Obsidian is running with debug flags.
- •Run
obsidian_launch_debug()to start or attach.
- •Run
- •
Inspect: Understand the current state.
- •Use
obsidian_inspect_dom()to see the UI structure. - •Use
obsidian_discover_api()to explore internal APIs. - •Refer to
knowledge/dom-patterns.mdfor class names.
- •Use
- •
Execute: Run automation or queries.
- •Use
obsidian_eval()to interact with theappobject. - •Refer to
knowledge/api-basics.mdfor common API calls. - •Refer to
knowledge/cdp-protocol.mdfor data passing rules.
- •Use
- •
Create: Generate visual content.
- •Use
obsidian_create_canvas()for spatial layouts. - •Refer to
knowledge/canvas-api.mdfor node/edge schemas.
- •Use
Knowledge Modules
| Module | Purpose |
|---|---|
| API Basics | app.vault, app.workspace, app.plugins |
| SDK Reference | Python SDK for programmatic access |
| Canvas API | Creating and manipulating canvas files |
| Graph View | Graph data extraction and analysis |
| CDP Protocol | Runtime.evaluate internals |
| DOM Patterns | CSS classes for UI automation |
Pattern Library
Reusable scripts in patterns/:
| Pattern | Purpose |
|---|---|
| plugin-audit.js | List enabled plugins with metadata |
| theme-extract.js | Dump CSS variables |
| dataview-query.js | Run Dataview queries via JS |
| frontmatter-batch.js | Batch frontmatter operations |
| canvas-generator.js | Generate canvases from vault data |
MCP Tools Reference
| Tool | Purpose |
|---|---|
obsidian_launch_debug | Start/attach to Obsidian with CDP |
obsidian_eval | Execute JavaScript in Obsidian context |
obsidian_inspect_dom | Get summarized DOM snapshot |
obsidian_discover_api | Introspect object methods/properties |
obsidian_get_frontmatter | Read file frontmatter |
obsidian_update_frontmatter | Modify frontmatter key |
obsidian_create_canvas | Create .canvas file |
obsidian_graph_zoom | Control graph view zoom |
Tips
- •Async is Key: Wrap code in
(async () => { ... })()if usingawait. - •No Circular Refs: Return simple JSON objects, not full
TFileorAppinstances. - •Use Discovery: Query APIs at runtime with
obsidian_discover_api()rather than assuming. - •Security: The server runs in Safe Mode. File system writes are blocked unless configured.
- •Batch Operations: Use
frontmatter-batch.jspatterns for vault-wide changes.
Related
- •SKILLS-INDEX.md — Master skill navigation
- •VERTEX-MAP.md — Cross-skill integration