Mods in Claude Code: change how Claude Code works
- Source
- youtube.com
- Author
- Claude
- Date
Context
Claude Code mods are small JavaScript or TypeScript modules, shipped inside plugins, that can change what the tool renders, what goes into a prompt and which tool calls it makes. In a video from Claude, Lydia from Anthropic shows three mods built, including a live breakdown, an side pane and hover-to-reveal email addresses, and then builds the email one from scratch.
Anthropic's getting-started post explains how mods differ from ordinary settings hooks. A runs a shell command for each event, whereas a mod is loaded once and stays in the session, so it can keep state and redraw interface elements. Mods work as a chain, like middleware, where each can observe an event, rewrite it, or answer it without passing it on, for example by refusing a tool call. The post also lists limits: the API can change between releases, and a mod is code that runs with Claude Code's access, written by its publisher rather than Anthropic. Its example command-guarding mod, it says, is a safety net and not a permission system, because it reads command text and can be bypassed. Anthropic's earlier announcement lists other examples.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
Checking sign-in…
Loading comments…






