Mods Claude Code
A mod is a plugin whose JavaScript or TypeScript code runs inside Claude Code itself (available since version 2.1.287). On each event (tool call, prompt sent, slash command, drawing of part of the interface), Claude Code calls your handler, which can let the event through, change it or take it over. A settings.json hook stays a script launched from the outside; a mod lives in the process, can rewrite the event and draw in the interface. A skill tells Claude Code how to work; a mod changes Claude Code itself. A concrete example, a guard mod: a small file that watches what Claude Code is about to do and stops, before execution, anything that touches .env files (where the keys live) or looks destructive, instead of reviewing it afterwards. Claude Code can write it from a single prompt. The test: ask it to read the .env, it refuses by your own rule, from inside the tool. The mechanism: Claude Code runs on events (a prompt sent, a request to the model, a test run, a spinner redraw, a context compaction). Each event goes down a line of mods, and each one chooses between passing it on, passing it on changed, or answering it itself so the original never runs. Anthropic is rebuilding Claude Code itself out of mods: the diff view is one (you can switch it off or swap it), the agents.md loader too, and even the guard that watches other people's mods. Three uses that justify opening mods, after the 1 October 2026 announcement by Boris Cherny and @ClaudeDevs. One: sessions that hand work to each other. A mod can send a message to another of your sessions, so one plans, the other builds, and the first sends step 1 to the second. Two: routing by cost. A mod intercepts your request, judges whether the task is simple and sends it to a cheaper model, the heavy work stays on the top model, and your limits stop melting on tasks a small model settles. Three: an interface made to measure. You describe a dashboard beside the chat (live agents, a limits gauge) and Claude writes the mod and turns it on. The official name is indeed "mods" (spoken aloud, it is sometimes heard as "modes"). All three moves exist in the documentation: a message to another session, a request sent to another model, a pane beside the transcript. The downside holds for all three: a third-party mod is code that runs on your machine, so read it before you install it. A fourth use, the one doing the rounds since mid-October 2026: mods that make you spend less. The three in circulation are by Nate Herk and travel through his community, not a public repo: read the code before switching it on. Cache Keeper shows a countdown from your last request and warns you just before the conversation's cache goes cold. The mechanism behind it, which is often wrongly placed 'on your computer', sits on Anthropic's side: the prompt cache keeps your conversation warm for an hour on Claude Code; past that, your next message resends the whole conversation at full price, while a message sent before the cut only pays for the difference. Goal Meter puts a progress bar on a /goal command (elapsed time, task list, percentage). Collision Guard checks, before any write, whether another session touched the file in the last thirty minutes, and asks what to do: proceed, use a worktree, cancel. It is a question in the interface, not a lock: a session running with nobody in front of it will not see it. You will sometimes read 'Cash Keeper' and 'Cloud Code': those are transcription slips.