Plugin Structure

Organize Claude Code plugins with canonical directory and manifest structures.

8|1|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/mrclrchtr/skills --skill plugin-structure-mrclrchtr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/mrclrchtr/skills/tree/main/.agents/skills/plugin-structure
Command: npx skills add https://github.com/mrclrchtr/skills --skill plugin-structure-mrclrchtr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Guiding developers to design and organize Claude Code plugins by providing a canonical directory layout, manifest rules, and auto-discovery behavior so teams can scale plugin development with consistency.

Core Features & Use Cases

  • Clear, conventional directory structure: plugin root with .claude-plugin/plugin.json, and separate commands/, agents/, skills/, hooks/ and optional scripts/, references/, assets/ directories.
  • Manifest-driven configuration: central plugin.json in .claude-plugin and optional inline or external wiring for hooks and MCP servers.
  • Component organization and auto-discovery: predictable loading of commands, agents, skills (via SKILL.md), and MCP integrations.
  • Portable path references: use ${CLAUDE_PLUGIN_ROOT} to keep paths environment-agnostic and cross-platform.
  • Real-world templates: pattern examples for minimal, full-featured, and plugin-within-a-plugin structures to speed adoption.

Quick Start

Create a new plugin folder with a .claude-plugin/plugin.json and at least one command under commands/ to begin 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 for auto-discovery?

To structure a Claude Code plugin for auto-discovery, create a root directory containing a .claude-plugin/plugin.json manifest and separate folders for commands/, agents/, skills/, and hooks/. This canonical layout ensures components load predictably.

What is the canonical directory layout for Claude Code plugins?

The canonical directory layout for Claude Code plugins includes a root folder with a .claude-plugin/plugin.json manifest, separate directories for commands/, agents/, skills/, and hooks/, plus optional scripts/, references/, and assets/ folders for organization.

How do I keep plugin paths portable across different environments?

To keep plugin paths portable across different environments, use the ${CLAUDE_PLUGIN_ROOT} variable in your manifest and configuration files. This ensures path references remain environment-agnostic and cross-platform compatible.

Can I configure MCP servers and hooks in plugin.json?

Yes, you can configure MCP servers and hooks in plugin.json. The manifest-driven configuration supports central plugin.json in the .claude-plugin directory with optional inline or external wiring for both hooks and MCP integrations.

What's the best way to scaffold a new Claude Code plugin?

The best way to scaffold a new Claude Code plugin is to create a new folder with a .claude-plugin/plugin.json file and at least one command under the commands/ directory to begin auto-discovery. Use real-world templates for minimal or full-featured structures.