obsidian_skill
- JavaScript
77
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill gapmiss/obsidian-plugin-skill --skill obsidian- SKILL.md11.9 KB
Overview
This skill provides comprehensive, practical guidelines for building Obsidian.md plugins with a focus on safety, accessibility, and submission readiness. It bundles the top 27 ESLint-backed rules, TypeScript best practices, memory and lifecycle advice, UI/UX standards, API usage recommendations, and the artifact requirements needed for publishing. Use it as a checklist and coding style guide when authoring main.ts, manifest.json, Plugin subclasses, vault operations, or UI components.
How this skill works
The skill inspects plugin code and configuration against a curated checklist: naming and submission rules, memory management patterns, type-safety practices, Obsidian API usage (requestUrl vs fetch, Editor vs Vault), accessibility mandates, styling conventions, and platform compatibility. It flags violations, suggests fixes (e.g., use registerEvent(), normalizePath(), Platform API), and recommends boilerplate generation for new projects. Guidance is pragmatic and aligns with Obsidian lint rules and submission bots.
When to use it
- Starting a new Obsidian plugin project or scaffolding boilerplate
- Reviewing main.ts, manifest.json, or any Plugin class implementation
- Auditing memory management and lifecycle to prevent leaks
- Ensuring accessibility, theme support, and mobile compatibility
- Preparing a plugin repository for submission to the community plugin directory
Best practices
- Follow the 27 critical rules: naming, memory, type safety, API usage, styling, accessibility, and security
- Prefer registerEvent(), addCommand(), registerDomEvent(), and registerInterval() to ensure automatic cleanup
- Use instanceof for TFile/TFolder checks, avoid any casts and avoid the any type
- Use requestUrl() for network calls, Vault.process() for background file changes, and Editor API for active edits
- Scope CSS, use Obsidian CSS variables, and move all styling to a plugin styles.css file
- Make every interactive control keyboard accessible, provide ARIA labels, and use :focus-visible for focus indicators
Example use cases
- Generate a new plugin scaffold that already follows ESLint and submission rules
- Refactor an existing plugin that leaks memory by storing view references
- Replace fetch() calls with requestUrl() to resolve CORS and platform issues
- Audit UI text and command IDs to meet naming and sentence-case conventions before submission
- Validate manifest.json and versioning prior to publishing
FAQ
No — do not set default hotkeys to avoid conflicts; users should assign shortcuts.
When should I use Vault.process() vs Editor API?
Use Editor API for edits to the active open file to preserve cursor state; use Vault.process() for background or bulk file modifications.