plugin-structure

Explain Claude Code plugin architecture, directory layout, and plugin.json configuration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a comprehensive guide to building and organizing Claude Code plugins, ensuring efficient development and seamless integration.

Core Features & Use Cases

  • Plugin Architecture: Understand directory layout, manifest configuration, and component organization.
  • Auto-Discovery: Learn how Claude Code automatically finds and loads plugin components.
  • Portable Paths: Master the use of ${CLAUDE_PLUGIN_ROOT} for robust plugin development.
  • Use Case: When starting a new plugin project, use this Skill to set up the correct directory structure, configure plugin.json, and understand how to organize commands, agents, and skills.

Quick Start

Use the plugin-structure skill to understand the basic directory layout for a new Claude Code plugin.

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 layout?

The plugin.json manifest is the configuration file that defines your Claude Code plugin's metadata, entry points, and component organization, enabling the system to correctly identify and load the plugin during runtime initialization.

How does auto-discovery work for Claude Code plugin components?

Auto-discovery works by automatically finding and loading plugin components placed in the designated directory layout, allowing Claude Code to seamlessly integrate commands, agents, skills, and hooks without requiring manual configuration entries for each file.

What is the best way to use portable paths in Claude Code plugin development?

The best way to achieve portable paths is using the ${CLAUDE_PLUGIN_ROOT} environment variable, which dynamically resolves the plugin's root directory and ensures your file references remain robust across different installation environments.

Can I organize multiple agent and skill components within a single Claude Code plugin?

Yes, you can organize multiple components within a single Claude Code plugin by following the specified directory layout and file naming conventions, allowing the architecture to support granular organization of commands, agents, and skills together.

Why are my Claude Code plugin components not loading correctly?

Plugin components may not load correctly if the directory structure violates the expected layout, the plugin.json manifest is misconfigured, or file naming conventions do not match the patterns required by the auto-discovery mechanism.