Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Add components to a plugin changedplugins/components

Nearest release: v2.1.323, published 9 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 13 Nov 2026 05:47 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 13 Nov 2026 06:07 UTC.

Upstream edited
Recorded here
Lines+3added
Lines−38removed
From line 1 where the diff opens
First seen 25 Sep 2026 this site's first read of the page
Recorded edits20to this page, all time

### Default settings

The whole hunk

from line 1, old and new numbered
/
lines
from line 1
11# Add components to a plugin
22 
3> Add skills, hooks, MCP servers, and every other component type to a Claude Code plugin, with an example that validates for each.
3> Add skills, hooks, MCP servers, and other component types to a Claude Code plugin, with an example that validates for each.
44 
55A Claude Code plugin is built from components, such as skills, agents, hooks, and MCP servers. Each component has a default folder in the plugin, an optional manifest key in `.claude-plugin/plugin.json` that replaces or adds to that folder, and a name the user sees. For each key's full field table, see the [manifest reference](https://code.claude.com/docs/en/plugins/manifest-reference.md#fields).
66 
from line 18
1818 
1919## Explore the plugin directory
2020 
21The explorer shows an example plugin, `my-plugin`, that has one of every kind of component in its default location:
21The explorer shows an example plugin, `my-plugin`, that has these components in their default locations:
2222 
2323* A review skill and an `about` command
2424* A security-review subagent
from line 27
2727* An output style and a color theme
2828* A route-audit workflow
2929* A `hello-plugin` executable
30* Default settings
3130* A local MCP server and a Go language server
3231 
3332Each file is the smallest valid example of its format, there to show the shape rather than to be useful: a real skill or agent carries full instructions and often supporting files, and a real hook or monitor does real work. The sections after the explorer use the same files as their examples and link to fuller ones. Select a file or folder to read what it's for, see what goes in it, and find the section that covers it.
from line 33
3433 
3534What goes in a plugin
3635 
37This example plugin, `my-plugin`, has one of every kind of component, each in its default location. Select a file or folder to read what it’s for and see what goes in it.
36This example plugin, `my-plugin`, has the components listed here, each in its default location. Select a file or folder to read what it’s for and see what goes in it.
3837 
3938Plugin directory
4039 
from line 173
174173npx prettier --write .
175174```
176175 
177A `settings.json` at the plugin root holds [settings](https://code.claude.com/docs/en/settings-reference.md) that apply while the plugin is enabled, so a plugin can change how the session behaves and not only add components. Only two keys take effect from a plugin, [`agent`](https://code.claude.com/docs/en/settings-reference#agent) and [`subagentStatusLine`](https://code.claude.com/docs/en/settings-reference#subagentstatusline); every other key is dropped. See [Default settings](#default-settings).
178 
179This one sets `agent`, which runs the session's main thread as the plugin's own `security-reviewer` agent, so that agent's system prompt, tool restrictions, and model apply to the whole session:
180 
181```json theme={null}
182{
183 "agent": "security-reviewer"
184}
185```
186 
187176An [MCP server](https://code.claude.com/docs/en/mcp.md) gives Claude tools from an external system. Declare it in `.mcp.json` at the plugin root. This one starts a local server from a script inside the plugin, and appears in `/mcp` as `plugin:my-plugin:db`:
188177 
189178```json theme={null}
from line 468
479468Plugin `bin/` directories come after the user's own `PATH` entries, so a plugin can't shadow `git`, `ls`, or another system command.
480469 
481470claude.ai and Cowork don't install a plugin that has a top-level `bin/` directory, including one you [distribute through claude.ai organization settings](https://claude.com/docs/plugins/org-sync#keep-executables-out-of-the-top-level-bin-directory).
482 
483### Default settings
484 
485To set defaults that apply while the plugin is enabled, add a `settings.json` at the plugin root, or put the same object inline in the `settings` manifest key. Two keys take effect, `agent` and `subagentStatusLine`, and every other key is dropped.
486 
487Set `agent` to run one of the plugin's own agents as the main thread:
488 
489```json settings.json theme={null}
490{
491 "agent": "security-reviewer"
492}
493```
494 
495Load the plugin and start a session. Claude then answers in the main conversation with the `security-reviewer` agent's system prompt and model.
496 
497For everything the key controls, see the [`agent` setting](https://code.claude.com/docs/en/settings-reference#agent).
498 
499When the same key is set in more than one place, these rules decide which value applies:
500 
501* **File over manifest**: when both exist and `settings.json` sets at least one supported key, `settings.json` applies and the manifest's `settings` is ignored
502* **User settings over plugin defaults**: across settings sources, plugin defaults are the lowest layer, so a user's own `agent` in `~/.claude/settings.json` overrides yours
503* **Two plugins set the same key**: the value from the plugin loaded last applies, and `claude --debug` logs `overrides setting`
504 
505For the `subagentStatusLine` shape, see [subagent status lines](https://code.claude.com/docs/en/statusline.md#subagent-status-lines).
506471 
507472### Themes and output styles
508473 
Feedback