Plugin Structure

Scaffold Claude Code plugins with standardized directory structures and manifest configuration.

Updated Dec 19, 2025
One-click install
npx skills add https://github.com/ecielam/claude-files --skill plugin-structure-ecielam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/ecielam/claude-files/tree/main/plugins/cache/claude-code-plugins/plugin-dev/0.1.0/skills/plugin-structure
Command: npx skills add https://github.com/ecielam/claude-files --skill plugin-structure-ecielam

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the complexity of plugin setup by providing standardized directory structures and automatic component loading.

Core Features & Use Cases

  • Auto-Discovery Setup: Configure commands, agents, skills, and hooks that load automatically.
  • Use Case: Imagine you need to create a new CI/CD plugin. Use this Skill to automatically scaffold the correct folder hierarchy and manifest configuration.

Quick Start

Create a minimal plugin with a single command by making a directory 'hello-world/' containing '.claude-plugin/plugin.json' and 'commands/hello.md'.

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

Plugin auto-discovery requires a standardized directory structure with a `.claude-plugin/plugin.json` manifest at the root. Configure commands, agents, skills, and hooks in separate subdirectories, and the plugin loader automatically discovers and registers components matching the manifest configuration without manual registration.

What fields do I need in plugin.json to configure component loading?

The plugin.json manifest specifies which component types to load—commands, agents, skills, hooks—and their directory paths. Use the ${CLAUDE_PLUGIN_ROOT} path reference to point to folders relative to your plugin root, enabling the auto-discovery system to scan and load all matching components.

Can I organize multiple commands and agents in a single plugin?

Yes. Organize commands, agents, skills, and hooks in separate subdirectories within your plugin. The manifest references each directory, and auto-discovery loads all components from those paths automatically, supporting anything from minimal single-command plugins to enterprise-grade structures with hundreds of components.

What's the minimal directory layout to create a working plugin?

A minimal plugin needs a directory containing `.claude-plugin/plugin.json` and a `commands/` folder with at least one `.md` command file. This scaffolding satisfies the auto-discovery requirements and produces a working plugin without additional configuration.

How do plugin manifests integrate with MCP servers?

Plugin manifests declare integration points for MCP server components within the plugin structure. The manifest references MCP server configurations and paths, allowing auto-discovery to connect plugin commands, agents, and hooks to MCP resources seamlessly.

What naming conventions should I follow for plugin directories and files?

Use lowercase directory names matching component types—`commands/`, `agents/`, `skills/`, `hooks/`—and name individual component files descriptively with lowercase and hyphens. The auto-discovery system scans these standard locations and registers components by file path and manifest declarations.