Plugin Structure

Installation
Summary

Standardized directory structure and manifest configuration for Claude Code plugins with automatic component discovery.

  • Follows conventional layout with .claude-plugin/plugin.json manifest, plus root-level commands/, agents/, skills/, and hooks/ directories for auto-discovery
  • Components load automatically: commands and agents as .md files, skills as subdirectories containing SKILL.md, hooks via JSON configuration
  • Use ${CLAUDE_PLUGIN_ROOT} environment variable for all intra-plugin path references to ensure portability across installation methods and operating systems
  • Supports custom component paths in manifest that supplement (not replace) default directories, plus optional MCP server definitions and event-driven hooks for PreToolUse, PostToolUse, SessionStart, and other lifecycle events
  • Kebab-case naming convention for all directories and files; minimal manifest keeps only required name field, with optional metadata like version, author, and keywords
SKILL.md

Plugin Structure for Claude Code

Overview

Claude Code plugins follow a standardized directory structure with automatic component discovery. Understanding this structure enables creating well-organized, maintainable plugins that integrate seamlessly with Claude Code.

Key concepts:

  • Conventional directory layout for automatic discovery
  • Manifest-driven configuration in .claude-plugin/plugin.json
  • Component-based organization (commands, agents, skills, hooks)
  • Portable path references using ${CLAUDE_PLUGIN_ROOT}
  • Explicit vs. auto-discovered component loading

Directory Structure

Every Claude Code plugin follows this organizational pattern:

plugin-name/
Related skills

More from anthropics/claude-code

Installs
GitHub Stars
122.7K
First Seen