Claude Code Mods: Rewrite Prompts, Replace Built-In Features, Build Your Own UI

Anthropic just shipped a new way to customize Claude Code called mods — small TypeScript functions that can rewrite prompts, redraw the UI, or swap out built-in features entirely. If hooks ever felt limited, this is the fix.

Anthropic just shipped a new way to customize Claude Code called mods — small TypeScript functions that can rewrite prompts, redraw the UI, or swap out built-in features entirely. If hooks ever felt limited, this is the fix.

What a Mod Actually Is

A mod is a short TypeScript function that hooks into events Claude Code already emits — tool calls, permission requests, prompts heading to the model, UI elements rendering. Unlike a regular hook, a mod can actually change what happens, not just watch and react.

What Mods Can Do

  • Rewrite a prompt before it reaches the model
  • Block, rewrite, or retry a tool call
  • Approve or deny a permission request automatically
  • Redact secrets out of tool output before Claude ever sees it
  • Replace interface pieces — tool results, Claude's questions — with your own UI
  • Add buttons and inputs other mods can respond to, so mods stack

Multiple mods can run on the same event — the first one loaded sees the event first and the result last — so mods from different authors layer on top of each other instead of fighting over the same hook.

Getting One

Write a mod yourself, or just ask Claude Code to write one for you — it can install it and hot-reload it straight into your current session, no restart needed. Mods ship inside plugins, so you get them from the plugin directory or by running /plugin in the CLI. Sharing one means packaging it into a plugin and submitting that to the directory.

Some of Claude Code's own built-in features — like /diff — now ship as mods under the hood, which means you can disable or replace them with your own version.

Watch Out

  • Mods are not sandboxed — they run with the same machine access as Claude Code itself. Only install from sources you trust.
  • On Team and Enterprise plans, a built-in mod called sec-default loads first and stops other mods from overriding admin permission-deny rules. Admins can view its source on GitHub and swap in their own mod as long as sec-default stays loaded alongside it.

Key Takeaways

  • Mods go further than hooks — hooks can only watch an event, mods can rewrite it, redraw the UI, or replace a feature outright.
  • Easiest path in: ask Claude Code to write a mod for you, then hot-reload it right in your session.
  • They install and share through plugins (/plugin), not as a separate system.
  • No sandboxing means no installing a stranger's mod without reading what it does first.

Source

claude.com/blog/claude-code-mods


Source: claude.com

We break down Claude Code news like this every day in the free community. Join the crew on Skool.