A powerful monitoring and budgeting tool for tracking token consumption and USD costs across Openclaw Skills sessions.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install openclaw-cost-guard
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 openclaw-cost-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
OpenClaw Cost Guard is an essential utility designed to provide transparent financial oversight for AI agent operations. By parsing session JSONL logs, it extracts real-time token usage and cost data, allowing developers to maintain strict control over their API spend. Whether you are running a single agent or a fleet, this skill ensures you never encounter unexpected billing surprises within the Openclaw Skills ecosystem.
The tool emphasizes data-driven decision-making by offering detailed reports on daily and weekly expenditures. Beyond just reporting, it enables the enforcement of hard budgets and provides a token-saving playbook to guide agents toward more concise, cost-effective interactions. This makes it an indispensable asset for developers who need to balance agent performance with financial efficiency.
Ensure your session logs are available in the standard Openclaw Skills directory. You can then use the provided script for various reporting tasks:
# Track costs for the last 7 days
python3 scripts/extract_cost.py --last-days 7
# Set a budget check for today and exit with code 2 if exceeded
python3 scripts/extract_cost.py --today --budget-usd 5
For providers that do not return cost metadata, set your pricing via environment variables:
export PRICE_INPUT=1.75
export PRICE_OUTPUT=14
python3 scripts/extract_cost.py --today
The skill organizes reporting data by parsing the JSONL session logs. The following data points are prioritized:
| Attribute | Description |
|---|---|
| usage.cost | The primary metric for real USD spend reported by the API. |
| usage.tokens | Detailed breakdown of input, output, and cache tokens. |
| session_id | Derived from the folder structure to group costs by task. |
| timestamp | Used to aggregate daily and weekly summary reports. |
Loading
A specialized skill for scheduling and executing automated updates for the OpenClaw core and its installed skill ecosystem.

An advanced GoHighLevel automation expert providing verified actions, triggers, and comprehensive API schemas for workflow planning.

A comprehensive bridge connecting AI agents to the Echo AI platform for managing customer engagement, lead qualification, and automated support assistants.

Identify whether a digital profile is an Agent, Human, Cron, or Hybrid by analyzing the rhythmic heartbeat of its posting patterns.

A specialized tool for automatically generating detailed construction cost estimates by mapping pricing rules to BIM and QTO data.

A professional Python-based utility for extracting, grouping, and reporting measurable quantities from BIM models for construction cost estimation.








































