Now you can tinker with Claude Code using just a few lines of code
Anthropic has introduced "mods" in Claude Code: small pieces of TypeScript code that can change both its look and its behavior. Mods run without a sandbox, so Anthropic recommends installing them only from sources you trust.

What if you could customize your AI tool the way you can an app on your phone? That is the idea behind "mods," which Anthropic has now introduced in Claude Code, the company's tool for letting AI help write code.
A mod is a small function written in the TypeScript programming language. According to Anthropic, it can rewrite a prompt (the message sent to the AI), add new user interface elements, replace a built-in feature or provide entirely new functionality. Mods are available both in Claude Code CLI (the text-based version in the terminal) and in the desktop app.
Claude can build them itself
You can write a mod yourself, but you can also ask Claude Code to do it. According to Anthropic, Claude can write the code, install it and reload it in the current session, so you don't have to restart.
How it works
Every action in Claude Code triggers an event, for example a tool call, a permission request or the drawing of part of the screen. A mod hooks into an event and can run before, after, instead of or around it. It can also change or replace parts of what you see, such as a tool result or a question from Claude, and add buttons and input fields. If several mods hook into the same event, they run in the order they were loaded.
Anthropic says the existing hooks in Claude Code cannot rewrite events, draw new user interface elements or replace features, but that mods can.
Mods are delivered in plugins and shared like other plugins, via the Claude directory or the /plugin command. Some built-in features already ship as mods. This applies to /diff, which can be turned off or replaced with your own version. Over time, Anthropic plans to move more features over, so that Claude Code can be cut down to a small core.
Risk and control
Mods have the same access to the user's computer as Claude Code itself and are not sandboxed, meaning they are not confined to a protected area. Anthropic therefore recommends installing mods only from sources you trust.
For companies, the existing plugin controls apply. Administrators can allow or block plugin marketplaces. On Team and Enterprise plans and on machines with managed settings, a built-in mod, sec-default, is loaded first. It prevents user-installed mods from performing risky actions, such as overriding rules about what Claude must not do. Administrators can instead load their own mods first, but must add sec-default to keep its restrictions.
The information comes from Anthropic's own announcement, and the mods have not been independently tested.
Updated 14 October 2026: The article has been rewritten from additional sources.
Read also


