본문으로 건너뛰기
cccskills
무료GitHub에 공개

obsidian-dev-rules

Authoritative reference and rules for developing for Obsidian — building TypeScript plugins (Plugin lifecycle, manifest.json, commands, settings, modals, views, ribbon/status bar), the Vault and Editor APIs, the event system, Markdown post-processing & code-block processors, CodeMirror 6 editor extensions, building CSS themes (CSS variables, theme.css/manifest), and submitting plugins/themes to the community directory. Use whenever the user asks to build, debug, or review an Obsidian plugin or theme, work with the Obsidian API (Vault/Editor/Workspace/Plugin), register commands/views/events, process Markdown, or release/submit to the Obsidian community.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Obsidian
설치 방법 보기

포함된 파일(5)

  • SKILL.md5.8 KB
  • references/plugin-basics.md4.3 KB
  • references/themes-and-release.md4.0 KB
  • references/ui.md5.3 KB
  • references/vault-and-editor.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Obsidian Dev Rules

Obsidian is extended two ways: plugins (TypeScript against the Obsidian API) and themes/snippets (CSS). This skill mirrors the official developer docs at https://docs.obsidian.md so you can build and review Obsidian plugins/themes without re-fetching. The API ships as the obsidian npm package; the canonical starting point is the obsidian-sample-plugin.

When to use this skill

  • Building, debugging, or reviewing an Obsidian plugin (lifecycle, commands, settings, UI, views).
  • Reading/writing notes via the Vault API; manipulating the active note via the Editor API.
  • Subscribing to events, registering Markdown post-processors / code-block processors, or CodeMirror 6 editor extensions.
  • Building a theme (CSS variables, theme.css, manifest) or snippets.
  • Releasing/submitting a plugin or theme to the community directory.

Reference index — load the file you need

FileCovers
references/plugin-basics.mdProject setup, manifest.json, Plugin lifecycle (onload/onunload), resource registration & cleanup, events, dev workflow / hot reload, debugging
references/vault-and-editor.mdVault API (read/cachedRead/create/modify/process/delete, TFile/TFolder, adapter, normalizePath), Editor API, Markdown post-processing & code-block processors, CodeMirror 6 editor extensions
references/ui.mdCommands (callback variants, hotkeys), Settings (PluginSettingTab, load/saveData, Setting controls), Modals (Modal/SuggestModal/FuzzySuggestModal), Views (ItemView, registerView, workspace leaves), ribbon/status bar
references/themes-and-release.mdThemes (CSS variables, theme.css/manifest, body classes, snippets), submitting plugins & themes, developer policies & guidelines

Cheat sheet

import { Plugin, Notice, MarkdownView, TFile, normalizePath } from 'obsidian';

export default class MyPlugin extends Plugin {
  async onload() {
    await this.loadSettings();
    this.addRibbonIcon('dice', 'Greet', () => new Notice('Hello!'));
    this.addCommand({ id: 'do-x', name: 'Do X', callback: () => {/* ... */} });
    this.addSettingTab(new MySettingTab(this.app, this));
    // Auto-cleaned on unload — always register through these:
    this.registerEvent(this.app.vault.on('modify', (f) => {/* ... */}));
    this.registerInterval(window.setInterval(() => {/* ... */}, 1000));
    this.registerDomEvent(document, 'click', () => {/* ... */});
  }
  onunload() { /* release anything NOT registered via register*/ }
}
// Vault: prefer process() over read()+modify(); use cachedRead() for display only.
const file = this.app.vault.getFileByPath('Notes/x.md');
await this.app.vault.process(file, (data) => data.replace('foo', 'bar'));
// Editor of the active note (preserves cursor/selection):
const view = this.app.workspace.getActiveViewOfType(MarkdownView);
view?.editor.replaceSelection(view.editor.getSelection().toUpperCase());

Plugin files: manifest.json + main.js (+ optional styles.css) in <vault>/.obsidian/plugins/<id>/. Theme files: manifest.json + theme.css in <vault>/.obsidian/themes/<name>/.

Hard rules

  • Use this.app, never the global app (global exists for debugging only and may be removed).
  • Register everything that needs teardown via registerEvent / registerInterval / registerDomEvent / addCommand / registerView / registerMarkdownPostProcessor — Obsidian auto-cleans those on unload. Manually release anything else in onunload(). Leaked listeners/ intervals degrade Obsidian after the plugin is disabled.
  • Never use innerHTML / outerHTML / insertAdjacentHTML with dynamic content — build DOM with createEl() / createDiv() / createSpan().
  • Prefer the Vault API over the Adapter API; use getFileByPath() (not iterate-all); always normalizePath() user-supplied paths. Use process() (atomic) instead of sequential read()+modify() to avoid data loss; cachedRead() only when you won't write it back.
  • For the active note, edit via the Editor interface, not Vault.modify — it preserves the cursor and selection.
  • Don't store references to view instances; Obsidian may recreate them — fetch with getLeavesOfType() / getActiveViewOfType().
  • Don't set default hotkeys for distributed plugins (OS-dependent, conflict-prone). UI text is sentence case. Use CSS classes + Obsidian CSS variables, not hardcoded inline styles.
  • manifest.json required fields: id, name, version (semver x.y.z), minAppVersion, description, author, isDesktopOnly. id must not contain "obsidian"; name is Basic-Latin, no emoji/punctuation except hyphens.
  • Release: GitHub release whose tag equals the manifest version, with main.js, manifest.json, and optional styles.css attached as individual binary assets (not zipped).
  • Use async/await (not Promise chains); const/let (not var).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when designing, reviewing, or refactoring a CLI that must serve AI agents alongside humans, or when converting an API or SDK into an agent-usable CLI interface.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

Search free commercial-use creative assets across multiple online sources — photos, illustrations, icons, video footage, music, sound effects, and fonts. Use when the user needs to find assets for videos, PPTs, articles, or any content creation. Trigger on phrases like "find me a photo of", "search for icons", "I need background music", "find video footage", "search fonts", "找一张图片", "搜素材", "帮我找图标/视频/音乐/字体". Covers Pexels, Unsplash, Pixabay, Iconify, Freesound, Google Fonts and more — with API-backed search where available.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

asta

무료

Query the Semantic Scholar academic corpus through AI2's Asta MCP server: keyword or title search with venue and date filters, who-cited-a-paper traversal, author profiles and publications, DOI/arXiv/PMID lookup, and ~500-word full-text snippets for evidence, with citation counts and h-index. Use when the user asks for papers on a topic, who cited a paper, an author's work, recent literature since a date, or a venue-scoped paper list. Requires the Asta MCP server.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

Extract and organize frames from a Bilibili video (bangumi episode, UP upload, or a local file) into scenery shots and per-character image groups, using anime-specific person detection + CCIP character-identity embeddings. Two modes — cluster everyone, or pull out one (or several) named characters via reference folders. Use when the user wants to collect, extract, or organize anime frames/screenshots by character or by scenery from a Bilibili video. Read-only download for personal viewing/analysis; uploads nothing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

bbc-skill

무료

Fetch Bilibili (哔哩哔哩) video comments for UP主 self-analysis. Use when the user asks to collect, download, export, or analyze comments on a Bilibili video (BV号 / URL / UID). Produces JSONL + summary.json suitable for further Claude Code analysis (sentiment, keywords, audience trends). Read-only; does not post/edit/delete.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .excalidraw files and exports to PNG/SVG via Kroki API or locally using excalidraw-brute-export-cli.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Agents365-ai/365-skills872026년 10월 16일 업데이트

Agents365-ai의 스킬 모두 보기

이 스킬의 문제 신고