plugin-structure

Explain Claude Code plugin architecture, directory layout, and manifest configuration.

Updated Jan 13, 2025
One-click install
npx skills add https://github.com/phucle297/dotfiles --skill plugin-structure-phucle297
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/phucle297/dotfiles/tree/main/.claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/phucle297/dotfiles --skill plugin-structure-phucle297

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance on Claude Code plugin architecture, directory layout, and best practices, helping developers create well-organized, maintainable plugins that integrate seamlessly with Claude Code.

Core Features & Use Cases

  • Plugin Directory Structure: Detailed explanations of the conventional directory layout for automatic component discovery.
  • Plugin Manifest: In-depth understanding of plugin.json manifest configuration, including required and recommended metadata.
  • Component Organization: Insight into component organization patterns (commands, agents, skills, hooks) and auto-discovery mechanisms.
  • Portability: Guidance on using portable path references with ${CLAUDE_PLUGIN_ROOT} for intra-plugin path references.
  • File Naming Conventions: Best practices for naming components, scripts, and documentation files.
  • Use Case: When creating a new plugin, the Skill walks you through setting up the directory structure, creating the manifest, and organizing your components.

Quick Start

Use the plugin-structure skill to understand how to set up a basic plugin structure with commands, agents, skills, and hooks.

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?

Claude Code plugin structure requires a conventional directory layout for automatic component discovery. You must organize commands, agents, skills, and hooks into specific directories so the framework can automatically detect and load them.

What is the plugin manifest configuration in Claude Code?

The Claude Code plugin manifest is a `plugin.json` file containing required and recommended metadata. It defines core configuration details that allow the framework to properly recognize, load, and manage your plugin components.

How do I use portable path references in Claude Code plugins?

Portable path references in Claude Code plugins use the `${CLAUDE_PLUGIN_ROOT}` variable for intra-plugin path resolution. This ensures your plugin remains maintainable and functional regardless of where it is installed.

What are the best practices for naming files in a Claude Code plugin?

File naming conventions for Claude Code plugins dictate specific best practices for naming components, scripts, and documentation files. Following these standards ensures maintainability and seamless integration with auto-discovery mechanisms.

Do I need prior framework experience to develop Claude Code plugins?

Developing Claude Code plugins requires an existing understanding of the Claude Code framework and plugin development processes. This prerequisite knowledge is necessary to effectively implement directory structures and manifest configurations.

What components are required when building a Claude Code plugin?

Claude Code plugins are built using components like commands, agents, skills, and hooks. Organizing these components correctly within your directory structure enables the framework's auto-discovery mechanisms to function properly.