plugin-structure

Configure Claude Code plugin directory layouts and plugin.json paths for auto-discovery.

1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Leap0920/Clean-Portfolio --skill plugin-structure-leap0920
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/Leap0920/Clean-Portfolio/tree/main/%25USERPROFILE%25/.openclaude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/Leap0920/Clean-Portfolio --skill plugin-structure-leap0920

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Claude Code plugin authors often get stuck on where files must live, how plugin.json should be shaped, and how commands/agents/skills/hooks are discovered—this skill removes that uncertainty.

Core Features & Use Cases

  • Directory layout guidance: Establishes the exact root and component directory structure for reliable discovery.
  • Manifest and path correctness: Explains required vs. recommended plugin.json fields and how path rules work (including ${CLAUDE_PLUGIN_ROOT} for portability).
  • Component organization patterns: Helps you structure commands, agents, and skills into maintainable conventions for small to enterprise plugins.
  • Troubleshooting: Provides targeted checks for common loading, discovery, and path-resolution failures.

Quick Start

Use this skill when you’re about to scaffold a new plugin and you want to ensure your skills/<skill-name>/SKILL.md and .claude-plugin/plugin.json locations are correct for auto-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?

The required `plugin.json` manifest fields define the plugin's core configuration, while recommended fields provide extra metadata. Path rules require using the portable `${CLAUDE_PLUGIN_ROOT}` variable to ensure reliable location resolution across environments.

Why does my Claude Code plugin fail to load commands and hooks?

Yes, you can organize plugin components for maintainability by applying established directory layout patterns. These conventions scale from small projects to enterprise plugins by structuring commands, agents, and skills into predictable, maintainable directory hierarchies.

What is the correct directory layout for a Claude Code plugin?

Use `${CLAUDE_PLUGIN_ROOT}` in your `plugin.json` manifest to create portable path references. This variable ensures that commands, agents, and hooks resolve correctly regardless of where the plugin is installed, preventing path-resolution failures.

Do I need yml frontmatter for Claude Code plugin skills?

Yes, yml frontmatter is required for Claude Code plugin skills to ensure proper auto-discovery. Adhering to strict frontmatter formats and naming conventions allows the system to correctly wire skills into the plugin architecture.