Anthropic has released mods, a new extensibility system for Claude Code that lets developers rewrite prompts, replace built-in features, and add custom UI using small TypeScript functions. The feature is available today in both the CLI and desktop app, giving teams and individual developers direct control over how the coding assistant behaves without waiting for official feature updates.
How mods hook into Claude Code
Claude Code emits an event each time it performs an action - calling a tool, asking for permission, or drawing part of the screen. A mod is a function that hooks into one of these events. It can run before the event, after it, or instead of it entirely. It can also wrap the event, executing code on both sides.
With a single function, a mod can rewrite a prompt before it reaches the model, block or retry a tool call, approve or deny a permission request, or redact secrets from tool output before Claude reads it. Mods can also change the interface. They can edit or replace parts of the screen Claude Code draws, add buttons and inputs, and respond when those buttons are pressed. A mod can target the terminal, the desktop app, or both.
When several mods hook the same event, they run in load order. The first mod to load sees the event first and the result last, which lets users stack mods from different authors.
Replacing built-in features
Some of Claude Code's built-in features now ship as mods themselves. The /diff command is already a mod, meaning users can disable it through /plugin or swap in their own version. Anthropic plans to move more built-in features to mods over time, allowing developers to strip Claude Code down to a small core and add back only what they need.
Developers can also ask Claude Code to write mods for them. The assistant can generate the TypeScript, install it, and hot reload it during a session.
Team and enterprise controls
Mods ship inside plugins, so existing plugin management controls apply. Admins can allow or block plugin marketplaces. On Team and Enterprise plans, an owner sets this in the admin console. On Claude API and third-party API plans, admins push managed settings to users' machines.
On managed plans, a built-in mod called sec-default loads first. It prevents user-installed mods from overriding permission deny rules and performing other risky actions. Admins can load their own mods first instead, but Anthropic recommends adding sec-default to the list to retain its restrictions.
Teams can build practical controls with mods. Examples include a CI/CD status pane that updates beside the conversation as builds pass or fail, a production safeguard that requires confirmation before any command touches production config, and an audit logging mod that loads first and records every call other mods make.
Why this matters for developers and IT teams
Mods give development teams a way to enforce safety policies and customize workflows without forking tools or building separate wrappers. For IT admins, the sec-default mod and managed settings provide a mechanism to control what code runs on developers' machines while still allowing customization. For individual developers, mods reduce friction by letting them shape Claude Code to match their workflow - rewriting prompts, tweaking the interface, or replacing features they don't use - directly in TypeScript.
Your membership also unlocks: