context-window-tracker
Monitor and analyze real-time context window usage with visual bars and detailed token breakdowns.
skill install https://www.promptspace.in/skills/context-window-trackerOptimize Your AI Workflows
Context Window Tracker is a specialized utility for developers using OpenClaw who need to monitor token consumption in real-time. It prevents the sudden "context full" errors that derail complex coding sessions by providing transparency into exactly how your context budget is being spent.
What it does
The skill analyzes your active session transcript and system files to generate readable usage reports. It supports two modes:
- Compact: A one-line visual progress bar with vital stats (Total usage, % full, estimated turns remaining).
- Detailed: A deep-dive breakdown showing which specific files (like SOUL.md or TOOLS.md) are consuming the most tokens, alongside conversation history and framework overhead.
Why use this skill?
Unlike basic AI prompting which can only guess its usage, this tool reads the underlying session .jsonl files to provide accurate data. It includes a smart health indicator (Green/Yellow/Red) and provides contextual guidance on whether you have enough room to finish your current task or should start a fresh session.
Supported Features
- Per-file token breakdown for system prompts.
- Trend analysis to estimate remaining turns based on session velocity.
- Cache hit rate tracking for cost efficiency.
- Optional auto-check mode that triggers every 10 messages.
Use cases
- Monitor token usage with high-visibility color-coded status bars
- Identify which system files are consuming the most context window space
- Estimate how many messages remain before hitting the model context limit
- Enable automated context checks to run every 10 messages during long sessions
Example
Prompt
Output
π’ [ββββββββββββββββββββ] Context Usage: 113.7K / 202.8K (56%) Detailed Breakdown: β’ System Prompt: ~10.2K β’ Conversation: ~103.5K β’ Avg per turn: ~316 tokens β’ Estimated turns remaining: ~281 Guidance: Plenty of room to finish the current refactor.
Known limitations
Cant be used on agents with web UI's such as Chatgpt.com or Claude.ai. Best used in frameworks like Clawhub, Claude code etc