plugin-structure

Define Claude Code plugin directory layout, manifest configuration, and component discovery rules.

28|5|Updated Jun 24, 2025
One-click install
npx skills add https://github.com/thevibeworks/claude-code-docs --skill plugin-structure-thevibeworks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/thevibeworks/claude-code-docs/tree/main/content/github/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/thevibeworks/claude-code-docs --skill plugin-structure-thevibeworks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Plugin development stalls when directory structure, manifest configuration, and component discovery conventions are unclear, causing components to not load and plugins to be hard to maintain.

Core Features & Use Cases

  • Correct plugin directory layout: Learn the required root structure and how auto-discovery works for commands, agents, skills, hooks, and MCP servers.
  • Accurate plugin.json manifest setup: Configure plugin metadata and optional custom component paths with the correct rules.
  • Portable path handling with ${CLAUDE_PLUGIN_ROOT}: Avoid brittle path bugs across install locations by using the supported variable everywhere it’s required.
  • Predictable naming conventions: Apply kebab-case conventions for directories and files so discovery succeeds reliably.
  • When this matters (example): You want to add a new skill to an existing plugin and ensure Claude Code finds it automatically without manual configuration changes.

Quick Start

Ask to "show me the exact Claude Code plugin folder layout and how to configure .claude-plugin/plugin.json so commands, agents, skills, hooks, and MCP servers auto-discover correctly."

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?

A Claude Code plugin directory requires a specific root layout and a SKILL.md file to enable auto-discovery for commands, agents, skills, hooks, and MCP servers. Directories and files must use kebab-case conventions for reliable component loading.

How do I configure plugin.json for a Claude Code plugin?

Configuring plugin.json involves defining plugin metadata and optional custom component paths in the .claude-plugin directory. Accurate manifest setup ensures Claude Code correctly identifies and loads commands, agents, skills, hooks, and MCP servers.

Why are my Claude Code plugin components not loading?

Plugin components fail to load when directory structure, manifest configuration, or naming conventions are incorrect. Troubleshooting involves verifying kebab-case file names, required SKILL.md presence, and proper auto-discovery rules for each component type.

How do I use ${CLAUDE_PLUGIN_ROOT} for portable plugin paths?

Using the ${CLAUDE_PLUGIN_ROOT} variable ensures portable path handling across different install locations. It prevents brittle path bugs by dynamically resolving the plugin root directory everywhere component paths are required.

Can I add a new skill to an existing Claude Code plugin without manual configuration?

Yes, adding a new skill to an existing plugin directory allows Claude Code to find it automatically. This requires placing the skill in the correct subdirectory and following kebab-case naming conventions to trigger auto-discovery.

Does Claude Code plugin development require MCP integration?

MCP integration is supported through auto-discovery but is not strictly required for all plugins. The plugin architecture allows configuring MCP servers alongside commands, agents, skills, and hooks within the same directory layout.