AI Disruption

AI Disruption

Claude Code Releases Mods Feature

Claude Code Mods let you customize its UI and behavior with TypeScript, or just prompt Claude to build and hot-reload mods for you instantly.

Meng Li's avatar
Meng Li
Oct 04, 2026
∙ Paid
I Tried Claude Code Mods (And Discovered It Can Now Rewrite Its Own  Behavior) | by Joe Njenga | Oct, 2026 | Medium

Recently, Claude Code launched a feature called Mods.

With a few lines of TypeScript, you can change how Claude Code behaves, redraw its interface, or even replace its built-in features with versions you wrote yourself.

If you can’t write code, that’s fine too. Just tell Claude what you want, and it will write the Mod, install it, and hot-reload it, so it takes effect immediately in the current session.

Mods are distributed with plugins. You can install them with /plugin in the CLI or the desktop app, and they are enabled by default starting with Claude Code 2.1.287.

2.1.287 版本

Boris Cherny, who leads Claude Code, said:

“Mods are insane. You can now just prompt Claude to work and look the way you want. Everyone works differently, and there’s no reason for everyone to use the exact same Claude.”

What Are Mods?

Claude Code emits an event for everything it does: calling a tool, requesting permission, submitting a prompt, starting and ending a turn, and even drawing a piece of the screen.

A Mod is simply a function attached to an event. It can run before the event, after it, or instead of it, or it can wrap the event and run code on both sides.

Anthropic engineer Lydia Hallie described Mods as essentially middleware for Claude Code. If you’ve written Express or Koa, this will feel familiar. Every hook always takes three arguments:

on("tool.call", { tool: "Bash" }, async ($, e, next) => {
  // $    The Mods API: ui, session, state, store, fs, process, http, tool, command, model...
  // e    The input for this event, as plain data
  // next Hands e on to other plugins, and finally to Claude Code's own behavior
  return next(e);
});

A hook can do only three things: observe, rewrite, or take over. Observing means calling next first and then looking at the result. Rewriting means modifying e before handing it to next. Taking over means not calling next and returning a result yourself.

User's avatar

Continue reading this post for free, courtesy of Meng Li.

Or purchase a paid subscription.
© 2026 Meng Li · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture