An essential utility among Openclaw Skills that analyzes local usage logs to monitor, project, and optimize your LLM API token spend without sharing your data.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install token-cockpit
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-cockpit using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Token Cockpit is a lightweight, local-first utility built to help developers audit, forecast, and dramatically reduce their LLM token bills. While running AI agents is incredibly powerful, it often leads to unexpected API costs when the monthly invoice lands. As one of the premier Openclaw Skills for financial observability, Token Cockpit turns standard local usage logs into a comprehensive breakdown of where your budget is being spent and, more importantly, where it is being wasted.
The tool computes everything completely on your local machine, meaning no sensitive data or API keys ever leave your local environment. It addresses the observability gaps in modern AI agent deployments by offering automated reporting, custom budget tracking with alerts, and intelligent suggestions on how to route tasks to cheaper LLMs without losing performance.
usage.jsonl). It tolerates various structures and handles multiple token schema variations.pricing.json configuration.--json) for automated ingestion or dashboard visualization.To start optimizing your spend with one of the most practical Openclaw Skills, set up the script locally:
Run basic reports, set budgets, or check routes:
# Generate a spending and usage report for the last 30 days
python token_cockpit.py report --logs ~/.openclaw/usage.jsonl --days 30
# Check spending against a $50 limit for the month
python token_cockpit.py budget --limit 50 --period month --logs ~/.openclaw/usage.jsonl
# Identify optimization opportunities for small token queries
python token_cockpit.py route --logs ~/.openclaw/usage.jsonl --small-tokens 2000
# Simulate migrating from a premium model to a cost-effective alternative
python token_cockpit.py simulate --from claude-opus --to claude-haiku --logs ~/.openclaw/usage.jsonl
To ensure exact calculations, provide a custom pricing.json to override default USD pricing (per million tokens):
{
"claude-opus": {"input": 15.0, "output": 75.0},
"claude-haiku": {"input": 1.0, "output": 5.0},
"gpt-4o-mini": {"input": 0.15, "output": 0.60}
}
Pass the file to any command using the pricing flag:
python token_cockpit.py report --logs ~/.openclaw/usage.jsonl --pricing pricing.json
Token Cockpit operates flexibly on standard JSONL or JSON log formats, searching for key nested metadata blocks. Below is the structured taxonomy utilized by the tool:
| Field Name (Variants) | Description |
|---|---|
input_tokens / prompt_tokens / tokens_in |
Count of tokens sent to the LLM (Input/Prompt) |
output_tokens / completion_tokens / tokens_out |
Count of tokens generated by the LLM (Output/Completion) |
usage |
Nested JSON object commonly holding token count attributes |
| Parameter | Type | Unit | Description |
|---|---|---|---|
input |
Float | USD / Million Tokens | Cost per million input/prompt tokens |
output |
Float | USD / Million Tokens | Cost per million output/completion tokens |
--json to any execution to convert command-line reports into raw JSON datasets, enabling seamless integration with monitoring scripts and custom alerts.Loading
Skill Doctor is an offline developer tool to audit, debug, resolve conflicts, and secure your installed Openclaw Skills without external API keys.

A free, automated content preview tool that generates a 1-week, 3-post social media schedule customized for a single platform based on your brand topic.

An AI-powered assistant designed to safely diagnose, audit, and manage Facebook and Instagram advertising campaigns through NotFair's hosted MCP server.

An intelligent utility to extract clean project hierarchies, full codebases, and snippet fragments from shared DeepSeek chat links using headless browser rendering.

An advanced quantitative analysis and strategy simulation engine designed to deliver real-time trading signals and historical backtesting insights directly to AI agents.

A defensive security skill that checks emails and usernames against the 3.2 billion leaked credentials in the COMB dataset.








































