Plugin Structure

Explain Claude Code plugin directory layout, manifest configuration, and auto-discovery patterns.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/henmessi/plugin-dev --skill plugin-structure-henmessi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/henmessi/plugin-dev/tree/main/skills/plugin-structure
Command: npx skills add https://github.com/henmessi/plugin-dev --skill plugin-structure-henmessi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a comprehensive understanding of Claude Code plugin structure, including directory layout, manifest configuration, and auto-discovery patterns. It helps developers design well-organized plugins that are easier to maintain, extend, and reason about, reducing onboarding time and architectural drift.

Core Features & Use Cases

  • Plugin directory layout overview (root-level components vs. plugin-specific content)
  • Manifest guidance (plugin.json/.claude-plugin) and required fields
  • Component organization patterns (commands, agents, skills, hooks)
  • Auto-discovery mechanisms and portable paths using ${CLAUDE_PLUGIN_ROOT}
  • File naming conventions and best practices
  • Troubleshooting patterns for common plugin-struct issues

Quick Start

Create a new plugin directory (e.g., my-plugin) following the canonical structure:

  • Root: .claude-plugin/plugin.json
  • Core components: commands/, agents/, skills/, hooks/
  • Optional resources: scripts/, references/, assets/ Then implement a minimal SKILL.md for a sample skill to validate discovery and loading.