Claude Code mods: changing how the tool behaves and looks
Anthropic added mods: small TypeScript functions that rewrite prompts, control tool calls and draw their own interface.
You can now reshape Claude Code without a fork or a workaround. A mod is a small TypeScript function that you write yourself or ask Claude Code to write.
What’s new
Claude Code emits events: calling a tool, requesting permission, drawing part of the screen. A mod hooks into an event and runs before it, after it or instead of it. That lets a mod:
- rewrite a prompt before the model sees it;
- block, rewrite or retry a tool call;
- approve or deny a permission request;
- redact secrets from tool output;
- change interface elements in the terminal or desktop app, and add buttons.
Some built-in features already work this way: /diff is now a mod you can disable or replace.
How to try it
Mods ship inside plugins and work in the CLI and the desktop app. Install a plugin through /plugin or the Claude directory. You can also ask Claude to create a mod, and it will install and hot reload it in your session.
Limitations
Mods aren’t sandboxed: they have the same machine access as Claude Code, so install them only from sources you trust. On Team and Enterprise plans, a built-in mod called sec-default loads first and blocks risky behaviour such as overriding permission deny rules.
Prepared with AI from public sources.