plugin-structure

Scaffold Claude Code plugin architectures with .claude-plugin/plugin.json manifests.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/dobrinz123/claude-skills-share --skill plugin-structure-dobrinz123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/dobrinz123/claude-skills-share/tree/main/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/dobrinz123/claude-skills-share --skill plugin-structure-dobrinz123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables developers to consistently create, organize, and validate Claude Code plugins so components load reliably and plugins remain portable and maintainable across environments.

Core Features & Use Cases

  • Manifest rules & validation: Clear requirements for .claude-plugin/plugin.json placement, required fields, semantic versioning, and path resolution to avoid discovery errors.
  • Component organization: Conventions and patterns for commands, agents, skills, hooks, MCP servers, and shared libraries to scale from minimal prototypes to enterprise plugins.
  • Portable path usage: Guidance on using ${CLAUDE_PLUGIN_ROOT} and ./ relative paths to ensure scripts, hooks, and MCP servers work across installs and OSes.
  • Examples & troubleshooting: Real-world plugin examples (minimal, standard, advanced), best practices, and common troubleshooting steps for discovery and path issues.

Quick Start

Scaffold a Claude Code plugin named my-plugin with a .claude-plugin/plugin.json, commands/, agents/, skills/ (each skill with SKILL.md), and use ${CLAUDE_PLUGIN_ROOT} for all 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 structure a Claude Code plugin directory to ensure components load reliably?

Claude Code plugin directory structure requires placing the manifest in .claude-plugin/plugin.json and organizing components into commands/, agents/, and skills/ directories, with each skill containing a SKILL.md file for reliable auto-discovery and loading.

What goes into the plugin.json manifest for a Claude Code plugin?

The plugin.json manifest requires specific fields for semantic versioning and path resolution, placed strictly in the .claude-plugin/ directory to avoid auto-discovery errors during plugin development and publishing workflows.

Why are my Claude Code plugin scripts and hooks failing to resolve paths across environments?

Path resolution failures occur when scripts and hooks use absolute paths; using ${CLAUDE_PLUGIN_ROOT} and ./ relative paths ensures portable references that work across different installs and operating systems.

Can I integrate MCP servers into my Claude Code plugin development workflow?

MCP server integration is supported during Claude Code plugin development and publishing workflows, allowing you to organize and scaffold servers alongside commands, agents, skills, and hooks within the plugin architecture.

What is the best way to scale a Claude Code plugin from a minimal prototype to enterprise use?

Scaling a Claude Code plugin involves following component organization conventions for commands, agents, skills, hooks, and shared libraries, supported by real-world examples and best practices for maintaining portable directory layouts.

Why does my Claude Code plugin fail auto-discovery even with a valid manifest?

Auto-discovery fails when the plugin.json manifest is misplaced outside the .claude-plugin/ directory or when path resolution lacks $CLAUDE_PLUGIN_ROOT and ./ relative paths, causing component loading errors across environments.