plugin-structure

Document Claude Code plugin directory layouts, manifests, and auto-discovery rules.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Airmomo/skills --skill plugin-structure-airmomo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/Airmomo/skills/tree/main/plugin-structure
Command: npx skills add https://github.com/Airmomo/skills --skill plugin-structure-airmomo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a standardized blueprint for Claude Code plugins, detailing directory layout, manifest usage, and auto-discovery rules to speed up integration and maintenance.

Core Features & Use Cases

  • Canonical plugin folder layout at the project root (including .claude-plugin, commands/, agents/, skills/, hooks/, and optional MCP settings)
  • Guidance on plugin.json manifest fields, path conventions, and component auto-discovery
  • Clear patterns for organizing components and sharing resources across plugins
  • Practical examples and references to accelerate adoption

Quick Start

Create a root plugin folder with a .claude-plugin/plugin.json and populate the standard directories (commands/, agents/, skills/, hooks/), then enable the plugin in Claude Code.

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

A Claude Code plugin requires a canonical folder layout with a .claude-plugin/plugin.json manifest at the root, alongside standard directories like commands/, agents/, skills/, and hooks/ for component auto-discovery.

What is the required directory layout for Claude Code plugin components?

The canonical Claude Code plugin directory layout includes a root folder with .claude-plugin/, commands/, agents/, skills/, and hooks/ subdirectories, where each skill requires a SKILL.md file at its root for proper component organization.

How does path resolution work for resources in a Claude Code plugin?

Path resolution in Claude Code plugins uses the ${CLAUDE_PLUGIN_ROOT} variable to reliably locate shared resources, references, and optional MCP settings across commands, agents, and hooks within the plugin structure.

Do I need a plugin.json manifest to enable Claude Code plugin auto-discovery?

Yes, the plugin.json manifest inside the .claude-plugin directory is required for auto-discovery, as it defines the manifest fields and path conventions that enable Claude Code to recognize and load plugin components.

What is the best way to organize skills and hooks in a Claude Code plugin?

Organize skills and hooks in Claude Code plugins by placing them in respective skills/ and hooks/ root directories, ensuring each skill contains a SKILL.md file at its root to support proper discovery and management.

Can I share optional resources like references across multiple Claude Code plugins?

Yes, optional resources like references can be shared across Claude Code plugins by leveraging the ${CLAUDE_PLUGIN_ROOT} path convention, allowing components to access shared documentation and optional MCP settings during auto-discovery.