Token Tracker for Openclaw

An automated utility for tracking, analyzing, and reporting API token consumption and costs.

timyljob2011-sudo
v1.0.0
Mar 19, 2026
0
761
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install token-tracker-daily

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install token-tracker-daily using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Token Tracker?

Token Tracker is a specialized tool designed to monitor and manage API token usage across your AI interactions. It automatically records input and output tokens for every session, providing a clear window into your consumption patterns and helping you plan your usage budget effectively.

Beyond simple logging, the skill utilizes historical data to analyze trends and provide month-end forecasts. This ensures that developers and teams can maintain cost control, identify unusual spikes in usage, and optimize their prompts or model selections based on factual data provided within the ecosystem of Openclaw Skills.

Token Tracker Use Cases

  • Monitoring individual usage habits to understand personal AI consumption patterns.
  • Tracking team-wide token exhaustion to manage shared API budgets and quotas.
  • Real-time cost control to prevent unexpected overage charges from API providers.
  • Optimizing LLM workflows by identifying high-consumption sessions that require context pruning.

How Token Tracker Works

  1. The skill logs input and output token counts after every session using a Python-based execution script.
  2. Data is persisted locally in a structured JSON format, aggregating multiple sessions into daily totals.
  3. Analysis scripts process the raw logs to calculate percentage changes, identify peak usage days, and detect anomalies.
  4. Reporting engines generate Markdown-formatted tables and visual trend indicators (up/down arrows).
  5. An optional cron-based scheduler pushes these reports to the user at specified intervals.

Token Tracker Setup

To integrate Token Tracker into your environment, follow these steps:

  1. Copy the skill to your local directory:
cp -r token-tracker /path/to/openclaw/skills/
  1. Grant execution permissions to the Python scripts:
chmod +x /path/to/openclaw/skills/token-tracker/scripts/*.py
  1. Restart your agent or reload your configuration to activate the Openclaw Skills integration.

Token Tracker Data Schema & Taxonomy

Token data is stored in data/token_log.json. The structure maintains daily summaries and granular session details:

Field Type Description
date String ISO 8601 format date (YYYY-MM-DD)
input Integer Total input tokens for the day
output Integer Total output tokens for the day
total Integer Sum of input and output tokens
sessions Array List of objects containing time, input, and output

Example session entry: {"time": "09:00", "input": 1200, "output": 800}

Token Tracker Advanced Features

  • Trend Indicators: Visual markers like 📈 (Up), 📉 (Down), and 🔥 (Anomaly) based on percentage deviations.
  • Automated Scheduling: Built-in support for cron tasks to deliver daily summaries at 22:00 or weekly reports on Monday mornings.
  • Monthly Forecasting: Predictive modeling that estimates total monthly consumption based on the current run rate.
  • Local Privacy: All consumption data is stored locally on your machine and never uploaded to external servers.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*