Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Estimates and displays a breakdown of the current context window, showing how many tokens each component (system prompt, workspace files, messages, free space) is consuming. Uses a Python script for file token estimation and the session_status tool for live context data. Also lists memory files stored on disk that aren't currently loaded.
Gives a per-component token breakdown rather than just a single usage percentage, so you can pinpoint exactly what to trim.
When to use it
- Checking how full the context is before a long task
- Diagnosing which workspace files are eating the most tokens
- Deciding when to compact or clear context
- Auditing memory accumulation across sessions
- Comparing token usage across different model context sizes
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: how full is my context right now?
- 1Call session_status to get model, tokens used, tokens total, and compaction count
- 2Run scripts/estimate_tokens.py against the workspace path to get per-file token estimates
- 3Subtract file tokens and system overhead from total context used to estimate message tokens
- 4Calculate free space as total minus used
- 5Render the monospace bar chart with proportional ░ blocks per component
A formatted context breakdown showing ~Xk tokens per component with bar lengths scaled to percentage of total context, followed by a memory-on-disk inventory grouped by category