Plugin Structure

Guide Claude Code plugin architecture, directory layout, and component organization.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/opensesh/BOS-2.0 --skill plugin-structure-opensesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Plugin Structure
Source: https://github.com/opensesh/BOS-2.0/tree/main/.claude/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/opensesh/BOS-2.0 --skill plugin-structure-opensesh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance on building and organizing Claude Code plugins, ensuring they are discoverable, maintainable, and follow best practices.

Core Features & Use Cases

  • Directory Structure: Understand the conventional layout for automatic discovery.
  • Manifest Configuration: Learn to configure plugin.json for metadata and component paths.
  • Component Organization: Organize commands, agents, skills, and hooks effectively.
  • Portable Paths: Master the use of ${CLAUDE_PLUGIN_ROOT} for robust path referencing.
  • Use Case: When starting a new plugin, use this Skill to scaffold the project correctly, define the manifest, and organize components for scalability.

Quick Start

Use the plugin structure skill to understand how to organize components within a new plugin.

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 automatic component discovery?

Configuring the plugin manifest in `plugin.json` involves defining metadata and specifying explicit paths for your commands, agents, skills, and hooks to ensure proper organization and discoverability within the Claude Code environment.

What is the best way to reference paths portably in Claude Code plugin development?

Referencing paths portably in Claude Code plugins requires using the `${CLAUDE_PLUGIN_ROOT}` variable, which creates robust path references that remain stable regardless of where the plugin is installed or moved.

When should I use a manifest file instead of relying on auto-discovery for Claude Code plugins?

You should use a manifest file in Claude Code plugins when you need to define explicit metadata or configure custom component paths that override default auto-discovery mechanisms for more complex organizational structures.

Does Claude Code plugin architecture support organizing commands, agents, and hooks in the same directory?

Claude Code plugin architecture supports organizing commands, agents, skills, and hooks effectively by utilizing a conventional directory layout that separates these components while maintaining structural clarity and discoverability.