Plugin structure and the manifest
A plugin bundles skills, commands, agents, hooks, and MCP servers into a single installable unit. Components are auto-discovered from standard directories:
my-plugin/ .claude-plugin/ plugin.json # manifest (the only required file) commands/ # slash commands (*.md) skills/ # skills (<name>/SKILL.md) agents/ # subagents (*.md) hooks/ hooks.json # hook configuration .mcp.json # bundled MCP servers scripts/ # hook & utility scripts README.md{ "name": "plugin-dev", "description": "Comprehensive toolkit for developing Claude Code plugins", "version": "0.1.0", "author": { "name": "Patterson Engineering", "email": "eng@example.com" }, "homepage": "https://github.com/example/plugin-dev", "license": "MIT", "keywords": ["plugins", "development", "hooks", "mcp"]}Plugin skills are namespaced (/my-plugin:review) so multiple plugins coexist. In hook commands and MCP configs, always reference files through ${CLAUDE_PLUGIN_ROOT} — the absolute path to the installed plugin — so the plugin works wherever it is installed. Test during development with claude --plugin-dir /path/to/my-plugin.
Check your understanding
Section titled “Check your understanding”Question 1Which file is the only required one in a plugin?
The manifest is required; all component directories are optional and auto-discovered.
Question 2Why use ${CLAUDE_PLUGIN_ROOT} in hook commands?
Hardcoded paths break when the plugin is installed elsewhere.
Question 3How are plugin skills invoked?
Namespacing prevents collisions between plugins.