Plugin Structure

Guides creation of Claude Code plugin directory layouts, manifests, and component organization.

1|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/voxxov222/Claude-code- --skill plugin-structure-voxxov222
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/voxxov222/Claude-code-/tree/main/temp-repo/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/voxxov222/Claude-code- --skill plugin-structure-voxxov222

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a Claude Code plugin requires knowing the exact directory layout, manifest fields, and auto-discovery rules, and getting any of these wrong causes components to silently fail to load. ## Core Features & Use Cases - Directory Structure Guidance: Explains the required .claude-plugin/plugin.json location and root-level component directories for commands, agents, skills, and hooks. - Manifest Configuration: Documents every plugin.json field including name, version, custom component paths, hooks, and MCP server definitions. - Portable Path References: Shows how to use ${CLAUDE_PLUGIN_ROOT} so plugins work regardless of installation location. - Use Case: When you ask to scaffold a new plugin with commands, agents, and hooks, this Skill provides the correct folder layout, a valid manifest, and working examples from minimal to enterprise-grade. ## Quick Start Ask Claude to scaffold a new Claude Code plugin with a command, an agent, and a hooks configuration.

Frequently Asked Questions about Plugin Structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Claude Code plugin?

Create a directory containing `.claude-plugin/plugin.json` with at least a `name` field in kebab-case, then add component directories like `commands/`, `agents/`, or `skills/` at the plugin root. Claude Code auto-discovers all `.md` files in these directories when the plugin is enabled.

Where should plugin.json be located in a Claude Code plugin?

The manifest must be at `.claude-plugin/plugin.json` inside the plugin root. Component directories like commands and agents must sit at the plugin root level, not nested inside `.claude-plugin/`.

How do I reference plugin files with ${CLAUDE_PLUGIN_ROOT}?

Use `${CLAUDE_PLUGIN_ROOT}` in hook commands, MCP server arguments, and script references instead of hardcoded absolute paths. It resolves to the plugin's install location and is available as an environment variable in executed scripts.

Why is my Claude Code plugin command not loading?

Verify the file is a `.md` file in the `commands/` directory at plugin root with valid YAML frontmatter, and confirm the plugin is enabled. Skills require a `SKILL.md` file inside their own subdirectory under `skills/`.

Can I use custom directories for plugin components?

Yes, set the `commands`, `agents`, `hooks`, or `mcpServers` fields in plugin.json with relative paths starting with `./`. Custom paths supplement the default directories rather than replacing them, so components in both locations load.