Token导航 LogoToken导航

Agent Skill · 前端设计

obsidian-plugin-development(Obsidian plugin 开发)

obsidian-plugin-development 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

obsidian-plugin-development 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 7,977。

总安装 324周安装 13GitHub Stars 公开资料未说明下载 105核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:obsidian-plugin-development(Obsidian plugin 开发)
来源仓库:https://github.com/wemingt/obsidian-plugin-skill
仓库路径:skills/obsidian-plugin-development
安装命令:
npx skills add https://github.com/wemingt/obsidian-plugin-skill --skill obsidian-plugin-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wemingt/obsidian-plugin-skill --skill obsidian-plugin-development

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适用于围绕仓库状态、代码变更或协作事项进行整理和分析。通过 npx skills add 命令从指定 GitHub 仓库安装使用。安装前需确认权限范围、维护状态及是否涉及联网或文件操作。

obsidian-plugin-development 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/obsidian-plugin-development

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wemingt/obsidian-plugin-skill --skill obsidian…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

obsidian-plugin-development 怎么安装?

在终端执行 npx skills add https://github.com/wemingt/obsidian-plugin-skill --skill obsidian-plugin-de…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

obsidian-plugin-development 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

obsidian-plugin-development 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

obsidian-plugin-development 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

obsidian-plugin-development 用的人多吗?

公开数据是累计安装 324 次,近一周安装 13 次,下载 105 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

obsidian-plugin-development 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
obsidian-plugin-development

Obsidian plugin 开发 · 本页

324—需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Obsidian Plugin Development Guidelines

You are assisting with Obsidian plugin development. Follow these comprehensive guidelines derived from the official Obsidian ESLint plugin rules, submission requirements, and best practices.

Getting Started

Quick Start Tool

For new plugin projects, use the companion obsidian-plugin-creator skill:

  • Install it alongside this skill: npx skills add gapmiss/obsidian-plugin-skill
  • Or run the generator directly: node <skill-path>/obsidian-plugin-creator/create-plugin.js
  • Generates minimal, best-practice boilerplate with no sample code
  • Detects existing projects and only adds missing files
  • All generated code follows these guidelines automatically

When to Suggest the Tool

Recommend the boilerplate generator when users:

  • Ask "how do I create a new Obsidian plugin?"
  • Want to start a new plugin project
  • Need help setting up the basic structure
  • Want to ensure they start with best practices

Core Principles

  1. Memory Safety: Prevent memory leaks through proper resource management
  2. Type Safety: Use proper type narrowing and avoid unsafe casts
  3. API Best Practices: Follow Obsidian's recommended patterns
  4. User Experience: Maintain consistency in UI/UX across plugins
  5. Platform Compatibility: Ensure cross-platform support (including iOS)
  6. Accessibility: Make all features keyboard and screen reader accessible

Quick Reference

Most Critical Rules (eslint-plugin-obsidianmd v0.1.9+)

Submission & Naming:

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

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

Type Safety: 8. Use instanceof instead of type casting - Type safety for TFile/TFolder

UI/UX: 9. Use sentence case for all UI text - "Advanced settings" not "Advanced Settings" 10. Enforce sentence case in JSON locale files - ui/sentence-case-json (use recommendedWithLocalesEn) 11. Enforce sentence case in TS/JS locale modules - ui/sentence-case-locale-module 12. No "command" in command names/IDs - Redundant 13. No plugin ID/name in command IDs/names - Obsidian auto-namespaces 14. No default hotkeys - Avoid conflicts 15. Use .setHeading() for settings headings - Not manual HTML

API Best Practices: 16. Use Editor API for active file edits - Preserves cursor position 17. Use Vault.process() for background file mods - Prevents conflicts 18. Use normalizePath() for user paths - Cross-platform compatibility 19. Use Platform API for OS detection - Not navigator 20. Use requestUrl() instead of fetch() - Bypasses CORS restrictions 21. No console.log in onload/onunload in production - Pollutes console

Styling: 22. Use Obsidian CSS variables - Respects user themes 23. Scope CSS to plugin containers - Prevents style conflicts 24. Don't create <link> or <style> elements - Use styles.css file instead (no-forbidden-elements)

Accessibility (MANDATORY): 25. Make all interactive elements keyboard accessible - Accessibility required 26. Provide ARIA labels for icon buttons - Accessibility required 27. Define clear focus indicators - Use :focus-visible

Security & Compatibility: 28. Don't use innerHTML/outerHTML - Security risk (XSS) 29. Avoid regex lookbehind - iOS < 16.4 incompatibility

Code Quality: 30. Remove all sample/template code - MyPlugin, SampleModal, etc. 31. Don't mutate defaults with Object.assign - Use Object.assign({}, defaults, overrides) (object-assign) 32. Validate LICENSE copyright holder and year - Must not be "Dynalist Inc.", year must be current (validate-license)


Detailed Guidelines

For comprehensive information on specific topics, see the reference files:

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 (TypeScript, JSON locale, TS/JS locale modules)
  • recommendedWithLocalesEn config for locale file checks
  • Command naming conventions (no "command", no plugin name, no plugin ID)
  • Settings and configuration best practices

File & Vault Operations

  • View access patterns
  • Editor vs Vault API
  • Atomic file operations
  • File management
  • Path handling

CSS Styling Best Practices

  • Avoiding inline styles
  • Using Obsidian CSS variables
  • Scoping plugin styles
  • Theme support
  • Spacing and layout

Accessibility (A11y)

  • Keyboard navigation (MANDATORY)
  • ARIA labels and roles (MANDATORY)
  • Tooltips and accessibility
  • Focus management (MANDATORY)
  • Focus visible styles (MANDATORY)
  • Screen reader support (MANDATORY)
  • Mobile and touch accessibility (MANDATORY)
  • Accessibility checklist

Code Quality & Best Practices

  • Removing sample code
  • Security best practices
  • Custom rule messages (rule-custom-message)
  • Manifest and LICENSE validation

Plugin Submission Requirements

  • Repository structure
  • Submission process
  • Semantic versioning
  • Testing checklist

API Patterns & Platform Compatibility

  • Obsidian API usage (requestUrl, Editor, Vault.process)
  • Platform compatibility (regex lookbehind, Platform API)
  • Async/await patterns and DOM helpers

ESLint Setup & Integration

  • Installation and configuration
  • Running ESLint and auto-fixing
  • Complete rule ID to skill guideline mapping
  • IDE and CI/CD integration

Essential Do's and Don'ts

Do's ✅

Memory & Lifecycle:

  • Use registerEvent(), addCommand(), registerDomEvent(), registerInterval()
  • Return views/components directly (don't store unnecessarily)

Type Safety:

  • Use instanceof for type checking (not type casting)
  • Use specific types or unknown instead of any
  • Use const and let (not var)

API Usage:

  • Use this.app (not global app)
  • Use Editor API for active file edits
  • Use Vault.process() for background file modifications
  • Use FileManager.processFrontMatter() for YAML
  • Use fileManager.trashFile() for deletions
  • Use normalizePath() for user-defined paths
  • Use Platform API for OS detection
  • Use AbstractInputSuggest for autocomplete
  • Use direct file lookups (not vault iteration)
  • Use requestUrl() instead of fetch() for network requests

UI/UX:

  • Use sentence case for all UI text (and locale JSON/TS files via recommendedWithLocalesEn)
  • Use .setHeading() for settings headings
  • Use Obsidian DOM helpers (createDiv(), createSpan(), createEl())
  • Use window.setTimeout/setInterval with number type

Styling:

  • Move all styles to CSS
  • Use Obsidian CSS variables for all styling
  • Scope CSS to plugin containers
  • Support both light and dark themes via CSS variables
  • Follow Obsidian's 4px spacing grid

Accessibility (MANDATORY):

  • Make all interactive elements keyboard accessible
  • Provide ARIA labels for icon buttons
  • Define clear focus indicators using :focus-visible
  • Use data-tooltip-position for tooltips
  • Ensure minimum touch target size (44×44px)
  • Manage focus properly in modals
  • Test with keyboard navigation

Code Quality:

  • Use async/await (not Promise chains)
  • Remove all sample/template code
  • Test on mobile (if not desktop-only)
  • Follow semantic versioning
  • Minimize console logging (no console.log in onload/onunload in production)

Don'ts ❌

Memory & Lifecycle:

  • Don't store view references in plugin properties
  • Don't pass plugin as component to MarkdownRenderer
  • Don't detach leaves in onunload()

Type Safety:

  • Don't cast to TFile/TFolder (use instanceof)
  • Don't use any type
  • Don't use var

API Usage:

  • Don't use global app object
  • Don't use Vault.modify() for active file edits
  • Don't hardcode .obsidian path (use vault.configDir)
  • Don't use navigator.platform/userAgent (use Platform API)
  • Don't iterate vault when direct lookup exists
  • Don't use fetch() (use requestUrl() instead)

UI/UX:

  • Don't use Title Case in UI (use sentence case)
  • Don't include "command" in command names/IDs
  • Don't duplicate plugin ID in command IDs
  • Don't set default hotkeys
  • Don't create manual HTML headings (use .setHeading())
  • Don't use "General", "settings", or plugin name in settings headings

Styling:

  • Don't assign styles via JavaScript
  • Don't hardcode colors, sizes, or spacing (use CSS variables)
  • Don't use broad CSS selectors (scope to plugin)
  • Don't manually switch themes (CSS variables adapt automatically)
  • Don't create <link> or <style> elements (use styles.css file)

Security & Compatibility:

  • Don't use innerHTML/outerHTML (XSS risk)
  • Don't use regex lookbehind (iOS < 16.4 incompatibility)

Accessibility:

  • Don't create inaccessible interactive elements
  • Don't use icon buttons without ARIA labels
  • Don't remove focus indicators without alternatives
  • Don't make touch targets smaller than 44×44px

Code Quality:

  • Don't use Promise chains (use async/await)
  • Don't use document.createElement (use Obsidian helpers)
  • Don't keep sample class names (MyPlugin, SampleModal, etc.)
  • Don't use console.log in onload/onunload (pollutes console in production)
  • Don't use Object.assign(defaultsVar, other) — mutates defaults; use Object.assign({}, defaults, other) instead
  • Don't leave "Dynalist Inc." as LICENSE copyright holder or an outdated copyright year

When Reviewing/Writing Code

Use this checklist for code review and implementation:

  1. Memory management: Are components and views properly managed?
  2. Type safety: Using instanceof instead of casts?
  3. UI text: Is everything in sentence case?
  4. Command naming: No redundant words?
  5. File operations: Using preferred APIs?
  6. Mobile compatibility: No iOS-incompatible features?
  7. Sample code: Removed all boilerplate?
  8. Manifest: Correct version, valid structure?
  9. Accessibility: Keyboard navigation, ARIA labels, focus indicators?
  10. Testing: Can you use the plugin without a mouse?
  11. Touch targets: Are all interactive elements at least 44×44px?
  12. Focus styles: Using :focus-visible and proper CSS variables?

Common Patterns

Proper Command Registration

// ✅ CORRECT
this.addCommand({
  id: 'insert-timestamp',
  name: 'Insert timestamp',
  editorCallback: (editor: Editor, view: MarkdownView) => {
    editor.replaceSelection(new Date().toISOString());
  }
});

Safe Type Narrowing

// ✅ CORRECT
const file = this.app.vault.getAbstractFileByPath(path);
if (file instanceof TFile) {
  // TypeScript now knows it's a TFile
  await this.app.vault.read(file);
}

Keyboard Accessible Button

// ✅ CORRECT
const button = containerEl.createEl('button', {
  attr: {
    'aria-label': 'Open settings',
    'data-tooltip-position': 'top'
  }
});
button.setText('⚙️');

button.addEventListener('keydown', (e) => {
  if (e.key === 'Enter' || e.key === ' ') {
    e.preventDefault();
    performAction();
  }
});

Themed CSS

/* ✅ CORRECT */
.my-plugin-modal {
  background: var(--modal-background);
  color: var(--text-normal);
  padding: var(--size-4-4);
  border-radius: var(--radius-m);
  font-size: var(--font-ui-medium);
}

.my-plugin-button:focus-visible {
  outline: 2px solid var(--interactive-accent);
  outline-offset: 2px;
}

Additional Resources


Important Notes

  • These guidelines are based on eslint-plugin-obsidianmd v0.1.9 with main-branch additions (28 rules total)
  • Post-v0.1.9 changes (e.g., rule-custom-message, sentence-case enhancements) are tracked in the ESLint setup guide
  • Rules marked as auto-fixable can be automatically corrected with ESLint's --fix flag
  • Accessibility is NOT optional - all interactive elements must be keyboard accessible
  • Always test on mobile devices if your plugin is not desktop-only

When helping with Obsidian plugin development, proactively apply these rules and suggest improvements based on these guidelines. Refer to the detailed reference files for comprehensive information on specific topics.

平台分布

Codex

35.53%
按下载量换算37

Claude

30.06%
按下载量换算32

Cursor

18.76%
按下载量换算20

Gemini CLI

10.32%
按下载量换算11

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills