/plugin-authoring:authoring-pluginsfrom plugin-authoring
Guides developers through creating, structuring, and distributing Claude Code plugins including skills, agents, commands, hooks, and MCP servers.
Ships in plugin-authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A plugin is a Git-packaged collection of skills, agents, commands, hooks, and MCP servers, installed with /plugin. This skill is the decision layer; the bulky how-to lives in reference/, loaded only for the branch you hit.
skills/<name>/SKILL.md plus optional scripts/, reference/, assets/. Lazily loaded. The default surface for new work.agents/<name>.md. Routed to via skill frontmatter (agent) or the Agent tool.commands/*.md. Merged into skills as of Claude Code 2.1.3; prefer skills/.hooks/hooks.json (+ optional hooks/references/). Validate, block, or inject context..mcp.json.Critical: all component directories sit at plugin root, NOT inside .claude-plugin/.
plugin-name/
├── .claude-plugin/plugin.json # required manifest
├── skills/<name>/SKILL.md # + scripts/ reference/ assets/
├── agents/<name>.md
├── hooks/hooks.json # + references/
└── .mcp.json
Skills, agents, and hooks under their standard dirs are auto-discovered -- no manifest entry needed.
Skills load in three levels; this is the whole reason they beat always-on CLAUDE.md content:
name + description. Enough for Claude to know when to reach for the skill.scripts/ run without entering context, reference/ read only when needed, assets/ used in output.Keep SKILL.md lean; push depth into reference/. If a reference exceeds ~10k words, put grep patterns in SKILL.md so Claude can target it.
Two axes: is the value Claude knowing something or doing something, and -- for a task -- does it run in the main agent or a forked subagent? Invocation (model-triggered, /slash, or both) is a separate frontmatter choice layered on top.
skills/<name>/SKILL.md, no fork. Value = Claude knowing something while it works.skills/<activity>/SKILL.md whose body is the workflow; no context: fork. Use when the loop must stay in the main thread -- human-in-the-loop pauses, or orchestration state that belongs in the main context./<activity> command. Use when output would clutter the main context or you want the harness to enforce a restricted toolset.For the full pattern mechanics -- slash commands on tasks, why two entry skills converge on one subagent, the three pieces, invocation paths, anti-patterns, the known $ARGUMENTS runtime bug -- read reference/skill-patterns.md.
Load the file that matches your task:
reference/skill-patterns.md -- the three patterns in depth: slash-on-task, the convergence argument, Piece 1/2/3, how-to-<activity> description openers, invocation paths, UI rendering, anti-patterns, known runtime bug, writing guidelines.reference/frontmatter.md -- SKILL.md frontmatter field table and the two opt-out fields (disable-model-invocation vs user-invocable).reference/agents.md -- agent file structure, voice/tone, the tool-permission catalog, output specs, when-to-ask, naming conventions.reference/hooks.md -- hooks.json shape, exit codes, the SessionStart-with-references pattern, ${CLAUDE_PLUGIN_ROOT}.reference/manifest-and-distribution.md -- plugin.json schema, marketplace.json, best-practices checklists (design, agents, skills, security, workflow).reference/examples.md -- four complete worked plugins: /commit (Type 3, all pieces), /adversarial-implementation (Type 2), security-audit (Type 1), a code-quality hook.plugin.json (see reference/manifest-and-distribution.md), then the component dirs.marketplace.json and the README plugin table.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xdg/xdg-claude --plugin plugin-authoringOther plugins' skills for the same job