Develop high-quality Obsidian plugins with best practices, code review standards, and official submission guidelines. Ideal for operations teams needing efficient plugin development.
git clone https://github.com/gapmiss/obsidian-plugin-skill.gitDevelop high-quality Obsidian plugins with best practices, code review standards, and official submission guidelines. Ideal for operations teams needing efficient plugin development.
["Install prerequisites: Node.js (v16+), TypeScript, and Obsidian. Run `npm init obsidian-plugin` to scaffold your project structure.","Replace [PLUGIN_NAME] and [FEATURE_DESCRIPTION] in the prompt with your specific requirements. For complex features, break them into smaller components.","Run the generated code through your TypeScript compiler (tsc) and bundle with esbuild (npm run build). Test in Obsidian's Sandbox Vault using the `npm run dev` command.","For submission to the Obsidian Community Plugins repo, ensure your manifest.json includes all required fields (id must be unique, minAppVersion must match your target Obsidian version).","Use the generated unit tests as a starting point, then expand with edge cases. Run tests with `npm test` before each commit. For CI/CD, set up GitHub Actions to automatically build and test your plugin on push."]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/gapmiss/obsidian-plugin-skillCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a production-ready Obsidian plugin for [PLUGIN_NAME] that follows the official Obsidian API best practices and submission guidelines. Include: 1) A clean TypeScript structure with proper error handling, 2) Unit tests using Jest/Vitest, 3) Documentation in Markdown format, 4) Bundle optimization with esbuild, and 5) A manifest.json compliant with Obsidian's requirements. Use the latest Obsidian API (v1.0+) and include a sample feature: [FEATURE_DESCRIPTION].
```typescript
// Generated Obsidian Plugin: "Quick Note Search"
// Version: 1.0.0 | API: 1.0.0
import { App, Plugin, PluginSettingTab, Setting, TFile } from 'obsidian';
interface QuickNoteSearchSettings {
searchShortcut: string;
includeTags: boolean;
}
const DEFAULT_SETTINGS: QuickNoteSearchSettings = {
searchShortcut: 'Ctrl+Shift+F',
includeTags: true
};
export default class QuickNoteSearchPlugin extends Plugin {
settings: QuickNoteSearchSettings;
async onload() {
await this.loadSettings();
this.addSettingTab(new QuickNoteSearchSettingTab(this.app, this));
// Register search command
this.addCommand({
id: 'quick-note-search',
name: 'Search notes quickly',
hotkeys: [{ modifiers: ['Ctrl', 'Shift'], key: 'f' }],
callback: () => this.quickSearch()
});
// Register search ribbon icon
this.addRibbonIcon('search', 'Quick Note Search', () => this.quickSearch());
}
async loadSettings() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
}
async saveSettings() {
await this.saveData(this.settings);
}
quickSearch() {
const searchTerm = prompt('Enter search term:');
if (!searchTerm) return;
const files = this.app.vault.getMarkdownFiles();
const results = files.filter(file =>
file.basename.toLowerCase().includes(searchTerm.toLowerCase()) ||
(this.settings.includeTags && file.tags.some(tag => tag.includes(searchTerm)))
);
if (results.length === 0) {
new Notice('No matching notes found');
return;
}
// Open first result
this.app.workspace.getLeaf().openFile(results[0]);
}
}
class QuickNoteSearchSettingTab extends PluginSettingTab {
plugin: QuickNoteSearchPlugin;
constructor(app: App, plugin: QuickNoteSearchPlugin) {
super(app, plugin);
this.plugin = plugin;
}
display(): void {
const {containerEl} = this;
containerEl.empty();
containerEl.createEl('h2', {text: 'Quick Note Search Settings'});
new Setting(containerEl)
.setName('Search Shortcut')
.setDesc('Keyboard shortcut for quick search')
.addText(text => text
.setValue(this.plugin.settings.searchShortcut)
.onChange(async (value) => {
this.plugin.settings.searchShortcut = value;
await this.plugin.saveSettings();
}));
new Setting(containerEl)
.setName('Include Tags in Search')
.setDesc('Whether to search within note tags')
.addToggle(toggle => toggle
.setValue(this.plugin.settings.includeTags)
.onChange(async (value) => {
this.plugin.settings.includeTags = value;
await this.plugin.saveSettings();
}));
}
}
```
**manifest.json:**
```json
{
"id": "quick-note-search",
"name": "Quick Note Search",
"version": "1.0.0",
"minAppVersion": "1.0.0",
"description": "Quickly search and open notes with keyboard shortcuts",
"author": "Your Name",
"authorUrl": "https://github.com/yourusername",
"fundingUrl": "https://github.com/sponsors/yourusername",
"isDesktopOnly": false
}
```
**package.json:**
```json
{
"name": "obsidian-quick-note-search",
"version": "1.0.0",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit && node esbuild.config.mjs production",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/node": "^16.11.0",
"esbuild": "^0.17.0",
"jest": "^29.5.0",
"obsidian": "^1.0.0",
"ts-jest": "^29.1.0",
"typescript": "^5.0.0"
}
}
```
**Tests (quick-note-search.test.ts):**
```typescript
test('should find notes by name', async () => {
const plugin = new QuickNoteSearchPlugin();
await plugin.loadSettings();
const mockFile = { basename: 'Meeting Notes', path: 'meeting.md', tags: [] } as TFile;
plugin.app.vault.getMarkdownFiles = jest.fn(() => [mockFile]);
const consoleSpy = jest.spyOn(console, 'log');
plugin.quickSearch = jest.fn();
await plugin.onload();
expect(plugin.quickSearch).toHaveBeenCalled();
});
```Knowledge-powered CRM with networked thinking
AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan