Mods in Claude Code: change how Claude Code works
Claude YouTube 493,717 views as of 3 November 2026
Why it is here
Official @claude walkthrough (3:21). Description: “Claude Code now supports mods: functions you write that change what Claude Code renders, what goes into a prompt, and what tool calls it makes. Lydia from Anthropic shows three she built. A live context breakdown, an agent side pane, and hover-to-reveal email addresses, then builds the email one from scratch.” Links to claude.dev/blog/getting-started-with-claude-code-mods/.
Description
Description written by Gemini from the videoGemini 3.8 Flash, 5 October 2026
Summary
Anthropic developer advocate Lydia Hallie introduces and demonstrates “mods” for Claude Code, a new plugin-based extension system that lets developers alter how Claude Code functions internally. Mods are written in TypeScript and act as middleware running on Claude Code’s internal event loop, enabling users to intercept tool calls, inject UI elements, customize prompts, and modify rendered output.
What is shown
- Overview of Mods & Architecture: Code in
register.tsxdemonstrating event listeners (on('ui.render'),on('prompt.submit'),on('tool.call')) manipulating Claude Code runtime behavior [00:06]. - Demonstrated Custom Mods:
context-bar: A live visual bar above the prompt breaking down context window usage (system prompt, tools, MCP tools, agents, memory files, skills, free space of a 1M token window) [00:17].agents-panel: A sidebar listing all defined project agents (e.g.,code-reviewer,docs-writer,perf-profiler) with single-click start buttons [00:26].hide-email: An interface privacy filter that visually masks email addresses in Claude’s output until hovered over [00:33, 02:49].
- Plugin Configuration: Setting up
plugin.jsonand adding a"modules"field tohooks.jsonreferencing TypeScript entry files [00:37]. - Middleware Pattern Explanation: Walkthrough of the
($, e, next)signature used by event hooks, detailing how$provides API tools,eholds event data, andnext()propagates execution [01:10]. - Loading & Hot Reloading: Launching via
claude --plugin-dirin the CLI [02:02] or configuringCLAUDE_CODE_PLUGIN_DIRSandCLAUDE_CODE_PLUGIN_DIR_WATCHinsettings.jsonfor live auto-reloading [02:07]. - End-to-End Implementation: Code walkthrough for
hide-emailusingon('ui.render', { component: 'AssistantMessage' }), confirming that masked text remains available to the model for tool calls (such as generatingmailto:links) [02:20 - 03:02]. - Distribution: Registering mods in
marketplace.jsonand installing via the/plugin installcommand [03:11].
Claims & numbers
- The presenter states that Claude Code features “a few dozen internal events,” including UI rendering, UI button presses, tool calls, permission checks, session start, and prompt submission [00:53].
- The presenter notes that mods run in their own sandbox where all interactions must route through the
$object, only receiving events explicitly exposed by Claude Code [03:06].
Notable quotes
- “We just added mods to Claude Code, and with a mod, you can directly change how Claude Code itself works.” [00:00]
- “Now, if you’ve ever used Express, that’s pretty much just middleware built into Claude Code.” [01:05]
- “A mod on render only changes what shows up on screen. So the model never saw my version.” [02:58]
Assessment
This is an official Anthropic product demonstration presented by Lydia Hallie, showcasing practical, working implementations of the Claude Code modding API in real time across terminal and desktop environments.
Described by gemini-3.8-flash on 2026-10-05 from the video’s audio and frames.