Claude Code Mods: hook-based customization with hot reload and prompt-built mods
AGI Hunt · wechat · 2026-10-02
Anthropic shipped Mods for Claude Code (default-on from 2.1.287). A Mod is a function attached to Claude Code events (tool calls, permission requests, prompts, UI rendering) that can observe, rewrite, or take over the event—Express/Koa-style middleware—stacked onion-like in load order. Unlike old hooks, Mods persist in-session, keep state, render UI, and register slash commands and even tools for the model.
- Shipped via plugins (/plugin to install). Official examples: TokenWeather (a context-window "weather forecast" widget), BlastRadius (intercepts rm -rf / git reset --hard and lists affected files), ReplayTheater (step-by-step diff replay of Claude's edits).
- Easiest path: describe a Mod in natural language and Claude writes, installs, and hot-reloads it in the current session—official demos include a one-sentence secret-scrubbing mod and a screen-sharing privacy mod that hides numbers/emails.
- Hand-writing needs just three files (plugin., hooks., register.js), no Node.js or build step; the article walks through all three official 80-line examples demonstrating observe/rewrite/take-over, plus a complete prompt that generates the token-weather mod in one shot.
More from coding & agent
- Dev argues Rust would be better if modules, not crates, were the compilation unit — zetalyrae · 2026-10-25
- Formal Verification Yields to Static Analysis, Which Yields to Better Language Design — xennygrimmato_ · 2026-10-25
- 'Slurm's defense remains annoyingly strong': dev watches agents hit HPC wall — sloppenheimer · 2026-10-25
- 5 open-source tools turn user interviews into a full content marketing workflow — sven_ai · 2026-10-25
- Codex usage window hits day 20, reset imminent — dotey · 2026-10-25
- Six-step agent factory turns one concept image into rigged Blender game assets — AI_Andrew · 2026-10-25