Pro Plugin Structure
Production-ready skill that handles skill, should, used, user. Includes structured workflows, validation checks, and reusable patterns for development.
Plugin Structure for Claude Code
A Claude Code skill for understanding and implementing the standardized directory structure of Claude Code plugins ā covering automatic component discovery, file conventions, and plugin architecture.
When to Use This Skill
Choose this skill when:
- Understanding how Claude Code discovers and loads plugin components
- Setting up the correct directory layout for a new plugin
- Adding new skills, commands, or hooks to an existing plugin
- Troubleshooting plugin loading issues
- Building plugins that follow the standard structure
Consider alternatives when:
- You need to build a single skill without a plugin (use skill creation directly)
- You need an MCP server (use the MCP builder skill)
- You need command-line tools (use standard CLI frameworks)
Quick Start
my-plugin/
āāā plugin.json # Plugin manifest (required)
āāā README.md # Plugin documentation
āāā CHANGELOG.md # Version history
āāā skills/ # Skill definitions
ā āāā code-review.md # Auto-discovered skill
ā āāā test-generator.md # Auto-discovered skill
āāā commands/ # Slash commands
ā āāā deploy.md # /deploy command
ā āāā release.md # /release command
āāā hooks/ # Event hooks
ā āāā post-write.json # Hook configuration
āāā assets/ # Plugin assets
āāā templates/ # Template files
Core Concepts
Component Discovery
| Directory | Pattern | Discovery |
|---|---|---|
skills/ | *.md | Auto-discovered by Claude Code |
commands/ | *.md | Registered as /command-name |
hooks/ | *.json | Event listeners registered |
assets/ | Any | Referenced by skills/commands |
Plugin Manifest
{ "name": "code-quality-suite", "version": "1.0.0", "description": "Comprehensive code quality tools", "author": "Developer", "repository": "https://github.com/user/code-quality-suite", "license": "MIT", "claude_version": ">=1.0.0", "skills": ["skills/*.md"], "commands": ["commands/*.md"], "hooks": ["hooks/*.json"], "dependencies": { "eslint": ">=8.0.0" }, "settings": { "strictness": { "type": "string", "default": "standard", "enum": ["relaxed", "standard", "strict"] } } }
Component File Formats
# skills/code-review.md --- description: Perform a thorough code review triggers: - "review code" - "code review" - "review my changes" --- Perform a comprehensive code review: 1. Check for bugs and logic errors 2. Evaluate code style and readability 3. Identify security vulnerabilities 4. Suggest improvements # commands/deploy.md --- description: Deploy application to the specified environment arguments: - name: environment description: Target environment required: true default: staging --- Deploy to $ARGUMENTS.environment: 1. Run test suite 2. Build production bundle 3. Deploy to $ARGUMENTS.environment 4. Verify health check
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | ā | Plugin identifier (required, kebab-case) |
version | string | ā | Semantic version (required) |
description | string | ā | Short description |
claude_version | string | "*" | Required Claude Code version |
skills | array | ["skills/*.md"] | Skill file glob patterns |
commands | array | ["commands/*.md"] | Command file glob patterns |
hooks | array | ["hooks/*.json"] | Hook config glob patterns |
dependencies | object | {} | Required system tools |
settings | object | {} | Plugin settings schema |
Best Practices
-
Follow the standard directory layout exactly ā Claude Code uses convention over configuration for component discovery; non-standard layouts prevent automatic loading.
-
Use kebab-case for plugin and file names ā
code-quality-suite, notcodeQualitySuite; kebab-case is the convention for plugin identifiers and file names. -
Keep the manifest minimal ā only declare what your plugin actually provides; empty arrays for unused component types are cleaner than placeholder files.
-
Include a README.md with installation and usage ā document how to install the plugin, what skills/commands it provides, and how to configure settings.
-
Test component discovery after changes ā after adding or renaming files, verify the plugin loads correctly by running
claude plugin listand testing each skill/command.
Common Issues
Plugin not recognized after installation ā The plugin.json manifest is missing or has invalid JSON. Validate the JSON syntax and ensure the name field is present.
Skills not appearing in Claude Code ā Check that skill files match the glob pattern in plugin.json. The default skills/*.md only matches files directly in the skills/ directory, not subdirectories.
Command arguments not substituted ā Argument names in the frontmatter must match the $ARGUMENTS.name placeholders in the command body exactly (case-sensitive).
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.