6 6
7> Add panes, commands, and tool call rules to Claude Code with a mod. See what a mod can do, how to make or install one, and where mods run.7> Add panes, commands, and tool call rules to Claude Code with a mod. See what a mod can do, how to make or install one, and where mods run.
8 8
9A mod is a [plugin](/docs/en/plugins/overview.md) that changes how Claude Code looks and behaves. It's made of JavaScript or TypeScript event handlers: Claude Code calls one when an event happens, such as a tool call, a submitted prompt, or a part of the interface being drawn, and the handler can watch the event, change it, or take it over. Use a mod to add a feature of your own to Claude Code, such as a pane that charts how full your context is after each request. For the files in a mod and a complete example, see [How a mod works](#how-a-mod-works).9A mod is a [plugin](https://code.claude.com/docs/en/plugins/overview.md) that changes how Claude Code looks and behaves. It's made of JavaScript or TypeScript event handlers: Claude Code calls one when an event happens, such as a tool call, a submitted prompt, or a part of the interface being drawn, and the handler can watch the event, change it, or take it over. Use a mod to add a feature of your own to Claude Code, such as a pane that charts how full your context is after each request. For the files in a mod and a complete example, see [How a mod works](#how-a-mod-works).
10 10
11> [!NOTE]11> [!NOTE]
12>12>
13> Claude Code's existing [hooks](/docs/en/hooks.md) also run on events, as a shell command, HTTP request, or prompt you configure in a settings file. A mod's handlers are functions that run inside Claude Code instead. Claude Code calls both kinds hooks: on these pages, "hook" means a mod's handler, and the settings-file kind is a "settings hook".13> Claude Code's existing [hooks](https://code.claude.com/docs/en/hooks.md) also run on events, as a shell command, HTTP request, or prompt you configure in a settings file. A mod's handlers are functions that run inside Claude Code instead. Claude Code calls both kinds hooks: on these pages, "hook" means a mod's handler, and the settings-file kind is a "settings hook".
14 14
15## What a mod can do15## What a mod can do
16 16
17Settings hooks, skills, status lines, and MCP servers work from outside Claude Code: each one runs a script, or gives Claude text or tools. A mod runs inside Claude Code, so it can do things they can't:17Settings hooks, skills, status lines, and MCP servers work from outside Claude Code: each one runs a script, or gives Claude text or tools. A mod runs inside Claude Code, so it can do things they can't:
18 18
19* **Draw an interface you can use**: a pane beside the transcript or a band above the prompt, with tabs, buttons, and text fields. See [Draw in the interface](/docs/en/plugins/mods/interface.md).19* **Draw an interface you can use**: a pane beside the transcript or a band above the prompt, with tabs, buttons, and text fields. See [Draw in the interface](https://code.claude.com/docs/en/plugins/mods/interface.md).
20* **Redraw Claude Code's own interface**: replace or restyle parts Claude Code draws itself, such as a tool call's row, the spinner, or the dialog Claude asks questions in. See [Change what Claude Code already draws](/docs/en/plugins/mods/interface.md#change-what-claude-code-already-draws).20* **Redraw Claude Code's own interface**: replace or restyle parts Claude Code draws itself, such as a tool call's row, the spinner, or the dialog Claude asks questions in. See [Change what Claude Code already draws](https://code.claude.com/docs/en/plugins/mods/interface.md#change-what-claude-code-already-draws).
21* **Step into a tool call or a request**: for example, hold a tool call while you ask the user a question, answer it without running the tool, or send one request to a different model. See [Guard or change a tool call](/docs/en/plugins/mods/events.md#guard-or-change-a-tool-call) and [Follow a turn](/docs/en/plugins/mods/events.md#follow-a-turn).21* **Step into a tool call or a request**: for example, hold a tool call while you ask the user a question, answer it without running the tool, or send one request to a different model. See [Guard or change a tool call](https://code.claude.com/docs/en/plugins/mods/events.md#guard-or-change-a-tool-call) and [Follow a turn](https://code.claude.com/docs/en/plugins/mods/events.md#follow-a-turn).
22* **Run your own code on a command**: a `/command` that runs your function at once, with no Claude turn, even while Claude is working. See [Add a command or a tool](/docs/en/plugins/mods/api.md#add-a-command-or-a-tool).22* **Run your own code on a command**: a `/command` that runs your function at once, with no Claude turn, even while Claude is working. See [Add a command or a tool](https://code.claude.com/docs/en/plugins/mods/api.md#add-a-command-or-a-tool).
23* **Share data between hooks**: a mod's hooks share the variables in its file, so what one hook records, another can show. For example, one hook can count tool calls while another shows the count beside the spinner, or one can read each request's token usage while another charts it in a pane. See [React to events](/docs/en/plugins/mods/events.md).23* **Share data between hooks**: a mod's hooks share the variables in its file, so what one hook records, another can show. For example, one hook can count tool calls while another shows the count beside the spinner, or one can read each request's token usage while another charts it in a pane. See [React to events](https://code.claude.com/docs/en/plugins/mods/events.md).
24 24
25Mods work in the Claude Code CLI, the Code tab of the Claude Desktop app, and the VS Code extension. See [Where mods run](#where-mods-run) for how they behave elsewhere, such as in `claude -p` and cloud sessions. If a settings hook, a skill, or an MCP server already does what you need, [compare them](#compare-mods-settings-hooks-skills-and-mcp-servers) before you write a mod. To manage mods for an organization, see [Manage mods for your organization](/docs/en/plugins/mods/admin.md).25Mods work in the Claude Code CLI, the Code tab of the Claude Desktop app, and the VS Code extension. See [Where mods run](#where-mods-run) for how they behave elsewhere, such as in `claude -p` and cloud sessions. If a settings hook, a skill, or an MCP server already does what you need, [compare them](#compare-mods-settings-hooks-skills-and-mcp-servers) before you write a mod. To manage mods for an organization, see [Manage mods for your organization](https://code.claude.com/docs/en/plugins/mods/admin.md).
26 26
27## Get a mod27## Get a mod
28 28
29To start with a mod:29To start with a mod:
30 30
31* **Use one you already have**: some of Claude Code's own features are mods, such as `/diff`. See [Mods built into Claude Code](#mods-built-into-claude-code).31* **Use one you already have**: some of Claude Code's own features are mods, such as `/diff`. See [Mods built into Claude Code](#mods-built-into-claude-code).
32* **Make one**: describe what you want in a Claude Code session, and Claude writes the mod. See [Ask Claude for a mod](/docs/en/plugins/mods/create.md#ask-claude-for-a-mod). To learn how a mod's code works, [write one yourself](/docs/en/plugins/mods/create.md#write-a-mod-yourself).32* **Make one**: describe what you want in a Claude Code session, and Claude writes the mod. See [Ask Claude for a mod](https://code.claude.com/docs/en/plugins/mods/create.md#ask-claude-for-a-mod). To learn how a mod's code works, [write one yourself](https://code.claude.com/docs/en/plugins/mods/create.md#write-a-mod-yourself).
33* **Install one**: see [Install or update a mod](#install-or-update-a-mod), or [try a sample mod](#try-a-sample-mod)33* **Install one**: see [Install or update a mod](#install-or-update-a-mod), or [try a sample mod](#try-a-sample-mod)
34 34
35### Install or update a mod35### Install or update a mod
43* In a Claude Code session, run `/plugin install token-chart@your-org`.43* In a Claude Code session, run `/plugin install token-chart@your-org`.
44* In your shell, run `claude plugin install token-chart@your-org`.44* In your shell, run `claude plugin install token-chart@your-org`.
45 45
46[Install plugins](/docs/en/plugins/install.md) covers marketplaces, scopes, the VS Code extension and the Desktop app, and [keeping plugins updated](/docs/en/plugins/install.md#keep-plugins-updated), all of which apply to a plugin that contains a mod without changes.46[Install plugins](https://code.claude.com/docs/en/plugins/install.md) covers marketplaces, scopes, the VS Code extension and the Desktop app, and [keeping plugins updated](https://code.claude.com/docs/en/plugins/install.md#keep-plugins-updated), all of which apply to a plugin that contains a mod without changes.
47 47
48If you install or update a mod from your shell while a session is open, run `/reload-plugins` in that session to load it. Otherwise it loads the next time you start Claude Code.48If you install or update a mod from your shell while a session is open, run `/reload-plugins` in that session to load it. Otherwise it loads the next time you start Claude Code.
49 49
57 57
58A sample mod runs with your permissions. To see what one does before you load it, [list its hooks and calls](#list-what-a-mod-does-before-you-install-one).58A sample mod runs with your permissions. To see what one does before you load it, [list its hooks and calls](#list-what-a-mod-does-before-you-install-one).
59 59
60To try one, clone the repository and [load the mod's directory for one session](/docs/en/plugins/create.md#load-a-directory-or-archive-for-one-session) with `--plugin-dir`. To confirm the mod loaded, [check which mods the session loaded](#see-which-mods-a-session-loaded).60To try one, clone the repository and [load the mod's directory for one session](https://code.claude.com/docs/en/plugins/create.md#load-a-directory-or-archive-for-one-session) with `--plugin-dir`. To confirm the mod loaded, [check which mods the session loaded](#see-which-mods-a-session-loaded).
61 61
62To keep one, [add the clone's `claude-code/mods` directory as a marketplace](/docs/en/plugins/install#add-a-marketplace), then install the mod from `claude-code-playground-mods`. The marketplace points at your clone, so the mod stops loading if you move or delete it.62To keep one, [add the clone's `claude-code/mods` directory as a marketplace](https://code.claude.com/docs/en/plugins/install#add-a-marketplace), then install the mod from `claude-code-playground-mods`. The marketplace points at your clone, so the mod stops loading if you move or delete it.
63 63
64## Decide whether to trust a mod64## Decide whether to trust a mod
65 65
66A mod is code that runs with your permissions, inside Claude Code. Install mods only from authors and [marketplaces you trust](/docs/en/plugins/security.md).66A mod is code that runs with your permissions, inside Claude Code. Install mods only from authors and [marketplaces you trust](https://code.claude.com/docs/en/plugins/security.md).
67 67
68### What a mod can reach68### What a mod can reach
69 69
76* **Act without asking you**: approve a tool call before you're asked76* **Act without asking you**: approve a tool call before you're asked
77* **Spend your usage**: call a model on your plan or API key77* **Spend your usage**: call a model on your plan or API key
78 78
79Mods aren't sandboxed. If you turn on [sandboxing](/docs/en/sandboxing.md), the sandbox isolates the Bash commands Claude runs, and a process that a mod starts runs outside it.79Mods aren't sandboxed. If you turn on [sandboxing](https://code.claude.com/docs/en/sandboxing.md), the sandbox isolates the Bash commands Claude runs, and a process that a mod starts runs outside it.
80 80
81With [managed settings](/docs/en/settings.md#check-what-your-organization-enforces) or a Team or Enterprise [`/login`](/docs/en/authentication#authentication-precedence) as the session's credential, by default a mod's approval doesn't get a call past your `ask` rules or `PreToolUse` hooks. Without either, a mod can approve a call that an `ask` rule would prompt for, or that your `PreToolUse` hook blocked. To check when a mod can also approve a call that a `deny` rule refuses, see [Extend permissions with hooks](/docs/en/permissions.md#precedence-among-rules-hooks-and-mods).81With [managed settings](https://code.claude.com/docs/en/settings.md#check-what-your-organization-enforces) or a Team or Enterprise [`/login`](https://code.claude.com/docs/en/authentication#authentication-precedence) as the session's credential, by default a mod's approval doesn't get a call past your `ask` rules or `PreToolUse` hooks. Without either, a mod can approve a call that an `ask` rule would prompt for, or that your `PreToolUse` hook blocked. To check when a mod can also approve a call that a `deny` rule refuses, see [Extend permissions with hooks](https://code.claude.com/docs/en/permissions.md#precedence-among-rules-hooks-and-mods).
82 82
83A mod can restyle much of Claude Code's interface, but not the permission prompt. It can't change what a prompt shows you.83A mod can restyle much of Claude Code's interface, but not the permission prompt. It can't change what a prompt shows you.
84 84
90claude plugin validate ./some-mod90claude plugin validate ./some-mod
91```91```
92 92
93The `hooks:` and `calls:` lines in the output list the events the mod handles and what it asks Claude Code to do. [Review what a mod can do](/docs/en/plugins/mods/admin.md#review-what-a-mod-can-do) shows the output and which calls to look for.93The `hooks:` and `calls:` lines in the output list the events the mod handles and what it asks Claude Code to do. [Review what a mod can do](https://code.claude.com/docs/en/plugins/mods/admin.md#review-what-a-mod-can-do) shows the output and which calls to look for.
94 94
95## Turn mods on or off95## Turn mods on or off
96 96
97Mods are on by default. In the terminal, use Claude Code v2.1.287 or later. The Desktop app includes its own copy of Claude Code, and mods work there from v2.1.286. Check the version in the place you use mods:97Mods are on by default. In the terminal, use Claude Code v2.1.287 or later. The Desktop app includes its own copy of Claude Code, and mods work there from v2.1.286. Check the version in the place you use mods:
98 98
99* **Terminal**: in your shell, run `claude --version`. If yours is older, [update Claude Code](/docs/en/setup.md#update-claude-code).99* **Terminal**: in your shell, run `claude --version`. If yours is older, [update Claude Code](https://code.claude.com/docs/en/setup.md#update-claude-code).
100* **Desktop app**: in a local session in the Code tab, enter `/status` and read the **Claude Code** row, which shows a version such as `2.1.286`. If yours is older, [update the Desktop app](/docs/en/desktop.md#claude-code-version-in-the-code-tab).100* **Desktop app**: in a local session in the Code tab, enter `/status` and read the **Claude Code** row, which shows a version such as `2.1.286`. If yours is older, [update the Desktop app](https://code.claude.com/docs/en/desktop.md#claude-code-version-in-the-code-tab).
101 101
102To turn mods off, choose how many to stop, and for how long. To turn them back on, undo the same change:102To turn mods off, choose how many to stop, and for how long. To turn them back on, undo the same change:
103 103
104* **One mod**: disable or uninstall its plugin from the [**Installed** tab in `/plugin`](/docs/en/plugins/install#manage-installed-plugins)104* **One mod**: disable or uninstall its plugin from the [**Installed** tab in `/plugin`](https://code.claude.com/docs/en/plugins/install#manage-installed-plugins)
105* **Every installed mod, for one session**: start Claude Code with [`--safe-mode`](/docs/en/cli-reference#cli-flags), which also disables your other customizations105* **Every installed mod, for one session**: start Claude Code with [`--safe-mode`](https://code.claude.com/docs/en/cli-reference#cli-flags), which also disables your other customizations
106* **Every mod you installed, in every session**: set [`"disableAllHooks": true`](/docs/en/settings-reference#disableallhooks) in `~/.claude/settings.json`. Your settings hooks and custom status line stop too. What your organization manages keeps running.106* **Every mod you installed, in every session**: set [`"disableAllHooks": true`](https://code.claude.com/docs/en/settings-reference#disableallhooks) in `~/.claude/settings.json`. Your settings hooks and custom status line stop too. What your organization manages keeps running.
107 107
108If you use Claude Code through an organization, an administrator can also limit which mods load. Administrators start at [Stop user-installed mods from loading](/docs/en/plugins/mods/admin.md#stop-user-installed-mods-from-loading).108If you use Claude Code through an organization, an administrator can also limit which mods load. Administrators start at [Stop user-installed mods from loading](https://code.claude.com/docs/en/plugins/mods/admin.md#stop-user-installed-mods-from-loading).
109 109
110`disableAllHooks` and your organization's `allowManagedModsOnly` stop a mod and leave the rest of its plugin in place: the plugin stays installed, and its skills, commands, agents, and MCP servers load. Other settings and flags reach further. [`disableAllHooks`](/docs/en/settings-reference#disableallhooks) and [What runs under `allowManagedHooksOnly`](/docs/en/settings-reference#what-runs-under-allowmanagedhooksonly) list what each one does to a plugin and its settings hooks.110`disableAllHooks` and your organization's `allowManagedModsOnly` stop a mod and leave the rest of its plugin in place: the plugin stays installed, and its skills, commands, agents, and MCP servers load. Other settings and flags reach further. [`disableAllHooks`](https://code.claude.com/docs/en/settings-reference#disableallhooks) and [What runs under `allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#what-runs-under-allowmanagedhooksonly) list what each one does to a plugin and its settings hooks.
111 111
112To find out whether mods can load for you, see [Check whether mods can load](/docs/en/plugins/mods/troubleshoot.md#check-whether-mods-can-load).112To find out whether mods can load for you, see [Check whether mods can load](https://code.claude.com/docs/en/plugins/mods/troubleshoot.md#check-whether-mods-can-load).
113 113
114> [!NOTE]114> [!NOTE]
115>115>
117 117
118### See which mods a session loaded118### See which mods a session loaded
119 119
120To see which mods a terminal session loaded, run `/plugin` at the Claude Code prompt. A dim line under the tabs gives the count and the names, such as `1 mod active · first-mod`. If a mod you installed isn't named there, see [Find out why a mod does nothing](/docs/en/plugins/mods/troubleshoot.md#find-out-why-a-mod-does-nothing).120To see which mods a terminal session loaded, run `/plugin` at the Claude Code prompt. A dim line under the tabs gives the count and the names, such as `1 mod active · first-mod`. If a mod you installed isn't named there, see [Find out why a mod does nothing](https://code.claude.com/docs/en/plugins/mods/troubleshoot.md#find-out-why-a-mod-does-nothing).
121 121
122## How a mod works122## How a mod works
123 123
124A mod is a [plugin](/docs/en/plugins/overview.md) whose code registers event handlers, called hooks. Claude Code runs a hook when its event happens, such as when Claude calls a tool or when the spinner is drawn. A small mod has three files:124A mod is a [plugin](https://code.claude.com/docs/en/plugins/overview.md) whose code registers event handlers, called hooks. Claude Code runs a hook when its event happens, such as when Claude calls a tool or when the spinner is drawn. A small mod has three files:
125 125
126```text theme={null}126```text theme={null}
127first-mod/127first-mod/
132 └── register.js132 └── register.js
133```133```
134 134
135* **`plugin.json`**: the plugin's [manifest](/docs/en/plugins/manifest-reference.md)135* **`plugin.json`**: the plugin's [manifest](https://code.claude.com/docs/en/plugins/manifest-reference.md)
136* **`hooks.json`**: [points to your code file](/docs/en/plugins/mods/reference.md#files)136* **`hooks.json`**: [points to your code file](https://code.claude.com/docs/en/plugins/mods/reference.md#files)
137* **`register.js`**: [your code](/docs/en/plugins/mods/create.md#write-a-mod-yourself), called the hooks module. It tells Claude Code which events to run your functions on.137* **`register.js`**: [your code](https://code.claude.com/docs/en/plugins/mods/create.md#write-a-mod-yourself), called the hooks module. It tells Claude Code which events to run your functions on.
138 138
139This is a complete `register.js`. It counts the tool calls Claude makes and shows the count beside the spinner while Claude works, as in `Thinking · tool calls: 3…`.139This is a complete `register.js`. It counts the tool calls Claude makes and shows the count beside the spinner while Claude works, as in `Thinking · tool calls: 3…`.
140 140
163 163
164The file registers two hooks, and both use the `calls` variable at the top:164The file registers two hooks, and both use the `calls` variable at the top:
165 165
166* **The [`tool.call`](/docs/en/plugins/mods/reference#tools) hook** runs each time Claude is about to use a tool. It adds one to `calls`, asks Claude Code to draw the interface again, and lets the tool run as usual.166* **The [`tool.call`](https://code.claude.com/docs/en/plugins/mods/reference#tools) hook** runs each time Claude is about to use a tool. It adds one to `calls`, asks Claude Code to draw the interface again, and lets the tool run as usual.
167* **The [`ui.render`](/docs/en/plugins/mods/reference#interface) hook** runs each time Claude Code draws the spinner. It keeps Claude Code's own spinner and adds the count after the word.167* **The [`ui.render`](https://code.claude.com/docs/en/plugins/mods/reference#interface) hook** runs each time Claude Code draws the spinner. It keeps Claude Code's own spinner and adds the count after the word.
168 168
169This recording shows the mod at work. Watch the spinner line above the prompt box: while Claude lists a directory and reads two files, it reads `Thinking · tool calls: 1…`, then `2…`, then `3…`.169This recording shows the mod at work. Watch the spinner line above the prompt box: while Claude lists a directory and reads two files, it reads `Thinking · tool calls: 1…`, then `2…`, then `3…`.
170 170
180 180
181To do anything outside its own code, such as draw, add a command, call a model, read a file, start a process, or make a network request, a hook calls the mods API. A hook has no other way to do those things, which is why Claude Code can [list what a mod does](#list-what-a-mod-does-before-you-install-one) before you install it.181To do anything outside its own code, such as draw, add a command, call a model, read a file, start a process, or make a network request, a hook calls the mods API. A hook has no other way to do those things, which is why Claude Code can [list what a mod does](#list-what-a-mod-does-before-you-install-one) before you install it.
182 182
183For the code behind each choice, see [React to events](/docs/en/plugins/mods/events.md#how-a-hook-handles-an-event). For what a hook can call, see [Use the mods API](/docs/en/plugins/mods/api.md).183For the code behind each choice, see [React to events](https://code.claude.com/docs/en/plugins/mods/events.md#how-a-hook-handles-an-event). For what a hook can call, see [Use the mods API](https://code.claude.com/docs/en/plugins/mods/api.md).
184 184
185### Where mods run185### Where mods run
186 186
189| Where you run Claude Code | Hooks run | What the mod draws appears |189| Where you run Claude Code | Hooks run | What the mod draws appears |
190| :- | :- | :- |190| :- | :- | :- |
191| `claude` in a terminal, including an editor's integrated terminal and the JetBrains plugin | Yes | Yes |191| `claude` in a terminal, including an editor's integrated terminal and the JetBrains plugin | Yes | Yes |
192| The Code tab of the Desktop app, except in a WSL session | Yes | Yes, except elements the [elements table](/docs/en/plugins/mods/reference.md#elements) marks terminal-only |192| The Code tab of the Desktop app, except in a WSL session | Yes | Yes, except elements the [elements table](https://code.claude.com/docs/en/plugins/mods/reference.md#elements) marks terminal-only |
193| A [WSL session](/docs/en/desktop-wsl.md) in the Desktop app | No, because plugins aren't available in WSL sessions | No |193| A [WSL session](https://code.claude.com/docs/en/desktop-wsl.md) in the Desktop app | No, because plugins aren't available in WSL sessions | No |
194| The VS Code extension's chat panel | Yes | Yes, with extension version 2.1.299 or later. A session that [doesn't fetch feature flags](/docs/en/env-vars.md#features-that-need-feature-flag-fetching), such as one on Amazon Bedrock, needs 2.1.304 or later. The [render sites](/docs/en/plugins/mods/reference.md#render-sites) and [elements](/docs/en/plugins/mods/reference.md#elements) tables mark what the panel draws. |194| The VS Code extension's chat panel | Yes | Yes, with extension version 2.1.299 or later. A session that [doesn't fetch feature flags](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching), such as one on Amazon Bedrock, needs 2.1.304 or later. The [render sites](https://code.claude.com/docs/en/plugins/mods/reference.md#render-sites) and [elements](https://code.claude.com/docs/en/plugins/mods/reference.md#elements) tables mark what the panel draws. |
195| `claude -p` and the [Agent SDK](/docs/en/agent-sdk/overview.md) | Yes | No |195| `claude -p` and the [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) | Yes | No |
196| [Remote Control](/docs/en/remote-control.md) from claude.ai or the mobile app | Yes, in the session on your machine | In the terminal on your machine |196| [Remote Control](https://code.claude.com/docs/en/remote-control.md) from claude.ai or the mobile app | Yes, in the session on your machine | In the terminal on your machine |
197| A [cloud session](/docs/en/claude-code-on-the-web.md) | Yes, for a plugin that [reaches the cloud session](/docs/en/cloud-environments.md#what-carries-over-from-your-setup) | No |197| A [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md) | Yes, for a plugin that [reaches the cloud session](https://code.claude.com/docs/en/cloud-environments.md#what-carries-over-from-your-setup) | No |
198 198
199A mod that draws can check which app it's running in, and fall back to a line in the transcript or a command's text reply where nothing draws.199A mod that draws can check which app it's running in, and fall back to a line in the transcript or a command's text reply where nothing draws.
200 200
201## Control mods for your organization201## Control mods for your organization
202 202
203Administrators decide whether mods run and which ones, through [managed settings](/docs/en/managed-settings.md). [Manage mods for your organization](/docs/en/plugins/mods/admin.md) covers what happens by default, how to review a mod, and how to enforce a policy with a mod of your own.203Administrators decide whether mods run and which ones, through [managed settings](https://code.claude.com/docs/en/managed-settings.md). [Manage mods for your organization](https://code.claude.com/docs/en/plugins/mods/admin.md) covers what happens by default, how to review a mod, and how to enforce a policy with a mod of your own.
204 204
205## Compare mods, settings hooks, skills, and MCP servers205## Compare mods, settings hooks, skills, and MCP servers
206 206
214| What you write | JavaScript or TypeScript | A script and a `settings.json` entry | Markdown | A server in any language |214| What you write | JavaScript or TypeScript | A script and a `settings.json` entry | Markdown | A server in any language |
215| Pick it when | You want a pane, a band above the prompt, a custom command, or to rewrite an event | You want to block, allow, or log an event with a script you already have | You keep pasting the same instructions into chat | Claude needs to reach an external system |215| Pick it when | You want a pane, a band above the prompt, a custom command, or to rewrite an event | You want to block, allow, or log an event with a script you already have | You keep pasting the same instructions into chat | Claude needs to reach an external system |
216 216
217Each of the others has its own page: [Hooks](/docs/en/hooks.md), [Skills](/docs/en/skills.md), and [MCP](/docs/en/mcp.md). A plugin can hold all of them, so a mod can ship in the same plugin as a skill and an MCP server.217Each of the others has its own page: [Hooks](https://code.claude.com/docs/en/hooks.md), [Skills](https://code.claude.com/docs/en/skills.md), and [MCP](https://code.claude.com/docs/en/mcp.md). A plugin can hold all of them, so a mod can ship in the same plugin as a skill and an MCP server.
218 218
219## Mods built into Claude Code219## Mods built into Claude Code
220 220
224 224
225| Name in `/plugin` | What it does | Where it's on | How to turn it off |225| Name in `/plugin` | What it does | Where it's on | How to turn it off |
226| :- | :- | :- | :- |226| :- | :- | :- | :- |
227| `cc-plugin-agents-md` | Loads `AGENTS.md` as project instructions | Every session, apart from [the ones that can't read `AGENTS.md`](/docs/en/memory#when-agents-md-support-is-unavailable) | Disable it in `/plugin`, or [choose which instruction files load](/docs/en/memory.md#choose-which-instruction-files-load) |227| `cc-plugin-agents-md` | Loads `AGENTS.md` as project instructions | Every session, apart from [the ones that can't read `AGENTS.md`](https://code.claude.com/docs/en/memory#when-agents-md-support-is-unavailable) | Disable it in `/plugin`, or [choose which instruction files load](https://code.claude.com/docs/en/memory.md#choose-which-instruction-files-load) |
228| `cc-plugin-diff` | Takes over [`/diff`](/docs/en/interactive-mode#review-changes-with-%2Fdiff) and draws its pane | Interactive terminal sessions | Disable it in `/plugin`. `/diff` stays, and Claude Code's built-in version of the command answers it. |228| `cc-plugin-diff` | Takes over [`/diff`](https://code.claude.com/docs/en/interactive-mode#review-changes-with-%2Fdiff) and draws its pane | Interactive terminal sessions | Disable it in `/plugin`. `/diff` stays, and Claude Code's built-in version of the command answers it. |
229| `cc-plugin-plugin-authoring` | Gives Claude the [`plugin-authoring` skill](/docs/en/plugins/mods/create#ask-claude-for-a-mod) for writing mods. It holds a skill and no mod code. | Unless Anthropic has turned installed mods off remotely | Disable it in `/plugin` |229| `cc-plugin-plugin-authoring` | Gives Claude the [`plugin-authoring` skill](https://code.claude.com/docs/en/plugins/mods/create#ask-claude-for-a-mod) for writing mods. It holds a skill and no mod code. | Unless Anthropic has turned installed mods off remotely | Disable it in `/plugin` |
230| `cc-plugin-sec-default` | Guards what your organization manages from the mods a user installs | [Where the guard loads](/docs/en/plugins/mods/admin.md#know-what-happens-by-default) | You can't. An administrator [sets the order](/docs/en/plugins/mods/admin.md#install-your-organizations-mods) in managed settings |230| `cc-plugin-sec-default` | Guards what your organization manages from the mods a user installs | [Where the guard loads](https://code.claude.com/docs/en/plugins/mods/admin.md#know-what-happens-by-default) | You can't. An administrator [sets the order](https://code.claude.com/docs/en/plugins/mods/admin.md#install-your-organizations-mods) in managed settings |
231| `cc-plugin-telemetry` | Sends the analytics records that Claude Code and its built-in mods log | Wherever Claude Code's own analytics are on | Disable it in `/plugin`, or turn analytics off, for example with [`DISABLE_TELEMETRY`](/docs/en/env-vars) |231| `cc-plugin-telemetry` | Sends the analytics records that Claude Code and its built-in mods log | Wherever Claude Code's own analytics are on | Disable it in `/plugin`, or turn analytics off, for example with [`DISABLE_TELEMETRY`](https://code.claude.com/docs/en/env-vars) |
232| `cc-plugin-you-should-know` | [You should know](/docs/en/interactive-mode.md#you-should-know-suggestions): a side agent shows a note above the prompt when it finds something you might have missed | Off until you [turn it on](/docs/en/interactive-mode.md#you-should-know-suggestions) | Disable it in `/plugin` |232| `cc-plugin-you-should-know` | [You should know](https://code.claude.com/docs/en/interactive-mode.md#you-should-know-suggestions): a side agent shows a note above the prompt when it finds something you might have missed | Off until you [turn it on](https://code.claude.com/docs/en/interactive-mode.md#you-should-know-suggestions) | Disable it in `/plugin` |
233 233
234The settings and flags that stop installed mods, such as `disableAllHooks`, `--bare`, and `--safe-mode`, don't stop built-in mods.234The settings and flags that stop installed mods, such as `disableAllHooks`, `--bare`, and `--safe-mode`, don't stop built-in mods.
235 235
238The source of some of these mods is public in the [`mods` directory of the Claude Code repository](https://github.com/anthropics/claude-code/tree/main/mods). Each one is a complete plugin with its hooks module and tests:238The source of some of these mods is public in the [`mods` directory of the Claude Code repository](https://github.com/anthropics/claude-code/tree/main/mods). Each one is a complete plugin with its hooks module and tests:
239 239
240* [`diff`](https://github.com/anthropics/claude-code/tree/main/mods/diff): the `/diff` pane, with buttons bound to keyboard actions and scrolling the mod handles itself240* [`diff`](https://github.com/anthropics/claude-code/tree/main/mods/diff): the `/diff` pane, with buttons bound to keyboard actions and scrolling the mod handles itself
241* [`agents-md`](https://github.com/anthropics/claude-code/tree/main/mods/agents-md): loads `AGENTS.md` as project instructions, with a [`userConfig`](/docs/en/plugins/components#user-configuration) option241* [`agents-md`](https://github.com/anthropics/claude-code/tree/main/mods/agents-md): loads `AGENTS.md` as project instructions, with a [`userConfig`](https://code.claude.com/docs/en/plugins/components#user-configuration) option
242* [`sec-default`](https://github.com/anthropics/claude-code/tree/main/mods/sec-default): the guard described in [Know what happens by default](/docs/en/plugins/mods/admin.md#know-what-happens-by-default), a model for a mod that enforces policy242* [`sec-default`](https://github.com/anthropics/claude-code/tree/main/mods/sec-default): the guard described in [Know what happens by default](https://code.claude.com/docs/en/plugins/mods/admin.md#know-what-happens-by-default), a model for a mod that enforces policy
243* [`telemetry`](https://github.com/anthropics/claude-code/tree/main/mods/telemetry): adds methods that other mods can call, and ships their types243* [`telemetry`](https://github.com/anthropics/claude-code/tree/main/mods/telemetry): adds methods that other mods can call, and ships their types
244 244
245## Next steps245## Next steps
246 246
247* [Create a mod](/docs/en/plugins/mods/create.md): build one that counts tool calls, shows the count beside the spinner, and adds a command, and learn the edit and reload loop247* [Create a mod](https://code.claude.com/docs/en/plugins/mods/create.md): build one that counts tool calls, shows the count beside the spinner, and adds a command, and learn the edit and reload loop
248* [Draw in the interface](/docs/en/plugins/mods/interface.md): panes, the band above the prompt, buttons, text fields, and state248* [Draw in the interface](https://code.claude.com/docs/en/plugins/mods/interface.md): panes, the band above the prompt, buttons, text fields, and state
249* [React to events](/docs/en/plugins/mods/events.md): tool calls, prompts, turns, and the order mods run in249* [React to events](https://code.claude.com/docs/en/plugins/mods/events.md): tool calls, prompts, turns, and the order mods run in
250* [Use the mods API](/docs/en/plugins/mods/api.md): commands, tools, model calls, timers, and files250* [Use the mods API](https://code.claude.com/docs/en/plugins/mods/api.md): commands, tools, model calls, timers, and files
251* [Test a mod](/docs/en/plugins/mods/test.md): automated tests that run without a session251* [Test a mod](https://code.claude.com/docs/en/plugins/mods/test.md): automated tests that run without a session
252* [Troubleshoot a mod](/docs/en/plugins/mods/troubleshoot.md): the reasons a mod does nothing, and the debug log252* [Troubleshoot a mod](https://code.claude.com/docs/en/plugins/mods/troubleshoot.md): the reasons a mod does nothing, and the debug log
253* [Manage mods for your organization](/docs/en/plugins/mods/admin.md): defaults, managed settings, reviewing a mod, and policy mods253* [Manage mods for your organization](https://code.claude.com/docs/en/plugins/mods/admin.md): defaults, managed settings, reviewing a mod, and policy mods
254* [Mods reference](/docs/en/plugins/mods/reference.md): events, methods, elements, and limits254* [Mods reference](https://code.claude.com/docs/en/plugins/mods/reference.md): events, methods, elements, and limits