Plugin Structure

Clarify Claude Code plugin architecture and component organization.

33.3k|3.8k|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/anthropics/claude-plugins-official --skill plugin-structure-anthropics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/anthropics/claude-plugins-official --skill plugin-structure-anthropics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the complex process of building, organizing, and configuring Claude Code plugins, ensuring they are well-structured, maintainable, and integrate seamlessly. It eliminates guesswork in plugin development.

Core Features & Use Cases

  • Standardized Layout: Guides on conventional directory structures for automatic component discovery.
  • Manifest Configuration: Detailed instructions for plugin.json to define metadata and custom paths.
  • Component Organization: Best practices for structuring commands, agents, skills, and hooks.
  • Use Case: When starting a new Claude plugin, use this skill to quickly set up the correct directory structure, configure plugin.json, and understand how to organize commands and agents for optimal performance and maintainability.

Quick Start

Use the Plugin Structure skill to understand how to organize commands and agents in a new Claude plugin.

Frequently Asked Questions about Plugin Structure

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

FAQPage Schema
How do I organize commands and agents in a Claude plugin?

Organize commands and agents using standardized directory structures within your plugin. Place them in default directories or configure custom paths via plugin.json, following kebab-case naming conventions. This structure enables automatic component discovery and maintains plugin maintainability.

What goes in plugin.json and how do I configure it?

plugin.json defines plugin metadata and component paths. Specify manifest configuration, custom directory paths for commands, agents, skills, and hooks, and ensure proper relative path references. This file controls how Claude Code discovers and loads your plugin's components.

What's the correct directory structure for a new Claude plugin?

Use conventional directory layouts for automatic component discovery. Place plugin.json at the root, organize commands, agents, skills, and hooks in default or custom directories using kebab-case names. This standardized approach ensures seamless integration and optimal performance.

How does plugin auto-discovery work for custom components?

Claude Code discovers components from default directories automatically and from custom paths you define in plugin.json. The plugin loader checks relative paths and applies naming conventions to locate and load commands, agents, skills, and hooks without manual registration.

Do I need to follow kebab-case naming for plugin components?

Yes, kebab-case naming is required for plugin components. This naming convention ensures consistent component loading rules and clear organization across default directories and custom paths defined in your manifest.

What's the difference between default and custom component paths?

Default paths use built-in conventions for automatic discovery. Custom paths are explicitly configured in plugin.json to point to alternative locations for commands, agents, skills, and hooks, enabling flexible project layouts while maintaining clear loading rules.