plugin-structure

Scaffold Claude Code plugins with manifest configuration and directory layout.

1.0k|91|Updated Jul 9, 2025
One-click install
npx skills add https://github.com/fcakyon/claude-codex-settings --skill plugin-structure-fcakyon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/fcakyon/claude-codex-settings/tree/main/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/fcakyon/claude-codex-settings --skill plugin-structure-fcakyon

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Developing well-organized, maintainable Claude Code plugins can be complex without clear guidance. This Skill demystifies plugin architecture, helping you build robust and scalable plugins efficiently, saving development time and reducing errors.

Core Features & Use Cases

  • Standardized Plugin Layout: Understand the conventional directory structure for automatic component discovery.
  • Manifest Configuration: Learn to configure plugin.json for metadata, custom paths, and component loading.
  • Component Organization: Master best practices for organizing commands, agents, skills, and hooks for clarity and scalability.
  • Portable Path References: Utilize ${CLAUDE_PLUGIN_ROOT} for cross-platform compatibility, ensuring your plugin works everywhere.
  • Use Case: Scaffold a new plugin, organize existing components, or troubleshoot why a plugin isn't loading correctly, all with expert guidance.

Quick Start

Explain the core directory structure for a new Claude Code plugin and how to configure its plugin.json manifest.

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 the correct directory layout?

Claude Code plugins require a standardized directory structure with plugin.json in a .claude-plugin directory at the root. This layout enables auto-discovery of components like commands, agents, skills, and hooks organized in their respective subdirectories using kebab-case naming conventions.

What should I include in my plugin.json manifest file?

The plugin.json manifest specifies metadata, component loading paths, and configuration for your plugin. It defines which directories Claude Code scans for components and supports custom path definitions, allowing you to organize commands, agents, skills, and hooks according to your project structure.

How do I organize commands, agents, skills, and hooks in my plugin?

Organize each component type in separate directories following kebab-case naming. Each component file requires YAML frontmatter for metadata. This structure ensures clarity, scalability, and enables Claude Code's parallel loading from both default and custom paths specified in plugin.json.

Why isn't my plugin loading components automatically?

Plugin auto-discovery requires plugin.json in .claude-plugin and components in correctly named directories with YAML frontmatter. Verify kebab-case directory names, proper manifest configuration, and that component files include required metadata. Use ${CLAUDE_PLUGIN_ROOT} for portable path references.

How do I ensure my plugin works across different platforms and systems?

Use ${CLAUDE_PLUGIN_ROOT} variable for all file path references instead of hardcoded absolute paths. This portable reference syntax ensures your plugin functions consistently across Windows, macOS, and Linux environments without modification.

What naming conventions should I follow when building a Claude Code plugin?

Use kebab-case for all directory names and component files within your plugin. Include YAML frontmatter in each component for metadata. Keep plugin.json at the root inside .claude-plugin. These conventions enable reliable auto-discovery and maintainable plugin structure.