cost-governor
Skill by atlaspa
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/atlaspa/cost-governorWhat This Skill Does
Cost Governor by atlaspa is the first autonomous OpenClaw skill designed to bring fiscal responsibility to AI agents. It serves as a real-time monitor for LLM API expenditures, tracking costs across major providers including OpenAI, Anthropic, and Google. By acting as a sophisticated middleware, it intercept, calculates, and records costs for every agent transaction. The core innovation is its implementation of the x402 protocol, which enables agents to autonomously pay for their own Pro subscriptions using USDT on the Base chain. Beyond simple tracking, it functions as a fail-safe circuit breaker; if an agent approaches defined budget thresholds (hourly, daily, or monthly), the skill intervenes to prevent budget exhaustion or unexpected financial loss.
Installation
To integrate Cost Governor into your agent stack, use the following commands within your OpenClaw environment:
- Execute installation:
npm install - Finalize environment:
npm run setup - Alternatively, install via the repository registry:
clawhub install openclaw/skills/skills/atlaspa/cost-governor
Configuration is handled via ~/.openclaw/cost-governor/config.json, where you can set your hard budget caps and alert thresholds. Once installed, the skill automatically registers itself as a lifecycle hook for your provider requests.
Use Cases
Cost Governor is essential for developers scaling autonomous agents in production. It prevents runaway prompt chains from incurring massive costs due to infinite loops or misconfigured model parameters. It is also a perfect tool for organizations managing multiple agents where departmental budgets must be strictly enforced. Finally, it acts as a self-sustaining utility, allowing agents to manage their own premium status through autonomous crypto payments, reducing the overhead of manual subscription management.
Example Prompts
- "Check the current hourly spend and tell me if I am nearing my circuit breaker limit."
- "Generate a detailed report of my API costs over the last 7 days and export it to a file."
- "Open the web dashboard so I can visualize my spending trends and adjust my budget configuration."
Tips & Limitations
To maximize the utility of Cost Governor, ensure your wallet address is correctly configured in your environment variables for x402 payments. The circuit breaker is a powerful tool but should be tested in a sandbox environment before being set to a very low limit to prevent legitimate tasks from failing prematurely. Remember that it currently supports USDT on the Base chain, so ensure your agent's wallet has sufficient funds to cover the monthly 0.5 USDT fee for Pro features. If the agent loses network access, it may be unable to verify its subscription status or report costs accurately, so treat it as a critical infrastructure component.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-atlaspa-cost-governor": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, file-read, file-write, network-access
Related Skills
openclaw-egress
Skill by atlaspa
openclaw-warden
Skill by atlaspa
openclaw-security
Unified security suite for agent workspaces. Installs, configures, and orchestrates all 11 OpenClaw security tools in one command — integrity, secrets, permissions, network, audit trail, signing, supply chain, credentials, injection defense, compliance, and incident response.
openclaw-vault
Skill by atlaspa
context-optimizer
Skill by atlaspa