ClawCost for Openclaw

A financial tracking utility for AI agents that monitors token costs, budget limits, and model-specific expenditures.

shallify
v1.0.2
Feb 13, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install clawcost

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 clawcost 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 ClawCost?

ClawCost is a robust budget management utility designed specifically for users of Openclaw Skills. It provides deep visibility into the financial overhead of running AI agents by tracking token consumption and translating it into real-world currency. The skill allows developers to maintain a clear overview of their spending patterns across different Large Language Models such as Claude 3 Sonnet, Haiku, and Opus.

By integrating this skill into your workflow, you gain the ability to set hard daily budgets and track your remaining balance in real-time. It acts as a financial watchdog, ensuring that automated coding tasks do not lead to unexpected API bills. Whether you are managing a small personal project or a large-scale automation suite, this tool provides the necessary transparency to keep your AI operations sustainable.

ClawCost Use Cases

  • Monitoring daily AI spending to ensure it stays within a predefined dollar limit.
  • Analyzing model efficiency by comparing the cost-to-output ratio of Sonnet versus Haiku.
  • Receiving automated alerts when the daily budget threshold reaches critical levels.
  • Tracking all-time token usage and expenses for long-term project accounting.
  • Forecasting future AI costs based on the last seven days of activity.

How ClawCost Works

  1. The user triggers the script via the command line, optionally defining a daily budget or an initial account balance.
  2. The skill parses execution logs to calculate the cost of tokens consumed by various models based on current pricing.
  3. It aggregates the data into categories including daily, weekly, and all-time expenditures.
  4. The system compares the current day's spending against the user-defined budget and the total account balance.
  5. A structured JSON report is generated and then rendered into a human-readable tree-style visualization with status indicators and alerts.

ClawCost Setup

To utilize this skill within the Openclaw Skills framework, ensure you have Python 3 installed. You can check your status or update your balance using the following commands:

# Check your current spending against a $10 daily budget
python3 scripts/clawcost.py --budget 10

# Initialize or update your total account balance
python3 scripts/clawcost.py --set-balance 50.00

ClawCost Data Schema & Taxonomy

ClawCost organizes financial data into a comprehensive schema to provide clarity on usage within Openclaw Skills. The data is structured as follows:

Object Description
balance Tracks initial top-up, total spent, and remaining funds.
today Monitors current day cost, budget limits, and percentage of budget used.
week Provides a rolling 7-day total of all expenditures.
total An all-time summary of costs and total tokens processed.
models A percentage-based breakdown of spending per specific AI model.
daily A historical log of costs for each individual day in the past week.

ClawCost Advanced Features

  • Intelligent Alerting: Displays high-priority warnings when daily budget usage exceeds 80% or 100%.
  • Model Breakdown Insights: Automatically identifies which models are most expensive and suggests cheaper alternatives like Haiku when over budget.
  • Low Balance Notifications: Triggers a warning when the remaining account balance falls below $5.00.
  • Visual Tree Output: Uses clean ASCII tree formatting for easy terminal viewing of complex financial data.
  • Context-Aware Reporting: Delivers short summaries for quick queries and detailed breakdowns for deeper analysis.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*