Plugin Structure

Organize Claude Code plugin directories, manifests, and components using auto-discovery conventions.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/valeratrades/plugin-dev --skill plugin-structure-valeratrades
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/valeratrades/plugin-dev/tree/main/skills/plugin-structure
Command: npx skills add https://github.com/valeratrades/plugin-dev --skill plugin-structure-valeratrades

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers building Claude Code plugins often struggle with correct directory layout, plugin.json manifest configuration, and component organization, leading to plugins that fail to load or components that are never discovered. ## Core Features & Use Cases - Directory Structure Guidance: Defines the standard plugin layout with .claude-plugin/, commands/, agents/, skills/, and hooks/ directories for automatic component discovery. - Manifest Configuration: Documents every plugin.json field including name, version, author, keywords, and custom component paths with validation rules. - Portable Path References: Explains ${CLAUDE_PLUGIN_ROOT} usage so hooks, MCP servers, and scripts work regardless of installation location. - Use Case: When scaffolding a new plugin with commands, agents, and skills, use this Skill to set up the correct folder hierarchy, write a valid plugin.json manifest, and configure hooks.json so Claude Code auto-discovers every component. ## Quick Start Ask Claude to scaffold a new Claude Code plugin with a command, an agent, and a skill using the correct directory structure and manifest.

Frequently Asked Questions about Plugin Structure

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

FAQPage Schema
How do I structure a Claude Code plugin directory?▼

Place plugin.json inside a .claude-plugin/ directory and put component folders (commands/, agents/, skills/, hooks/) at the plugin root, not nested inside .claude-plugin/. Claude Code auto-discovers .md files in commands/ and agents/, and SKILL.md files in skills/ subdirectories.

What fields are required in plugin.json for Claude Code?▼

Only the name field is required, in kebab-case format. Recommended fields include version (semantic versioning), description, author, homepage, repository, license, and keywords for discovery and distribution.

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

Use ${CLAUDE_PLUGIN_ROOT} in hook commands, MCP server arguments, and script paths instead of hardcoded absolute paths. It resolves to the plugin's install location, keeping the plugin portable across operating systems and installation methods.

Why is my Claude Code plugin component not loading?▼

Components fail to load when files sit in the wrong directory, lack valid YAML frontmatter, or when a skill uses README.md instead of SKILL.md. Verify directories are at plugin root, names use kebab-case, and restart Claude Code to reload configuration.

Can I use custom paths for commands and agents in plugin.json?▼

Yes, the commands and agents fields accept a string or array of relative paths starting with ./. Custom paths supplement the default directories rather than replacing them, so components in both locations load together.