What are Claude Mods? Function hooks in Claude Code, explained

A plain-language explainer of the mod system Anthropic is shipping for Claude Code — what a mod is, what it can touch, and why "zero tokens" keeps coming up.

2026-09-16 · Claude Mods editorial team

Short version: a Claude Mod is a Claude Code plugin whose behaviour is a TypeScript module running inside Claude Code’s own process. Where a classic hook runs a shell command when something happens, a mod registers a function for that event and gets an object called $ that can draw above the prompt, open a pane beside the transcript, read the session, intercept tool calls, or change what the interface shows. Anthropic calls the mechanism function hooks and the product Claude Mods.

Where the idea came from

On 3 September 2026 an Anthropic engineer opened issue #91870 in the Claude Code repository asking the community whether they wanted this. The proposal: hook into Claude Code with TypeScript functions in the style of Express or Koa middleware, with a next continuation so plugins compose, and with every side effect going through one parameterised object so administrators can audit or withhold capabilities. The thread got well over a hundred comments in a week.

On 9 September the update came: Anthropic committed to shipping, renamed the feature Claude Mods for users while keeping function hook as the engineering term, and published the source of its first three built-in mods. In their words, “a mod is just a plugin that uses function hooks.”

What a mod actually is

A mod is an ordinary Claude Code plugin folder with two extra things:

  1. A hooks/hooks.json that names a module instead of, or alongside, shell commands: { "modules": ["./register.tsx"] }.
  2. That module exports one function, register(on, options). Inside it, the mod calls on('event', hook) for the events it cares about.

Every hook has the same shape: ($, e, next). e is the event’s input as plain data. next(e) continues to the other mods and then to Claude Code’s own behaviour, and resolves to the event’s result. A hook that returns without calling next answers for itself; a hook that calls next({ ...e, changed }) rewrites what everything beneath it sees. And $ is the engine: the only door to the outside world.

What events exist

The events cover most of what happens in a session:

  • Tool callstool.call, before and after any tool runs; a mod can deny, rewrite or wrap the call.
  • Prompts and turnsprompt.submit, turn.start, turn.step (the model’s streamed output), turn.complete.
  • The interfaceui.render for what Claude Code draws, with surfaces such as AbovePrompt (a band above the input) and Pane (a panel beside the transcript).
  • Commands — a mod can register its own slash command and answer it instantly, without asking the model.
  • Session lifecyclesession.start, subagent events, the system prompt’s sections.

The $ object gives access to the UI (draw, toast, status, invalidate), a key-value store that survives restarts, a clock for timers, the session’s messages and usage, the model (fork a side conversation), and, when the administrator allows it, files, HTTP and processes.

Why “zero tokens” keeps coming up

A mod can update an interface or respond to a deterministic event without asking the model to generate anything. A locally rendered game or counter need not spend model tokens for its UI. This is a property of that implementation, not a blanket promise for every mod. A mod can make model calls or use paid external services, and your normal Claude session still has its usual costs. Check the author’s description of what the mod accesses.

Mods versus everything else

Claude Code already has several extension points, and the names are confusing, so here is the map:

ExtensionMain purposeWhere behavior lives
Function-hook modAdd UI or react to session and tool eventsCode loaded into Claude Code, with permitted capabilities
Shell hookRun a command when a supported event firesAn external command or script
SkillProvide task instructions and supporting resourcesContent the model can load
MCP serverExpose tools or resources through a protocolA separate server or process
PluginPackage extensions for distributionA container that can include multiple extension types

A mod is a kind of plugin, rather than an alternative to plugins. Choose the extension point for the behavior you need. The install guide covers the catalog’s mod setup.

A catalog that lists all of these under one word is not much use. That is why this site lists only mods.

Order is nesting

One design choice worth knowing before you install several mods: they nest. If mods A, B and C hook the same event in that order, the event flows A → B → C → Claude Code, and the result flows back the same way. A mod registered earlier wraps everything registered later, so it sees every event first and every result last. Organisations use this to seat a security mod outermost, which is exactly what Anthropic’s built-in sec-default does. For you it means the order in your plugin list is not cosmetic.

Early access, and what that means

Mods are behind a flag. You need Claude Code 2.1.269 or newer and CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in your environment; the install guide shows the two ways to set it. The API is still moving between releases, so a mod written last week may need a small fix this week, and authors say so in their READMEs. Anthropic has said it is shipping the feature “on the scale of weeks”, so expect the flag to go away.

Where to start

Browse the catalog, or jump straight to games if you want the fun end first. If you want to build one, read Anthropic’s published built-ins and the hello-mod starter, run /plugin-types inside a session for the type declarations, and validate with claude plugin validate. When it works, submit it.

Frequently asked questions

Are mods the same as skills?

No. Skills provide instructions for the model. Mods add behavior through function hooks inside Claude Code. A plugin can package more than one kind of extension.

Do mods use model tokens?

Local UI rendering and deterministic hooks do not inherently require model calls. A mod that calls a model can consume tokens, and normal Claude usage still has its usual costs.

Where can I find Claude Code mods?

Browse the catalog by category, open a listing to check its repository and requirements, and follow the install guide before enabling a mod.

More reading