ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified finance Safety 4/5

cost-governor

Skill by atlaspa

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/atlaspa/cost-governor
Or

What 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:

  1. Execute installation: npm install
  2. Finalize environment: npm run setup
  3. 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

  1. "Check the current hourly spend and tell me if I am nearing my circuit breaker limit."
  2. "Generate a detailed report of my API costs over the last 7 days and export it to a file."
  3. "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

Author@atlaspa
Stars4473
Views2
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-atlaspa-cost-governor": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#finance#llm-ops#cost-management#autonomous-agents#x402
Safety Score: 4/5

Flags: external-api, file-read, file-write, network-access