Tới nội dung
Anthropic · Claude.dev· Addy Osmani·· 2026-10-01Tuyển chọnĐiểm AI60

Getting started with Claude Code mods: building a context-window forecast

Getting started with Claude Code mods

Nội dung này chưa có bằng ngôn ngữ của bạn; đang hiển thị bằng English.

Tóm tắt bằng AI

Claude Code mods are small JavaScript or TypeScript files that run inside a session as hooks shipped in plugins, and can observe events, rewrite behavior or draw custom UI in the terminal or desktop app. The guide builds Token Weather, an roughly 80-line mod that reads $.session.usage() after each turn and draws a weather-style context-window band above the prompt, then tours Blast Radius, which holds risky Bash commands, and Replay Theater, which steps through a turn's edits. Mods require Claude Code 2.1.287 or later and are on by default; finished code for all three is in anthropics/claude-code-playground.

Vì sao đáng chú ý

A hands-on walkthrough of Claude Code mods that builds a working context-window meter in about 80 lines, showing how hooks, state and custom UI fit together.

Nguồn:Anthropic · Claude.dev · claude.dev