A professional analytics tool for Openclaw that scans session data to provide detailed breakdowns of token usage, cache efficiency, and costs.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install token-stats
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install token-stats using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Token Stats is a dedicated utility within the Openclaw Skills ecosystem designed to provide transparency into LLM consumption. It solves the common problem of inaccurate reporting by bypassing snapshots and performing a deep scan of raw session JSONL files, ensuring every API call is accounted for.
This skill is essential for developers and power users who need to monitor their expenses, evaluate the effectiveness of prompt caching, or identify which sessions are most resource-intensive. It uses a corrected calculation formula to handle edge cases where providers return negative input values, providing a ground truth for your Openclaw usage.
To start using this feature within your Openclaw Skills environment, ensure you have Python 3 installed. You can run the script directly using the following commands:
# Basic summary of all tokens
python3 {baseDir}/scripts/token_stats.py
# Get a detailed daily breakdown with session rankings
python3 {baseDir}/scripts/token_stats.py --daily --sessions
# Analyze a specific date range
python3 {baseDir}/scripts/token_stats.py --since 2026-03-01 --until 2026-03-16
Token Stats organizes data by extracting metrics from the entry.message.usage path within session files. It maps the following fields:
| Metric | Description | Logic |
|---|---|---|
| fresh_input | New tokens sent to API | max(input, 0) |
| prompt | Total prompt context | cacheRead + fresh_input |
| output | Generated tokens | raw output value |
| cacheRead | Tokens served from cache | raw cacheRead value |
| total | Comprehensive usage | prompt + output |
Files are scanned from ~/.openclaw/agents/<agent>/sessions/*.jsonl.
--include-deleted flag to scan .deleted and .bak files for a complete lifecycle view.--format json for custom data pipelines.--top flag to manage context window limits.Loading
An automated browser-use skill that navigates to URLs to identify, count, and categorize every form element and UI component on a page.

An AI-powered skill that analyzes git diffs to generate professional, standardized commit messages following the Conventional Commits specification.

A rigorous, 24-step roadmap based on MIT methodology to guide entrepreneurs from initial concept to a scalable, validated startup.

An automated Chinese document proofreading tool for Word that identifies punctuation errors, grammatical issues, and typos with high precision.

A comprehensive utility for querying social security records, housing fund balances, and calculating payroll deductions across major Chinese cities.

Pension is a privacy-focused command-line tool for logging financial entries, analyzing spending trends, and generating local reports.








































