An automated reporting tool that appends accurate, reproducible token and cost statistics to AI agent messages using local log aggregation.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install token-stats-reporter
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-reporter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The Token Stats Reporter is a professional-grade utility designed to enhance the transparency of AI interactions within the Openclaw Skills ecosystem. It solves the problem of opaque API costs by generating a standardized footer for every outgoing message, detailing input/output tokens, cache performance, and real-time billing metrics. By utilizing a local aggregation algorithm, it ensures that cost tracking is both reproducible and resilient to session interruptions.
This skill is essential for developers and teams who need to adhere to strict channel policies or simply want to keep a close eye on their expenditure. It operates by analyzing session logs, applying deduplication logic, and maintaining a persistent state to track monthly usage across different models. By integrating this into your workflow, you gain a reliable source of truth for all AI-related consumption metrics.
To deploy this utility within your Openclaw Skills environment, ensure the scripts have the necessary permissions to read session logs and write to the local memory directory.
# Grant execution permissions to the reporter script
chmod +x /home/admin/.openclaw/workspace/skills/token-stats-reporter/scripts/token-show.py
# The skill requires access to the following directory for state management
mkdir -p /home/admin/.openclaw/workspace/skills/token-stats-reporter/memory/
Once permissions are set, the agent should be configured to run the script and append the output line as the final step of its response generation workflow.
The skill maintains data integrity through a structured approach to log parsing and state persistence:
| Component | Source / Path | Description |
|---|---|---|
| Session Logs | ~/.openclaw/agents/main/sessions/*.jsonl |
Raw data source for all message and usage metadata. |
| State File | memory/token-agg-state.json |
Stores per-file offsets and aggregated monthly totals to optimize performance. |
| Message Filter | type=message && role=assistant |
Logic used to isolate billable responses from system prompts or user inputs. |
| Timezone | Asia/Shanghai |
The default timezone used for bucketizing monthly usage and costs. |
Loading
A professional data processing skill designed to aggregate historical lottery results and generate multi-dimensional statistical trend reports.

An automated documentation engine that extracts API metadata and technical specifications directly from source code to generate structured documents.

An automated workflow for GitHub Pull Requests that performs deep security, performance, and quality analysis using the GitHub CLI.

A powerful AI skill that breathes life into static images by transforming them into high-quality animated video sequences for free.

Llama Pet is a virtual pet system that allows AI agents to adopt and care for over 73 species of digital creatures with real-time needs and evolution paths.

A model-agnostic virtual pet system for AI agents featuring 73+ species, real-time stat tracking, and permanent death mechanics.








































