plugin-structure

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

2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/ghoshsam/claude-code-skills --skill plugin-structure-ghoshsam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/ghoshsam/claude-code-skills/tree/main/skills/plugin-dev/plugin-structure
Command: npx skills add https://github.com/ghoshsam/claude-code-skills --skill plugin-structure-ghoshsam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Claude Code plugin requires knowing the exact directory layout, manifest fields, naming conventions, and auto-discovery rules. This Skill provides that structural knowledge so plugins load correctly on the first attempt instead of failing silently due to misplaced files or malformed plugin.json configuration. ## Core Features & Use Cases - Directory Layout Guidance: Defines the standard plugin structure with .claude-plugin/plugin.json, commands/, agents/, skills/, hooks/, and .mcp.json at the correct locations. - Manifest Configuration: Documents required and recommended plugin.json fields, custom component paths, and semantic versioning conventions. - Portable Path References: Explains how to use ${CLAUDE_PLUGIN_ROOT} in hooks, MCP servers, and scripts so plugins work across installation methods and operating systems. - Use Case: When scaffolding a new plugin with slash commands, a subagent, and a PreToolUse hook, use this Skill to place each component in the right directory, write a valid manifest, and wire hook scripts with portable paths. ## Quick Start Ask the AI to scaffold a new Claude Code plugin with a command, an agent, and a hook following the standard plugin structure.

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 with a .claude-plugin/plugin.json manifest containing at least a name field, then add component directories like commands/, agents/, or skills/ at the plugin root. Claude Code auto-discovers components from these conventional locations when the plugin is enabled.

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

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

What is ${CLAUDE_PLUGIN_ROOT} and when should I use it?

${CLAUDE_PLUGIN_ROOT} is an environment variable resolving to the plugin's install location. Use it for all intra-plugin path references in hooks, MCP server configs, and scripts, since plugins install in different locations depending on method and operating system.

Why is my Claude Code plugin command not loading?

Common causes include placing files in the wrong directory, malformed YAML frontmatter, or naming a skill file something other than SKILL.md. Verify components sit at plugin root, use kebab-case .md filenames, and confirm the plugin is enabled.

Can I use custom directories for plugin components?

Yes, plugin.json supports custom paths for commands, agents, hooks, and MCP servers using relative paths starting with ./. Custom paths supplement rather than replace the default auto-discovered directories, so both locations load.