Summary
Add a built-in prompt segment for displaying Claude AI (claude.ai / Claude Code) usage limits, specifically the 5-hour session consumption and weekly usage remaining, similar to how p10k already surfaces context from tools like kubectl, aws, and gcloud.
Motivation
Claude has become a widely used AI assistant among developers, especially with the rise of Claude Code (the CLI agent). Claude enforces two rolling usage limits:
- 5-hour session limit: a rolling window that resets every 5 hours; how fast it depletes depends on conversation length, model used (Sonnet vs Opus), and tool use (web search, code execution, etc.)
- Weekly limit: a shared weekly cap across all Claude surfaces (claude.ai, Claude Code, Claude Desktop)
These limits are easy to forget about mid-flow, and hitting them unexpectedly can be disruptive, especially during long agentic Claude Code sessions. Having a live indicator in the terminal prompt would let users pace their usage proactively.
Summary
Add a built-in prompt segment for displaying Claude AI (claude.ai / Claude Code) usage limits, specifically the 5-hour session consumption and weekly usage remaining, similar to how p10k already surfaces context from tools like
kubectl,aws, andgcloud.Motivation
Claude has become a widely used AI assistant among developers, especially with the rise of Claude Code (the CLI agent). Claude enforces two rolling usage limits:
These limits are easy to forget about mid-flow, and hitting them unexpectedly can be disruptive, especially during long agentic Claude Code sessions. Having a live indicator in the terminal prompt would let users pace their usage proactively.