gapmiss/obsidian-plugin-skill

CLAUDE SKILL for Obsidian.md plugin development

License:MITLanguage:JavaScript484
Claudeclaude-codeclaude-skillsobsidianobsidian-mdobsidian-plugin

Deep Analysis

Claude Code skill designed for Obsidian plugin development with 27 ESLint rules, official guidelines, and submission requirements comprehensive knowledge base

Highly Recommended

Core Features

Covers all 27 rules from eslint-plugin-obsidianmd

Interactive tool with real-time metadata validation and TypeScript boilerplate generation

Main SKILL.md provides top 20 key rules, detailed content loads on demand

Validates manifest.json and plugin info compliance with submission rules

Enforces keyboard navigation, ARIA labels, and other A11y requirements

Provides one-click install script

Technical Implementation

Architecture:Progressive disclosure architecture with main SKILL.md as entry point, reference subdirectory organizing detailed docs by topic
Execution Flow:

Key Components:
Claude Code Skills
eslint-plugin-obsidianmd
Node.js Scripts
Bash Installer
Highlights
  • Covers all 27 ESLint rules for Obsidian plugin development
  • Interactive template generator with real-time plugin metadata validation
  • Progressive disclosure design
  • Enforces accessibility requirements
  • Built-in iOS compatibility checks
  • Complete pre-submission checklist
Use Cases
  • Create new plugins meeting Obsidian official standards from scratch
  • Refactor existing plugins to fix memory leaks and type safety issues
  • Prepare plugin submission to Obsidian community plugin directory
  • Ensure plugins work properly on mobile
Limitations
  • Only for Claude Code CLI environment
  • Dependent eslint-plugin-obsidianmd not yet production-ready
  • Only covers Obsidian plugin development
Tech Stack
Claude Code SkillsTypeScriptNode.jsESLintBashObsidian API

Obsidian Plugin Development - Claude Skill

A comprehensive Claude Code skill for developing high-quality Obsidian plugins that follow best practices, pass code review, and adhere to official submission guidelines.

Overview

This skill provides Claude with deep knowledge of Obsidian plugin development standards, including:

  • All 27 ESLint rules from eslint-plugin-obsidianmd
  • Official Plugin Guidelines from Obsidian documentation
  • Submission requirements for the community plugins directory
  • Memory management and lifecycle best practices
  • Security guidelines and XSS prevention
  • Platform compatibility (including iOS considerations)
  • Network request best practices (requestUrl vs fetch)

Installation

This skill is located in .claude/skills/obsidian/ and works with Claude Code CLI.

Prerequisites

  • Claude Code CLI installed
  • An Obsidian plugin project (or starting a new one)

Setup

Option 1: Quick Install (Recommended)

  1. Clone this repository:

    git clone https://github.com/gapmiss/obsidian-plugin-skill.git
    cd obsidian-plugin-skill
    
  2. Run the installer:

    ./install-skill.sh
    
  3. Choose installation option:

    • Option 1: Install to current directory
    • Option 2: Specify a custom directory path

The installer will copy all skill files and the slash command to your project's .claude directory.

Option 2: Manual Install

  1. Clone this repository:

    git clone https://github.com/gapmiss/obsidian-plugin-skill.git
    cd obsidian-plugin-skill
    
  2. Copy the skill to your project:

    # Copy to your project's .claude directory
    mkdir -p your-project/.claude/skills/obsidian
    cp -r .claude/skills/obsidian/* your-project/.claude/skills/obsidian/
    
    # Also copy the slash command
    mkdir -p your-project/.claude/commands
    cp .claude/commands/obsidian.md your-project/.claude/commands/
    

Option 3: Use as Standalone

Just open this directory with Claude Code - no installation needed!

Skill Structure

The skill uses progressive disclosure for optimal performance:

.claude/skills/obsidian/
β”œβ”€β”€ SKILL.md                          # Main overview (312 lines)
└── reference/                        # Detailed documentation
    β”œβ”€β”€ memory-management.md          # Lifecycle & cleanup patterns
    β”œβ”€β”€ type-safety.md                # Type narrowing & safety
    β”œβ”€β”€ ui-ux.md                      # UI standards & commands
    β”œβ”€β”€ file-operations.md            # Vault & file API
    β”œβ”€β”€ css-styling.md                # Theming & styling
    β”œβ”€β”€ accessibility.md              # A11y requirements (MANDATORY)
    β”œβ”€β”€ code-quality.md               # Best practices & security
    └── submission.md                 # Publishing guidelines

SKILL.md provides a concise overview with the top 20 critical rules, while reference files contain comprehensive details on specific topics.

Quick Start: Creating a New Plugin

Interactive Boilerplate Generator

The fastest way to start a new Obsidian plugin with all best practices built-in:

node /path/to/obsidian-plugin-skill/tools/create-plugin.js

Features:

  • βœ… Generates clean TypeScript boilerplate with no sample code
  • βœ… Creates src/ directory structure with main.ts and settings.ts
  • βœ… Validates plugin metadata in real-time against Obsidian's submission bot rules
  • βœ… Detects existing projects and only adds missing files
  • βœ… All generated code follows the skill's best practices automatically

What it creates:

your-plugin/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.ts           # Plugin class with settings integration
β”‚   └── settings.ts       # Settings interface, defaults, and tab
β”œβ”€β”€ manifest.json         # Validated plugin metadata
β”œβ”€β”€ styles.css           # CSS with Obsidian variables
β”œβ”€β”€ tsconfig.json        # TypeScript configuration
β”œβ”€β”€ package.json         # Dependencies
β”œβ”€β”€ esbuild.config.mjs   # Build configuration
β”œβ”€β”€ version-bump.mjs     # Version management script
β”œβ”€β”€ versions.json        # Version tracking
└── .gitignore          # Git ignore rules

Interactive prompts:

  1. Plugin name (validates: no "Obsidian", can't end with "Plugin")
  2. Plugin ID (validates: no "obsidian", can't end with "plugin", lowercase only)
  3. Description (validates: no "Obsidian"/"This plugin", must end with punctuation)
  4. Author name
  5. GitHub username (optional, auto-generates authorUrl)
  6. Minimum Obsidian version

Real-time validation catches common mistakes:

❌ Validation Errors:
   β€’ Plugin ID cannot contain "obsidian"
   β€’ Plugin name cannot end with "Plugin"
   β€’ Description must end with punctuation: . ? ! or )

Using the Slash Command

For guided plugin creation with Claude's help:

/create-plugin

Claude will guide you through the setup process and help customize the generated code.


Usage

How Skills Work

Skills are automatically invoked by Claude - you don't need to explicitly call them. When you work on Obsidian plugin development in a directory containing this skill, Claude will automatically load and apply these guidelines based on your requests.

Just ask Claude naturally:

Help me implement a new command for my Obsidian plugin

Claude will automatically use the Obsidian skill guidelines while helping you write code.

Optional: Manual Invocation

If you want to explicitly load the skill, you can use the slash command:

/obsidian

Or reference the skill directly:

Following the Obsidian plugin guidelines, help me refactor this code...

What the Skill Helps With

Code Quality

  • Prevents common memory leaks
  • Enforces type safety (no unsafe casts)
  • Ensures proper resource cleanup
  • Follows Obsidian's API patterns

UI/UX Standards

  • Enforces sentence case for all UI text
  • Prevents redundant naming patterns
  • Ensures consistent settings UI

Accessibility (A11y)

  • MANDATORY keyboard navigation for all interactive elements
  • MANDATORY ARIA labels for icon buttons and controls
  • MANDATORY focus indicators with proper CSS styling
  • Touch target size requirements (44Γ—44px minimum)
  • Screen reader support and announcements
  • Tooltip positioning with data-tooltip-position

Security

  • Prevents XSS vulnerabilities (no innerHTML/outerHTML)
  • Validates manifest structure
  • Ensures proper path handling

Platform Compatibility

  • iOS compatibility checks (no regex lookbehind)
  • Cross-platform path handling
  • Mobile-friendly API usage

Submission Ready

  • Removes template/sample code
  • Validates manifest.json
  • Ensures LICENSE compliance
  • Follows submission requirements

What's Covered

Top 27 Most Critical Rules (Quick Reference)

The main SKILL.md file highlights the most important rules organized by category:

Submission & Naming:

  1. Plugin ID: no "obsidian", can't end with "plugin"
  2. Plugin name: no "Obsidian", can't end with "Plugin"
  3. Plugin name: can't start with "Obsi" or end with "dian"
  4. Description: no "Obsidian", "This plugin", etc.
  5. Description must end with .?!) punctuation

Memory & Lifecycle:
6. Use registerEvent() for automatic cleanup
7. Don't store view references in plugin

Type Safety:
8. Use instanceof instead of type casting

UI/UX:
9. Use sentence case for all UI text
10. No "command" in command names/IDs
11. No plugin ID in command IDs
12. No default hotkeys
13. Use .setHeading() for settings headings

API Best Practices:
14. Use Editor API for active file edits
15. Use Vault.process() for background file mods
16. Use normalizePath() for user paths
17. Use Platform API for OS detection
18. Use requestUrl() instead of fetch()
19. No console.log in onload/onunload in production

Styling:
20. Use Obsidian CSS variables
21. Scope CSS to plugin containers

Accessibility (MANDATORY):
22. Make all interactive elements keyboard accessible
23. Provide ARIA labels for icon buttons
24. Define clear focus indicators

Security & Compatibility:
25. Don't use innerHTML/outerHTML
26. Avoid regex lookbehind

Code Quality:
27. Remove all sample/template code

Detailed Coverage by Topic

Memory Management & Lifecycle

  • Using registerEvent(), addCommand(), registerDomEvent(), registerInterval()
  • Avoiding view references in plugin
  • Not using plugin as component
  • Proper leaf cleanup

Type Safety

  • Using instanceof instead of type casting
  • Avoiding any type
  • Using const and let over var

UI/UX Standards

  • Sentence case enforcement
  • Command naming conventions
  • Settings and configuration best practices

File & Vault Operations

  • View access patterns
  • Editor vs Vault API
  • Atomic file operations (Vault.process, processFrontMatter)
  • File management and path handling

CSS Styling Best Practices

  • Avoiding inline styles
  • Using Obsidian CSS variables
  • Scoping plugin styles
  • Theme support (light/dark)
  • Spacing and layout (4px grid)

Accessibility (A11y) - MANDATORY

  • Keyboard navigation for all interactive elements
  • ARIA labels and roles
  • Tooltips with proper positioning
  • Focus management
  • Focus visible styles (:focus-visible)
  • Screen reader support
  • Mobile and touch accessibility (44Γ—44px minimum)

Code Quality & Best Practices

  • Removing sample code
  • Security best practices (XSS prevention)
  • Platform compatibility (iOS, mobile)
  • API usage patterns
  • Async/await patterns
  • DOM helpers

Plugin Submission Requirements

Highly Recommended
agents

wshobson/agents

wshobson

Intelligent automation and multi-agent orchestration for Claude Code

The most comprehensive Claude Code plugin ecosystem, covering full-stack development scenarios with a three-tier model strategy balancing performance and cost.

25.6k2.8k3 days ago
Highly Recommended
awesome-claude-skills

ComposioHQ/awesome-claude-skills

ComposioHQ

A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows

The most comprehensive Claude Skills resource list; connect-apps is a killer feature.

19.9k2.0k3 days ago
Recommended
oh-my-opencode

code-yeongyu/oh-my-opencode

code-yeongyu

The Best Agent Harness. Meet Sisyphus: The Batteries-Included Agent that codes like you.

Powerful multi-agent coding tool, but note OAuth limitations.

17.5k1.2k3 days ago
Highly Recommended
ui-ux-pro-max-skill

nextlevelbuilder/ui-ux-pro-max-skill

nextlevelbuilder

An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms

Essential for designers; comprehensive UI/UX knowledge base.

15.3k1.5k3 days ago
Recommended
claude-mem

thedotmack/claude-mem

thedotmack

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sessions.

A practical solution for Claude's memory issues.

14.0k9143 days ago
Highly Recommended
planning-with-files

OthmanAdi/planning-with-files

OthmanAdi

Claude Code skill implementing Manus-style persistent markdown planning β€” the workflow pattern behind the $2B acquisition.

Context engineering best practices; an open-source implementation of Manus mode.

9.3k8113 days ago