Three Official Claude Code Mods Examples: Usage Bar, Command Guard, Replay Theater

xiaohu · x · 2026-10-02

xiaohu summarizes Claude Code's official Mods examples and underlying mechanics. A Mod is a JS/TS module packaged in a Plugin, running in-session and subscribing to events to observe, rewrite input, or return results directly.

Official examples: a context-usage bar above the input box (80 lines of code, hot-reloadable with adjustable thresholds), Blast Radius listing files and disk usage before deletion, and Replay Theater for stepping through each edit's diff via r or /replay. Mods follow the Plugin spec (plugin. manifest plus hooks config), and the built-in /diff panel is itself a Mod that can be disabled or replaced.

Related event: Claude Code Launches Mods: Rewrite Behavior and UI with a Few Lines of TypeScript(26 posts)→

Original post →

More from coding & agent

coding & agent channel →