plugin-best-practices
This skill should be used when the user asks to "validate a plugin", "optimize plugin", "check plugin quality", "review plugin structure", "find plugin issues", "check best practices", "analyze plugin", or mentions plugin validation, optimization, or quality assurance.
Best use case
plugin-best-practices is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when the user asks to "validate a plugin", "optimize plugin", "check plugin quality", "review plugin structure", "find plugin issues", "check best practices", "analyze plugin", or mentions plugin validation, optimization, or quality assurance.
Teams using plugin-best-practices should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plugin-best-practices/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How plugin-best-practices Compares
| Feature / Agent | plugin-best-practices | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when the user asks to "validate a plugin", "optimize plugin", "check plugin quality", "review plugin structure", "find plugin issues", "check best practices", "analyze plugin", or mentions plugin validation, optimization, or quality assurance.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Plugin Best Practices
Validation and optimization guidance for Claude Code plugins.
RFC 2119 terms are mandatory: use only MUST, MUST NOT, SHOULD, SHOULD NOT, MAY. Replace REQUIRED/SHALL with MUST, SHALL NOT with MUST NOT, RECOMMENDED with SHOULD, NOT RECOMMENDED with SHOULD NOT, and OPTIONAL with MAY. See `references/rfc-2119.md`.
## Core Principles
- Skills are the preferred extension mechanism for new plugins, with commands reserved for backward compatibility.
## Component Model
### Skills
Skills are markdown prompts that run in the main conversation context and extend knowledge or provide workflows.
Two skill types are supported:
- **Instruction-type** (`user-invocable: true` → `commands`): imperative voice, phase-based workflows, user-invoked.
- **Knowledge-type** (`user-invocable: false` → `skills`): declarative voice, topic-based references, auto-loaded.
### Agents
Agents are autonomous subprocesses with isolated context and their own system prompts.
Key characteristics:
- Isolated context with a dedicated system prompt in the agent `.md` file.
- Restricted tool allowlists for safety and focus.
- Specialized expertise with judgment over execution details.
- Router-friendly descriptions containing 2–4 `<example>` blocks.
## Selection Guide
- **Instruction-type skills** apply when a user invokes a workflow via slash command and the process is linear.
- **Knowledge-type skills** apply when providing reference knowledge for agents or the main session.
- **Agents** apply when isolation, specialization, and autonomous decision-making are required.
## Templates and Structure
Templates are centralized for reuse across components. See `${CLAUDE_PLUGIN_ROOT}/examples/` for complete templates.
## plugin.json Declaration
| Config | User invocable | Claude invocable | Declare in |
|--------|----------------|------------------|------------|
| `user-invocable: false` | No | Yes | `skills` (knowledge-type) |
| (default) or `user-invocable: true` | Yes | Yes | `commands` (instruction-type) |
| `disable-model-invocation: true` | Yes | No | `commands` (instruction-type, no auto-invoke) |
## Validation Checklist
- Skills are under 500 lines with progressive disclosure to `references/`.
- Agents include clear delegation descriptions and a single responsibility.
- Agent descriptions include 2–4 `<example>` blocks.
- Component names use kebab-case.
- Scripts are executable with shebangs and `${CLAUDE_PLUGIN_ROOT}` paths.
- Tool invocations avoid explicit tool-call phrasing (see `references/tool-invocations.md`).
- Skill references use qualified names (`plugin-name:skill-name`).
- Component paths are relative and start with `./`.
- Components live at plugin root, not inside `.claude-plugin/`.
- Skills and commands are declared in `plugin.json` (recommended).
- Skill type matches manifest and writing style:
- Instruction-type uses imperative voice.
- Knowledge-type uses declarative voice.
## Severity Levels
- **Critical**: MUST fix before plugin works correctly.
- **Warning**: SHOULD fix for best-practices compliance.
- **Info**: MAY improve (optional).
## Reference Link Rule
Links to external templates or example files include a one-sentence description of what the target contains before the link.
## Additional Resources
Reference documents live in `references/`:
- **Components**: `references/components/[type].md` — component-specific requirements.
- **Structure**: `references/directory-structure.md` — layout and naming conventions.
- **Manifest**: `references/manifest-schema.md` — plugin.json schema and configuration.
- **Tool Usage**: `references/tool-invocations.md` — tool invocation patterns.
- **MCP Patterns**: `references/mcp-patterns.md` — MCP server integration.
- **Debugging**: `references/debugging.md` — diagnostics for loading failures.
- **CLI Commands**: `references/cli-commands.md` — plugin CLI operations.
- **TodoWrite Tool**: `references/todowrite-usage.md` — TodoWrite usage.
## Prompt Repetition
- Critical rules and safety constraints appear in multiple phases only when execution depends on it.
- Repetition favors concise restatement rather than verbatim duplication.
## Parallel Agent Execution
Parallel execution applies when tasks are independent and results can be merged afterward.
Request pattern:
```markdown
# Explicit parallel request
Launch all agents simultaneously:
- `domain-analyzer` agent
- `quality-validator` agent
- `format-checker` agent
# Or use "in parallel" phrasing
Launch 3 parallel agents to process different aspects independently
```
Best practices:
- "parallel" or "simultaneously" appears explicitly in the request.
- Descriptive style names the agent and intent.
- Consolidation merges findings and resolves conflicts.
Common pattern:
```markdown
1. Sequential setup (if needed)
2. Launch specialized analyses in parallel:
- `aspect-one-analyzer` agent — first dimension
- `aspect-two-validator` agent — second dimension
- `aspect-three-checker` agent — third dimension
3. Consolidate results and present unified output
```Related Skills
writing-opencode-plugins
Guides development of OpenCode plugins including project structure, testing patterns, and publishing. Use when creating or modifying OpenCode plugins.
workflow-new-plugin
Guided workflow for creating a new Volon plugin — ideation, requirements, spec, plan, tasks.
update-tool-plugin
Update an existing LNAI tool plugin
qe-consultancy-practices
Apply effective software quality consultancy practices. Use when consulting, advising clients, or establishing consultancy workflows.
pytest-plugins
Use when pytest plugin ecosystem including pytest-cov, pytest-mock, and custom plugin development.
plugin-validator
Validates SpecWeave plugin installation when EXPLICITLY requested by user. Use for checking if plugins are installed correctly, validating marketplace registration, or troubleshooting missing plugins. Only triggers on explicit requests to avoid false positives during normal workflow.
Plugin Structure
This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.
Plugin Settings
This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable plugin", ".local.md files", "plugin state files", "read YAML frontmatter", "per-project plugin settings", or wants to make plugin behavior configurable. Documents the .claude/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.
plugin-scaffolder
Scaffolds complete Claude Code plugin structures with all necessary directories, manifest, and documentation. Activates when user wants to create a new plugin, package features together, or prepare for marketplace distribution. Creates plugin.json, directory structure, and starter documentation. Use when user mentions "create plugin", "new plugin", "scaffold plugin", "plugin structure", or "share via marketplace".
plugin-marketplace
Plugin marketplace — add, remove, list, and search skills from GitHub repositories
plugin-builder
Build Cursor plugin scaffolds with optional Runlayer MCP integration. Use this skill when the user wants to create a new Cursor plugin, scaffold plugin skills/commands/rules/hooks, or set up MCP connector configurations. Triggers include "create a plugin", "build a plugin", "scaffold a plugin", "new plugin for [domain]", or any task involving Cursor plugin development.
open-brush-plugin-skill
Create and modify Lua plugins for Open Brush with full API documentation access. Use when the user wants to create Open Brush plugins, work with Lua scripts for Open Brush, or asks about Open Brush scripting API, Lua functions, or plugin development.