Usage Tracker Skill for Openclaw

A robust utility for logging AI model consumption and generating detailed cost reports across multiple API providers.

punkaze
v1.0.0
Mar 2, 2026
0
785
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install usage-tracker

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 usage-tracker 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 Usage Tracker Skill?

The Usage Tracker Skill serves as a centralized observation deck for all your AI API interactions. By leveraging this tool within your Openclaw Skills collection, you can capture detailed telemetry on every request made to major providers like OpenAI, Anthropic, Google, and MiniMax. It is designed to bridge the gap between abstract token counts and actual financial impact.

This skill provides developers with the transparency needed to manage multi-model workflows. Whether you are running complex reasoning tasks on high-end models or high-volume data processing on mini models, the Usage Tracker ensures you have a precise audit trail of every token consumed and every cent spent.

Usage Tracker Skill Use Cases

  • Tracking expenditures across different AI providers from a single dashboard.
  • Auditing which specific tasks, such as coding or analysis, are driving the highest API costs.
  • Generating automated weekly or monthly financial reports for AI resource management.
  • Monitoring real-time usage via Telegram integration to avoid unexpected billing spikes.

How Usage Tracker Skill Works

  1. Every time an AI interaction occurs, the log_usage tool records the provider, model name, and token counts.
  2. The system categorizes the call based on task type to provide granular data insights.
  3. Data is appended to a persistent local storage file in JSONL format for easy parsing and durability.
  4. When a report is requested, the skill parses these logs and applies the current pricing schema for each model.
  5. Aggregated summaries are generated for the specified period, reflecting total costs and token distribution.

Usage Tracker Skill Setup

To start tracking your AI consumption with Openclaw Skills, ensure the skill is active in your environment. You can immediately begin logging and reporting using the following commands:

# Log a specific interaction
log_usage(provider="openai", model="gpt-4o", input_tokens=1000, output_tokens=500, task_type="coding")

# View your spending for the day
usage_report(period="daily")

No complex configuration is required as the skill comes pre-loaded with current pricing for all major LLM providers.

Usage Tracker Skill Data Schema & Taxonomy

The skill organizes its data using a structured JSONL format to ensure high performance and compatibility with data analysis tools.

Attribute Type Description
Storage Location File usage-logs/api-cells.jsonl
Provider String The API source (e.g., Anthropic, xAI, Google)
Model String The specific model identifier
Tokens Integer Input and Output counts
Task Type String Contextual tag (e.g., reasoning, general, analysis)

Usage Tracker Skill Advanced Features

  • Support for a wide array of providers including MiniMax, Mistral, xAI, and Voyage.
  • Integrated Telegram bot support for remote monitoring using the /usage and /cost commands.
  • Automated cost calculation based on the latest per-million-token pricing for models like GPT-4.5 and Claude 3.5 Sonnet.
  • Detailed filtering capabilities to isolate usage by specific model families or task categories.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*