Sign in
Explore
Skills · SkillEveryday codingReviewed

plugin-structure

Explains the standard plugin directory layout, plugin.json, and automatic discovery of commands, agents, skills and hooks.

Kind
Skill
Works with
Claude Code
Source
anthropics/claude-plugins-official @ 58267944f921
Path
plugins/plugin-dev/skills/plugin-structure/SKILL.md
License
Apache-2.0
Jobs
Documentation
InstallInstall it from a plugin marketplace.
/plugin install plugin-dev@claude-plugins-official
# Plugin Structure for Claude Code

## Overview

Claude Code plugins follow a standardized directory structure with automatic component discovery. Understanding this structure enables creating well-organized, maintainable plugins that integrate seamlessly with Claude Code.

**Key concepts:**
- Conventional directory layout for automatic discovery
- Manifest-driven configuration in `.claude-plugin/plugin.json`
- Component-based organization (commands, agents, skills, hooks)
- Portable path references using `${CLAUDE_PLUGIN_ROOT}`
- Explicit vs. auto-discovered component loading

## Directory Structure

Every Claude Code plugin follows this organizational pattern:

```
plugin-name/
├── .claude-plugin/
│   └── plugin.json          # Required: Plugin manifest
├── commands/                 # Slash commands (.md files)
├── agents/                   # Subagent definitions (.md files)
├── skills/                   # Agent skills (subdirectories)
│   └── skill-name/
│       └── SKILL.md         # Required for each skill
├── hooks/
│   └── hooks.json           # Event handler configuration
├── .mcp.json                # MCP server definitions
…