Adds to core.md. A plugin = a directory whose components Claude Code registers: .claude-plugin/plugin.json (manifest β the ONLY thing inside .claude-plugin/) + component dirs at plugin ROOT (skills/, agents/, hooks/, output-styles/, bin/, .mcp.json, .lsp.json).
- Skills:
skills/<name>/SKILL.md(a lone rootSKILL.mdworks for single-skill plugins β set frontmattername, else the install-dir basename becomes the unstable invocation name).commands/is legacy β do not author new ones. - A root
CLAUDE.mdin a plugin is NOT loaded β context ships via skills/agents/hooks only. - A plugin cannot reference files outside its own directory (
../sharednever gets copied into the cache); intra-plugin paths via${CLAUDE_PLUGIN_ROOT}, persistent state via${CLAUDE_PLUGIN_DATA}. - Namespacing:
<plugin>:<component>everywhere; the marketplace entry name (not plugin.json's) wins when they differ.
- Optional entirely; if present,
name(kebab-case) is the only required field. - Useful fields:
displayName,version(setting it PINS updates to version bumps; omitted + git distribution = every commit is a new version),description,author,keywords,dependencies(transitively enabled; disable fails while dependents live),defaultEnabled(marketplace entry's value beats the plugin's),userConfig(enable-time prompts β${user_config.KEY}),channels. - Component path overrides:
commands/agents/outputStylesREPLACE the default scan;skillsADDS to it. Paths relative, start with./, never... - Unrecognized top-level fields are ignored (warnings in validate); WRONG-TYPED fields are hard load errors.
themes/monitorsbelong underexperimental.*(top-level already warns).
- Skills-dir plugin (
~/.claude/skills/<name>/with a manifest β<name>@skills-dir): dev/personal default β in place, no install, global at personal scope. Project scope adds trust gating, per-server MCP approval, and NO monitors. Scaffold:claude plugin init <name>. - Marketplace install:
.claude-plugin/marketplace.jsonin a repo (name, owner, plugins[] with source types github/url/git-subdir/npm;strict:falsemakes the entry the whole definition β a plugin.json that also declares components then HARD-CONFLICTS). Users:marketplace addβplugin install. Copies into the versioned cache. - Official/community submission: validate first; community via the submission form; entries pin to a commit SHA.
claude plugin validate <path> (add --strict in CI): plugin dir β manifest schema/types, component frontmatter parse, hooks.json syntax (malformed hooks.json prevents the ENTIRE plugin from loading); marketplace dir β marketplace.json schema, duplicate names, path traversal, per-entry plugin checks, version mismatch warnings. Also claude plugin details <name> for the token-cost inventory (always-on vs on-invoke) β audit before shipping; /reload-plugins after non-skill component changes.