obsidian-plugin-dev

Guide TypeScript developers through Obsidian plugin architecture and build practices.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/magarcia/pylon-sync --skill obsidian-plugin-dev-magarcia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obsidian-plugin-dev
Source: https://github.com/magarcia/pylon-sync/tree/main/.agents/skills/obsidian-plugin-dev
Command: npx skills add https://github.com/magarcia/pylon-sync --skill obsidian-plugin-dev-magarcia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This guide collects Obsidian plugin architecture, API conventions, Vault interactions, and build practices so TypeScript developers can ship features without guessing the runtime rules.

Core Features & Use Cases

  • Plugin Anatomy & Registration: outlines the src/main.ts entry point, manifest expectations, Plugin class setup, register* helpers, commands, views, modals, and settings tabs so everything cleans up on unload.
  • API & Platform Guidance: highlights Vault read/write/adapter usage, Workspace and Vault events, requestUrl requirements, and Platform detection for safe desktop and mobile behavior.
  • Build & Deployment Workflow: details the esbuild config, tsconfig choices, version bump script, and symlink-based development cycle that keeps bundles compatible with Obsidian.
  • Use Case: while implementing a new command that touches vault files, rely on this skill to configure settings, register events, respect mobile-safe HTTP/crypto, and keep the plugin lifecycle clean.

Quick Start

Request a plugin skeleton that registers commands, Vault events, and requestUrl-based HTTP helpers while following register* cleanup conventions.

Frequently Asked Questions about obsidian-plugin-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an Obsidian plugin with TypeScript and esbuild?

To set up an Obsidian plugin with TypeScript and esbuild, configure the esbuild bundler and tsconfig to compile your src/main.ts entry point into a manifest-compatible bundle. This ensures your plugin loads correctly within the Obsidian vault environment.

What is the correct way to register commands and settings tabs in an Obsidian plugin?

Registering commands and settings tabs in an Obsidian plugin involves using the Plugin class setup and register* helpers. This pattern ensures everything cleans up on unload, maintaining a stable lifecycle for commands, views, modals, and settings configurations.

How does requestUrl work for HTTP requests in Obsidian plugin development?

The requestUrl function works for making HTTP requests in Obsidian plugin development by providing a platform-safe API for desktop and mobile. It replaces standard fetch calls, ensuring safe network behavior across different Obsidian runtime environments.

Can I use the Vault API to read and write files in my Obsidian plugin?

Yes, you can use the Vault API to read and write files in your Obsidian plugin. The API provides adapter usage and event listeners for Vault and Workspace interactions, allowing safe file modifications while respecting the plugin lifecycle hooks.

Why does my Obsidian plugin leave dangling event listeners after uninstall?

Obsidian plugins leave dangling event listeners after uninstall when register* cleanup conventions are not followed. Using the register* helpers during Plugin class setup ensures all commands, views, and Vault events are properly disposed of on unload.

What's the best way to handle Platform detection for mobile-safe Obsidian plugins?

The best way to handle Platform detection for mobile-safe Obsidian plugins is using the Platform API alongside requestUrl requirements. This approach distinguishes between desktop and mobile environments, ensuring safe HTTP and crypto behavior across devices.