plugin-structure

Explain Claude Code plugin directory structure and manifest configuration.

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

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 the Claude Code plugin architecture, helping users create well-organized and maintainable plugins that integrate seamlessly with Claude Code.

Core Features & Use Cases

  • Plugin Directory Structure: Detailed overview of the standard directory layout and organization for Claude Code plugins.
  • Manifest Configuration: Explanation of the plugin.json manifest file and its essential fields.
  • Component Organization: Guidance on organizing commands, agents, skills, and hooks.
  • Auto-Discovery Mechanism: Insight into how Claude Code automatically discovers and loads components.
  • Best Practices: Recommendations for organizing and maintaining plugins, including naming conventions, portability, and maintenance strategies.
  • Common Patterns: Examples of minimal, standard, and advanced plugin structures, including MCP server integration and shared libraries.
  • Troubleshooting: Common issues and their solutions for plugin development.
  • Use Case: Ideal for developers looking to create or understand Claude Code plugins, or for those who need to troubleshoot plugin-related issues.

Quick Start

Use the plugin-structure skill to get an overview of the Claude Code plugin directory structure and best practices.

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 directory?

The standard Claude Code plugin directory organizes scripts, references, and assets into a standardized layout, enabling seamless component loading. Proper structure ensures maintainability and allows the auto-discovery mechanism to function correctly.

What is the plugin.json manifest configuration used for?

The `plugin.json` manifest configuration defines essential metadata and fields for Claude Code plugins. It dictates how commands, agents, skills, and hooks are organized and discovered by the system.

How does auto-discovery work for Claude Code plugin components?

Auto-discovery automatically detects and loads plugin components like commands, agents, and hooks by scanning the standard directory structure. This mechanism simplifies integration by requiring no manual component registration.

What are the best practices for Claude Code plugin development?

Claude Code plugin development best practices include following naming conventions, ensuring portability across environments, organizing components logically, and implementing maintenance strategies. These practices ensure long-term stability.

Can I integrate MCP servers into advanced plugin structures?

Advanced plugin structures support MCP server integration and shared libraries. This allows developers to build complex, interconnected components that extend standard plugin functionality.

Why is my Claude Code plugin not loading components correctly?

Plugin components fail to load due to incorrect manifest configuration, improper directory structure, or naming convention violations. Troubleshooting involves verifying auto-discovery paths and standard layout compliance.