Cost Alert Monitor
Cost Alert Monitor tracks cumulative token usage throughout a Claude Code session using notification events. It maintains a running tally of input and output tokens, calculates estimated costs based on current pricing, and triggers alerts at configurable thresholds (50%, 75%, 90% of budget). When a threshold is crossed, it displays a prominent warning with usage details and remaining budget. The hook also logs per-session cost summaries for historical tracking and monthly roll-up reports.
Hook Code
Add this hook to your Claude Code settings or .claude/settings.json to activate.
Terminal Preview
About Cost Alert Monitor
Claude Code hooks let you run custom shell commands automatically in response to specific events during Claude's operation. Cost Alert Monitor is a Notification hook at the Intermediate level that automates tasks at key moments in your development workflow, reducing manual steps and enforcing consistency across your team.