Claude Code launches Mods: customize UI, intercept dangerous commands via prompt
AI寒武纪 · wechat · 2026-10-02
Claude Code introduced a Mods system that lets you patch its UI, interaction logic and internals like game mods—write a few lines of TypeScript or just ask Claude to write one and hot-reload it. Boris Cherny: no reason everyone should face an identical Claude.
Three official demo Mods:
- TokenWeather: live context-window forecast above the prompt—Clear under 25%, Showers at 67%, Storm past 81%—plus a bar chart of the last 12 turns.
- BlastRadius: pauses dangerous commands like rm -rf or git reset --hard, lists affected files, waits for confirmation.
- ReplayTheater: replays every file change in a turn slide-by-slide via /replay.
How it works: Mods are TS/JS modules that hook Claude Code events like middleware, with three powers—Observe (record), Rewrite (mutate data), Answer (intercept). Mods run with full system privileges and no sandbox; an internal sec-default Mod guards team permission rules, and admins get controls.
The post includes a full tutorial building an 80-line TokenWeather: directory layout, plugin., ui.render hook, and persisting data via $.state across hot reloads.
More from coding & agent
- Dev argues Rust would be better if modules, not crates, were the compilation unit — zetalyrae · 2026-10-25
- Dev open-sources BizAgent framework where one AI lead agent manages a dozen AI employees — Low-Start2333 · 2026-10-25
- Formal Verification Yields to Static Analysis, Which Yields to Better Language Design — xennygrimmato_ · 2026-10-25
- Scanning 115,798 agent ledger rows: zero capability revocations, none with expiry — Affectionate-Sun265 · 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