plugin-structure

Document Claude Code plugin directory structure and SKILL.md frontmatter requirements.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/cjrfoto/claude-config --skill plugin-structure-cjrfoto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/cjrfoto/claude-config/tree/main/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/cjrfoto/claude-config --skill plugin-structure-cjrfoto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clarifies how Claude Code plugins are structured, including manifest placement, component organization, and auto-discovery rules, to reduce confusion during plugin development and review.

Core Features & Use Cases

  • Directory structure guidance for plugin roots (commands, agents, skills, hooks) and common MPC-related files.
  • Manifest configuration and auto-discovery rules to enable seamless loading in Claude Code.
  • Best practices for portable path references using ${CLAUDE_PLUGIN_ROOT} and consistent file naming.
  • Troubleshooting and maintenance guidance for typical plugin-organization questions.

Quick Start

Create a plugin directory with a .claude-plugin/plugin.json and a skills/your-skill/SKILL.md containing a name and description to enable auto-discovery.

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 for auto-discovery?

To structure a Claude Code plugin, create a root directory with subdirectories for commands, agents, skills, and hooks, plus a .claude-plugin/plugin.json manifest to enable auto-discovery.

What files are required in a Claude Code plugin to enable loading?

Required files for Claude Code plugin loading include a .claude-plugin/plugin.json manifest and a skills/your-skill/SKILL.md file with name and description frontmatter to enable auto-discovery.

How do I use portable path references in Claude Code plugin components?

Use ${CLAUDE_PLUGIN_ROOT} variable in Claude Code plugin components to establish portable path references, ensuring consistent file loading and preventing directory resolution errors across environments.

How does auto-discovery work for Claude Code skills and commands?

Claude Code auto-discovery scans plugin directories for valid SKILL.md files containing required name and description frontmatter, automatically loading compliant skills, commands, and agents.

What optional resources can I include when organizing a Claude Code plugin?

Optional resources for Claude Code plugin organization include scripts, references, and assets folders, which supplement the core commands, agents, skills, hooks, and MCP configuration files.

Why is my Claude Code plugin not loading or being discovered properly?

Claude Code plugin loading fails when the directory lacks a valid .claude-plugin/plugin.json manifest, or when SKILL.md files omit required name and description frontmatter needed for auto-discovery.