Customize Claude Code with Mods in TypeScript
Hi everyone, it's Shii-chan!
Claude BlogThere's now a way to reshape Claude Code to your own taste. No more waiting for official features!
What was announced?
The Claude Blog introduced mods: small TypeScript functions that customize how Claude Code behaves (launch date: October 1, 2026). You can write them yourself or ask Claude Code to write them. Mods ship inside plugins and work in both the Claude Code CLI and the desktop app.
Why it matters
Until now, changing behavior meant waiting for an official feature. With mods, developers can adjust it themselves.
What changes
Mods can do things like:
- Rewrite a prompt before it reaches the model
- Block or modify tool calls
- Approve or deny permission requests
- Redact secrets from outputs
- Modify or replace UI elements
Dive Deep
How it works
Mods work as event hooks. Whenever Claude Code calls a tool, requests a permission, or renders UI, it emits an event that a mod can intercept. A mod can run before, after, or instead of the event. Multiple mods stack and run in load order.
Good to know
- Security: mods aren't sandboxed. They access the machine like Claude Code itself, so be careful what you install
- Org controls: on Team and Enterprise plans, a built-in mod called sec-default prevents unauthorized actions
- Built-ins as mods: features like /diff now ship as replaceable mods
- Sharing: distribute mods as plugins through the Claude directory
Wrap-up
- Mods are small TypeScript functions that change how Claude Code behaves
- As event hooks, they can step in on prompts, tools, permissions, and UI
- They stack and run in load order
- They aren't sandboxed, so trust your sources
- They ship as plugins and work in the CLI and desktop app
This one is for heavy Claude Code users with a list of "I wish it did this"!