obsidian-plugin

Create and develop Obsidian plugins from scratch. Use when building a new Obsidian plugin, scaffolding from the sample-plugin-plus template, or developing plugin features. Covers project setup, manifest configuration, TypeScript development, settings UI, commands, ribbons, modals, and Obsidian API patterns.

7 stars

Best use case

obsidian-plugin is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create and develop Obsidian plugins from scratch. Use when building a new Obsidian plugin, scaffolding from the sample-plugin-plus template, or developing plugin features. Covers project setup, manifest configuration, TypeScript development, settings UI, commands, ribbons, modals, and Obsidian API patterns.

Teams using obsidian-plugin should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/obsidian-plugin-dev/SKILL.md --create-dirs "https://raw.githubusercontent.com/Demerzels-lab/elsamultiskillagent/main/public/skills/davidvkimball/obsidian-plugin-dev/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/obsidian-plugin-dev/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How obsidian-plugin Compares

Feature / Agentobsidian-pluginStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create and develop Obsidian plugins from scratch. Use when building a new Obsidian plugin, scaffolding from the sample-plugin-plus template, or developing plugin features. Covers project setup, manifest configuration, TypeScript development, settings UI, commands, ribbons, modals, and Obsidian API patterns.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Obsidian Plugin Development

Build production-ready Obsidian plugins using the [obsidian-sample-plugin-plus](https://github.com/davidvkimball/obsidian-sample-plugin-plus) template.

## Quick Start: New Plugin

### 1. Create from Template

```bash
# Clone the template (or use GitHub's "Use this template" button)
gh repo create my-plugin --template davidvkimball/obsidian-sample-plugin-plus --public --clone
cd my-plugin

# Or clone directly
git clone https://github.com/davidvkimball/obsidian-sample-plugin-plus.git my-plugin
cd my-plugin
rm -rf .git && git init
```

### 2. Configure Plugin Identity

Update these files with your plugin's info:

**manifest.json:**
```json
{
  "id": "my-plugin",
  "name": "My Plugin",
  "version": "0.0.1",
  "minAppVersion": "1.5.0",
  "description": "What your plugin does",
  "author": "Your Name",
  "authorUrl": "https://yoursite.com",
  "isDesktopOnly": false
}
```

**package.json:** Update `name`, `description`, `author`, `license`.

**README.md:** Replace template content with your plugin's documentation.

### 3. Initialize Development Environment

```bash
pnpm install
pnpm obsidian-dev-skills          # Initialize AI skills
./scripts/setup-ref-links.sh      # Unix
# or: scripts\setup-ref-links.bat  # Windows
```

### 4. Clean Boilerplate

In `src/main.ts`:
- Remove sample ribbon icon, status bar, commands, modal, and DOM event
- Keep the settings tab if needed, or remove it
- Rename `MyPlugin` class to your plugin name

Delete `styles.css` if your plugin doesn't need custom styles.

## Development Workflow

### Build & Test

```bash
pnpm dev      # Watch mode — rebuilds on changes
pnpm build    # Production build
pnpm lint     # Check for issues
pnpm lint:fix # Auto-fix issues
pnpm test     # Run unit tests
```

### Install in Obsidian

Copy build output to your vault:
```bash
# Unix
cp main.js manifest.json styles.css ~/.obsidian/plugins/my-plugin/

# Or create a symlink for development
ln -s $(pwd) ~/.obsidian/plugins/my-plugin
```

Enable the plugin in Obsidian Settings → Community Plugins.

Use [Hot Reload](https://github.com/pjeby/hot-reload) plugin for automatic reloading during development.

## Plugin Architecture

### Entry Point (`src/main.ts`)

```typescript
import { Plugin } from 'obsidian';

export default class MyPlugin extends Plugin {
  settings: MyPluginSettings;

  async onload() {
    await this.loadSettings();
    // Register commands, ribbons, events, views
  }

  onunload() {
    // Cleanup: remove event listeners, views, DOM elements
  }

  async loadSettings() {
    this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
  }

  async saveSettings() {
    await this.saveData(this.settings);
  }
}
```

### Settings Pattern

See [references/settings.md](references/settings.md) for the complete settings UI pattern.

### Common Patterns

See [references/patterns.md](references/patterns.md) for:
- Commands (simple, editor, check callbacks)
- Ribbon icons
- Modals
- Events and lifecycle
- File operations
- Editor manipulation

## Constraints

- **No auto-git**: Never run `git commit` or `git push` without explicit approval
- **No eslint-disable**: Fix lint issues properly, don't suppress them
- **No `any` types**: Use proper TypeScript types
- **Sentence case**: UI text uses sentence case (ESLint may false-positive on this — ignore if so)

## Release Checklist

1. Update version in `manifest.json` and `package.json`
2. Update `versions.json` with `"version": "minAppVersion"`
3. Run `pnpm build` — zero errors
4. Run `pnpm lint` — zero issues
5. Create GitHub release with tag matching version (no `v` prefix)
6. Upload: `main.js`, `manifest.json`, `styles.css` (if used)

## References

- [Settings UI](references/settings.md) — Complete settings tab implementation
- [Common Patterns](references/patterns.md) — Commands, modals, events, file operations
- [Obsidian API Docs](https://docs.obsidian.md) — Official documentation

Related Skills

memory-to-obsidian

7
from Demerzels-lab/elsamultiskillagent

将重要内容记录到 Obsidian Memory 文件夹,自动按日期整理并添加时间戳

grafana-plugin

7
from Demerzels-lab/elsamultiskillagent

Read current values from Grafana dashboards without knowing the underlying queries.

save-to-obsidian

7
from Demerzels-lab/elsamultiskillagent

Saves markdown content to remote Obsidian vault via SSH.

moltbot-plugin-2do

7
from Demerzels-lab/elsamultiskillagent

Create tasks and send them to 2Do app via email. Use when the user wants to: (1) add, create, or record a task/todo/reminder in any form - e.g. '添加任务', '创建待办', '新建任务', '加个任务', '记录任务', 'add task', 'create todo'; (2) ask to be reminded of something - e.g. '提醒我', '别忘了', '记得', '帮我记一下', 'remind me', 'remember to'; (3) mention something they need to do and want it tracked - e.g. '明天要开会', '周五前交报告', '下午去买菜'; (4) want to add items to a todo list or task manager - e.g. '加到待办', '放到任务列表', '记到清单里'; (5) describe a task with list/tag organization - e.g. '添加到工作列表', '标签是紧急'; (6) mention urgency or importance - e.g. '紧急', '重要', 'urgent', 'important'. Parses natural language (Chinese and English) to extract task title, due date/time, priority, optional list name, and optional tags, then sends a formatted email to the user's configured 2Do inbox.

NoChat Channel Plugin

7
from Demerzels-lab/elsamultiskillagent

Encrypted agent-to-agent messaging channel for OpenClaw. Post-quantum E2E encryption. Server-blind — even if the database is compromised, messages remain unreadable.

obsidian-daily

7
from Demerzels-lab/elsamultiskillagent

Manage Obsidian Daily Notes via obsidian-cli. Create and open daily notes, append entries (journals, logs, tasks, links), read past notes by date, and search vault content. Handles relative dates like "yesterday", "last Friday", "3 days ago". Requires obsidian-cli installed via Homebrew (Mac/Linux) or Scoop (Windows).

obsidian-sync

7
from Demerzels-lab/elsamultiskillagent

Sync files between Clawdbot workspace and Obsidian. Run the sync server to enable two-way file synchronization with the OpenClaw Obsidian plugin.

paylock

7
from Demerzels-lab/elsamultiskillagent

Non-custodial SOL escrow for AI agent deals.

agent-reputation

7
from Demerzels-lab/elsamultiskillagent

summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.

Telecom Agent Skill

7
from Demerzels-lab/elsamultiskillagent

Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.

OpenClaw-Finnhub

7
from Demerzels-lab/elsamultiskillagent

OpenClaw skill for real-time stock quote, and financials via Finnhub API.

```markdown

7
from Demerzels-lab/elsamultiskillagent

# OpenClaw-Last.fm