Files, Nouns, and Gates
A mod has a few files, one object named $ with 20 nouns, and a short list of switches that can stop it.
The tables below list them all, with the limits that apply.
The one file that makes a plugin a mod is modules in hooks/hooks.json.
A manifest has no mods key.
These switches stop mods: disableAllHooks, allowManagedHooksOnly, allowManagedModsOnly, --safe-mode, and --bare. A remote rollout switch also gates installed mods. Mods live in the plugin folder, plugin.json, hooks/hooks.json, and settings files.
Official pages: Mods Reference, Mods Overview, Plugins Reference, Manage Mods for Your Organization.
Example
{ "modules": ["./register.js"] }
{ "disableAllHooks": false }
Files and Manifest Keys
| Item | Status | What it does | How it works | Where it can be used |
|---|---|---|---|---|
hooks/ key modules | Documented | The path of the hooks module. | One path only. The module and each file it imports end in ., ., ., ., ., ., ., or .. The program says: hooks. modules names one hooks module per plugin. | Plugin hooks/ folder. |
register(on, options) | Documented | The export that the loader reads. Nothing else is read. | See Hooks. | The hooks module. |
Manifest key types | Documented | Path to the type contract of the plugin. It starts with ./. | A self-contained . with no import, export-from, require, or reference. It declares the noun in declare module 'claude- and the Plugin values. claude plugin validate checks it. | plugin. |
Manifest key dependencies | Documented | Plugins that must be enabled. | A mod that lists a plugin here gets its contract at . when the engine loads the mod from a folder the person owns. | plugin. |
Manifest key user | Documented | Fields whose values reach register as options. | Defaults are filled in. Values are in plugin of settings. A required field with no value fails the load. Plugin is a read-only record of string, number, boolean, or string list. | plugin. |
. | Documented | The engine writes claude-, claude-, claude-, and one folder for each dependency here. | Written again after an update. A mod that has no tsconfig gets one that extends .. | A mod loaded from a folder the person owns. |
Tests *., *. | Documented | Run by claude plugin test [dir]. | See Testing. | Plugin folder. |
The Dollar Object
$ is the first argument of every hook.
It is frozen.
It has plugin, 20 nouns, and every noun that an engine.create hook added.
Write each call in full, such as $.fs.read('notes.md').
Each $ call is also an event with the same name, such as fs.read.
A hook on it can pass the call on, refuse it with { deny }, or answer it with { value }.
The calling hook alone is skipped, so a plugin does not trap itself.
| Item | Status | What it does | Members | Page |
|---|---|---|---|---|
$. | Documented | This plugin as loaded: its manifest name and its directory. | name, root | Plugin |
$. | Documented | Display: a line under an open dialog, redraws, log lines, panes, scroll, focus, the clipboard. | notice, invalidate, blit, resolve, log, ask, toast, notify, status, open, close, panes, scroll, focus, copy, selection, view | UI |
$. | Documented | Completions through the session's own client. | complete, fork, classify | Model, Audio, and MCP |
$. | Documented | Sound: clip playback and platform speech. | play, speak | Model, Audio, and MCP |
$. | Documented | The engine's MCP servers: call a tool of a connected one, or connect one the plugin lists. | call, connect | Model, Audio, and MCP |
$. | Documented | The running session as plain data, compacting it, and sending a message to another agent or session. | messages, cwd, root, model, turns, id, repo, surfaces, surface, usage, version, compact, send, append, identity | Session |
$. | Documented | The running model turn: ending it. | abort | Turn and Prompt |
$. | Documented | Submitting a prompt as a user turn, and the prompt box: read, write, or propose into. | submit, read, media, fill, suggest, compose | Turn and Prompt |
$. | Documented | The tools the model has in this session, and running one. | list, call, check, register | Tool, Command, and Config |
$. | Documented | The slash commands the person can run, and running one. | list, run, register | Tool, Command, and Config |
$. | Documented | Every row of the / menu, including each enabled plugin's user fields. | list, set | Tool, Command, and Config |
$. | Documented | Analytics records and feature marks. | log, mark | Telemetry |
$. | Documented | Subagents. | spawn, list, register | Agent |
$. | Documented | The file system as the engine process reaches it. A relative path is under the session's working directory. Text is UTF-8. | read, write, list, exists, stat, ancestors | Files, Store, and State |
$. | Documented | This plugin's key-value store. It lasts across sessions and hot reloads. Values are JSON. | get, set, delete, keys | Files, Store, and State |
$. | Documented | Named values the host holds for the session, each with a version. They survive a hot reload. | get, set | Files, Store, and State |
$. | Documented | Time and timers, each an event through the host. | now, sleep, after, every | Clock, HTTP, Process, Env, and Settings |
$. | Documented | The network, through the host. | fetch | Clock, HTTP, Process, Env, and Settings |
$. | Documented | Commands on the host, run as the user of the session. CLI only. | run, spawn | Clock, HTTP, Process, Env, and Settings |
$. | Documented | What the settings files, --, and managed policy hold. Read only. | read | Clock, HTTP, Process, Env, and Settings |
$. | Documented | The environment of this process. Every Bash child, MCP server, and $. command started later inherits it. | get, set | Clock, HTTP, Process, Env, and Settings |
Modules
| Item | Status | What it does | How it works | Where it can be used |
|---|---|---|---|---|
claude- | Documented | Types only. import type { Register, On, Engine. At run time the import is empty. | Exports 585 declarations. The values atom, derive, member, read, and update are the state helpers. See Files, Store, and State. | Hooks modules and contracts. |
claude- | Documented | The kit for claude plugin test: test, describe, expect, mock, tier. | See Testing. | *. and *. |
Globals h, Fragment, JSX | Documented | JSX compiles against them. | See Surfaces, Elements, and Render Sites. | Files with JSX. |
Gates That Stop Mods
| Item | Status | What it does | How it works | Where it can be used |
|---|---|---|---|---|
disable | Documented | No mod or hook of an installed plugin runs. | In managed settings it also stops organization mods. In user settings, what the organization manages keeps running. Built-in mods load. | Settings files. |
allow | Documented | Blocks hooks and mods that are not the organization's. | The program says: hooks modules are turned off here (disable, allow or a policy). | Managed settings. |
allow | Documented | Only organization mods and built-in mods run their hooks. | An option of the built-in guard sec-. | Managed settings. |
allow | Documented | Lets an installed mod approve a call that a deny rule refuses. | An option of the built-in guard. | Managed settings. |
prepend, append | Documented | Plugin ids that run before or after user mods. | Only these can call next.. | Managed settings. |
disable | Documented | Rejects -- and --. | None. | Managed settings. |
--, -- | Documented | No installed hooks module loads. | The program says: installed plugins are disabled, none of their hooks or hooks modules load, built-in plugins load regardless. | CLI flags. |
| Rollout switch | Gated | Installed hooks modules wait for a rollout flag. A message says installed mods are turned off remotely. | Built-in plugins and organization plugins load regardless. | Installed plugins. |
CLAUDE_, CLAUDE_ | Documented | Load plugin dirs as -- does, and reload on save in a non-interactive session. | None. | Environment. |
Limits
Hooks and Mod API calls run under time and size limits. Claude Code skips a hook that is too slow.
| Limit | Value |
|---|---|
| Own time of one hook for one event | 10 seconds, or 50 milliseconds for a prompt. hook (from the docs; not checked in the program) |
A . handler | 1 second |
All session. hooks together | 1.5 seconds unless you change the Session hook budget |
$. | 30 seconds by default, 10 minutes at most |
$. max | 1024 by default, up to 64,000 or the output limit of the model |
$. and $. | 4 MiB for one file |
$. body and response | 4 MiB each, 30 seconds, 5 redirects |
$. | 4 MiB of JSON in all |
$. | The newest 4,096 entries |
$. | 10 redraws a second, or 30 in the terminal for the visible pane |
$. | 4 seconds unless you pass timeout |
| A pane that nobody asked for | Placed from 144 terminal columns, 110 after the person opened it once |
| Names of commands, tools, subagent types, and panes | Letters, digits, _, and -, up to 64 characters |
One claude plugin test test | 5 seconds unless the test sets timeout |
Built-in Mods
Six built-in plugins ship in the program. The settings and flags that stop installed mods do not stop them.
Name in /plugin | What it does |
|---|---|
cc- | Loads AGENTS. as project instructions. |
cc- | Takes over / and draws its pane. |
cc- | Gives Claude the plugin- skill for writing mods. It holds no mod code. |
cc- | Guards what your organization manages from the mods a user installs. You cannot turn it off. |
cc- | Sends the analytics records that Claude Code and its built-in mods log. |
cc- | Shows a note above the prompt when a side agent finds something you might have missed. Off until you turn it on. |