plugin-structure

Guides creation of Claude Code plugins with manifests, components, and portable path references.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/TvanRijn11/darts-hype-scoreboard --skill plugin-structure-tvanrijn11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/TvanRijn11/darts-hype-scoreboard/tree/main/.agents/skills/plugin-structure
Command: npx skills add https://github.com/TvanRijn11/darts-hype-scoreboard --skill plugin-structure-tvanrijn11

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a Claude Code plugin requires knowing the exact directory layout, manifest fields, and auto-discovery rules, and getting any of these wrong causes components to silently fail to load. ## Core Features & Use Cases - Plugin Architecture Guidance: Explains the required .claude-plugin/plugin.json manifest, component directories (commands, agents, skills, hooks), and MCP server configuration. - Path Portability Rules: Documents how to use ${CLAUDE_PLUGIN_ROOT} so plugins work regardless of install location or operating system. - References and Examples: Ships detailed manifest and component-pattern references plus minimal, standard, and advanced complete plugin examples. - Use Case: When you ask Claude to scaffold a new plugin with commands, an agent, and a validation hook, this Skill loads the structural rules so the generated plugin is discovered and loads correctly on the first try. ## Quick Start Ask Claude to create a new Claude Code plugin with a command, an agent, and a hook, and this Skill will provide the correct structure and manifest.

Frequently Asked Questions about plugin-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Claude Code plugin?

Create a directory containing `.claude-plugin/plugin.json` with at least a `name` field in kebab-case, then add component directories like `commands/`, `agents/`, or `skills/` at the plugin root. Claude Code auto-discovers all `.md` files in these directories when the plugin is enabled.

What fields are required in plugin.json?

Only the `name` field is required, in kebab-case format. Recommended fields include `version` (semantic versioning), `description`, `author`, `homepage`, `repository`, `license`, and `keywords` for discovery and distribution.

Why is my Claude Code plugin command not loading?

Common causes include placing component directories inside `.claude-plugin/` instead of the plugin root, missing or malformed YAML frontmatter, or a skill lacking a `SKILL.md` file. Verify the plugin is enabled and restart Claude Code to reload configuration.

How do I reference plugin files without hardcoding paths?

Use the `${CLAUDE_PLUGIN_ROOT}` environment variable for all intra-plugin paths in hooks, MCP server configs, and scripts. Never use absolute paths, home directory shortcuts, or working-directory-relative paths, since install locations vary by system.

Can a plugin use custom directories for commands and agents?

Yes, the `commands` and `agents` fields in plugin.json accept relative paths starting with `./`, as strings or arrays. Custom paths supplement rather than replace the default directories, so components in both locations are loaded.