Plugin Structure

Create and organize Claude Code plugin structures with plugin.json manifests.

2|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-config --skill plugin-structure-clay-hhk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/Clay-HHK/claude-config/tree/main/skills/command-name
Command: npx skills add https://github.com/Clay-HHK/claude-config --skill plugin-structure-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reduce confusion and errors when creating Claude Code plugins by providing clear rules for manifest placement, component locations, naming conventions, path resolution, and auto-discovery so plugins load reliably across environments.

Core Features & Use Cases

  • Manifest guidance: Required .claude-plugin/plugin.json location, recommended fields, semantic versioning, and validation rules for reliable plugin registration.
  • Component organization: Conventions for commands, agents, skills, hooks, and MCP servers with examples for flat, categorized, and hierarchical layouts.
  • Path resolution & portability: Rules for using ${CLAUDE_PLUGIN_ROOT}, relative ./ paths, and avoiding absolute paths to ensure cross-platform installs.
  • Auto-discovery and best practices: How Claude Code discovers components, how to structure SKILL.md files, progressive disclosure for references/examples, and troubleshooting steps for common issues.
  • Use case: Plugin authors or teams building reusable plugins for CI/CD, automation, or developer tooling to ensure consistent structure and safe deployment.

Quick Start

Scaffold a new Claude Code plugin with a .claude-plugin/plugin.json and top-level commands/, agents/, skills/, and hooks/ directories using kebab-case names and ${CLAUDE_PLUGIN_ROOT} for internal path references.

Frequently Asked Questions about Plugin Structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Claude Code plugin structure for reliable component discovery?

To scaffold a Claude Code plugin, create a `.claude-plugin/plugin.json` manifest and top-level `commands/`, `agents/`, `skills/`, and `hooks/` directories using kebab-case names to ensure reliable component auto-discovery.

Where should the plugin.json manifest be placed for Claude Code plugin architecture?

The `plugin.json` manifest must be placed inside the `.claude-plugin/` directory at the root of your plugin to ensure reliable plugin registration and component auto-discovery across environments.

How do I resolve paths safely in a Claude Code plugin for cross-platform portability?

For cross-platform portability in Claude Code plugins, use relative `./` paths and the `${CLAUDE_PLUGIN_ROOT}` variable for internal references, strictly avoiding absolute paths to ensure reliable installs.

What are the YAML frontmatter validation rules for Claude Code plugin components?

Claude Code plugin components require proper YAML frontmatter validation in their `SKILL.md` files to enable correct auto-discovery and progressive disclosure of references and examples.

How do I configure MCP servers and hooks in my Claude Code plugin manifest?

You can configure MCP servers and hooks within your Claude Code plugin by defining them in the `plugin.json` manifest and organizing them into flat, categorized, or hierarchical layouts for automation and CI/CD workflows.

Why does my Claude Code plugin fail to load components during auto-discovery?

Plugin component auto-discovery fails when the `.claude-plugin/plugin.json` manifest is misplaced, naming conventions are ignored, or absolute paths are used instead of `${CLAUDE_PLUGIN_ROOT}` and relative `./` paths.