Claude Code Β· Mods & Plugins

Claude Mods: How They Work and Why They're a Big Deal

Prompt Engineering 10:37 JS / TS mods Claude Code
Claude mods

1. Anthropic Opens Up Claude Code

β–Ά 0:00

Anthropic just dropped mods in Claude Code, and it is a bigger deal than it looks: for the first time, the tool itself is open, not just extensible around the edges. You can now customize Claude Code in almost any way you can imagine β€” including the UI β€” and effectively build your own harness on top of it.

The idea is not new. When DeepSeek released its harness (242,779 stars, MIT, TypeScript), the slogan was "everything is a plugin" β€” the model wrapper, the tools, even the agent loop itself, each swappable. Anthropic is bringing the same idea to Claude Code, and it is already building parts of the product this way: the diff view and the agent are both mods, with more features slated to move over.

2. What a Mod Is and How It Works

β–Ά 1:39

Technically, a mod ships as a plugin with some extra settings β€” the same plugin file, the same hook file, except the hooks file now points to a JavaScript or TypeScript file that runs inside Claude Code, with no build step. Load it with one flag and Claude Code watches that folder: every time you save, the mod reloads in the session you already have open.

At runtime, the interaction is clean. Say Claude is about to run a force push. Before it does, Claude Code calls your function and hands it three things: the event (the exact command about to happen), a way to talk back (draw on screen, read a file, ask a question), and a next function meaning "carry on as normal." The mod has three choices β€” call next and let the push through (logging it along the way), rewrite the command (push to a new branch instead) and then call next, or skip next entirely and answer for Claude: "we don't force push in this repo."

It is not only about commands. A mod can sit in front of what Claude shows you β€” hide email addresses or other PII from the response β€” while the model still sees the real address underneath. The mod changes the on-screen behavior, not the model's.

3. Mods vs Hooks, Skills, and MCP

β–Ά 3:54

The difference from what came before is the whole point. A hook is a shell script that runs once for an event, sends back an answer, and is gone. A mod loads once and stays running for the entire session β€” so it can remember things, show a live panel that updates every turn, pause a command and ask before it runs, and add slash commands that run your code instantly without calling the model at all. It is a lot more than a hook.

The mental model that falls out:

  • Skill β€” you want Claude to follow instructions.
  • MCP server β€” Claude needs to reach another service.
  • Hook β€” you want to block something with a script you already have.
  • Mod β€” you want something on your own screen, something that remembers, something that can stop Claude and ask you first, or a wholesale re-skin of the experience.

Because Anthropic ships its own features as mods, two people's Claude Code may soon look nothing alike β€” same core, different set of mods on top.

4. Your First Mod and Hot Reload

β–Ά 5:18

Update Claude Code (or the desktop app) and /plugin β†’ the install tab lists built-in mods, including the skill Claude itself uses to write mods for you. The simplest mod from the docs counts how many tools Claude uses: load it with the plugin-directory flag, ask Claude to read a couple of files, and the mod draws the tool count right inside Claude Code. Typing /tally shows the number.

The hot-reload detail matters: edit the file while the session is open and Claude Code reloads it on its own β€” but the tally resets to zero. A reload restarts your code fresh, so anything you want to keep must be stored in Claude Code, not in your own file. That one constraint shapes how you write stateful mods.

5. Installing Mods and the rm -rf Guard

β–Ά 6:32

Installing someone else's mod works like any plugin. A marketplace is just a folder or a GitHub repo with one JSON file in it; two install commands pull it in, and /plugin then reports the mods as active. The author shows a lab mod β€” a bar above the prompt listing which local models are running on his MacBook and his two DGX Sparks β€” that keeps live track of the machines.

The more serious demo is a guard: ask Claude to delete a folder with rm -rf, and before the command runs the mod stops it and asks. You can refuse, or Claude reads your reason and suggests a safer way β€” and when the turn ends, a pop-up reports how long it took and how many tools it used. One small mod, three behaviors at once: intercept, prompt, and summarize.

6. Let Claude Write Your Mods

β–Ά 7:42

You do not have to write mods yourself β€” the useful ones are built around how you already work, and a session-audit prompt does the discovery. The prompt (credited to Vox) tells Claude to read your last twenty sessions and look for three things: the questions you keep asking, the commands that make you nervous, and how you check its work. The most important line is the last one: "Show me the ideas first. Don't build anything until I pick."

Run it on your own history, pick the ideas you like, and Claude builds them. The result for the author: a panel showing his Sparks and Mac, a shelf of everything the session produced, and a guard that checks which account he is about to publish from β€” none from a template, all from his own usage. The product becomes yours.

7. Mod Security and When to Use One

β–Ά 9:15

The warning is blunt: a mod runs on your machine with your permissions β€” it can read your files, run programs, and use the network. Before installing anyone else's mod, run claude plugin validate on it; it lists every event the mod listens to and every call it makes, so you can see that a mod is making network calls and ask why. The same rule applies as with skills and MCP servers: do not blindly trust mods you find on the internet.

The when-to-use summary is a clean flowchart. Block something with a script β†’ a hook is fine. Want Claude to follow instructions β†’ a skill. Need another service β†’ an MCP server. Want something on your own screen, something that remembers, something that stops Claude and asks first, or a full customization of the experience β†’ that is a mod. The closing prediction: expect a flood of mod marketplaces in the coming weeks β€” and soon after, the first mod that does something it should not.

Key Takeaways

  1. A mod is a JS/TS function running inside Claude Code β€” it can watch, change, or stop a tool call before it runs, and draw its own live panels.
  2. Three handles per event: the event, a way to talk back, and next β€” call next, rewrite then call next, or answer instead.
  3. Hooks run once and die; mods stay alive all session β€” remembering state, updating panels, and pausing commands to ask.
  4. Anthropic ships its own features as mods (diff view, the agent), so Claude Code becomes genuinely remixable.
  5. Hot reload resets state β€” persist anything you want to keep inside Claude Code, not in your file.
  6. A marketplace is a folder or GitHub repo with one JSON file.
  7. Session-audit prompt mines your last 20 sessions for recurring questions, scary commands, and how you check work β€” then Claude builds those mods.
  8. Validate before you install: claude plugin validate lists every event and call a mod makes β€” it runs on your machine with your permissions.

Timestamp Index

  • 0:00 β€” Anthropic opens up Claude Code
  • 1:39 β€” What a mod is and how it works
  • 3:54 β€” Mods vs hooks, skills, and MCP
  • 5:18 β€” Your first mod + hot reload
  • 6:32 β€” Install a mod + the rm -rf guard
  • 7:42 β€” Let Claude write your mods
  • 9:15 β€” Mod security and when to use a mod
☰ View all