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

cost-governor

Pre-flight cost estimation for subagent spawns and approval gates. Prevents API overspend and surprise billing. Budget control for sessions_spawn calls. Daily spend tracking. Essential for multi-agent OpenClaw deployments.

Why use this skill?

Stop surprise AI bills with the OpenClaw cost-governor. Get pre-flight cost estimates, budget tracking, and mandatory approval gates for all your subagent tasks.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/donovanpankratz-del/openclaw-cost-governor
Or

What This Skill Does

The cost-governor skill is a critical safeguard for OpenClaw agents operating in environments where API costs can quickly escalate. It acts as an intelligent budget intermediary between your agent and the AI models, providing a pre-flight cost estimation layer that triggers an approval gate for any subagent task projected to exceed $0.50. By leveraging a structured cost model, the tool applies task-specific multipliers—such as 7.5x for creative writing and 3x for research—to raw token estimates, ensuring that historical context informs every projection. It maintains an automated, transparent ledger of all expenditure in a dedicated Markdown file, allowing for daily and monthly budget reconciliation and preventing 'surprise' bills.

Installation

To integrate cost-governor, run the installation command provided in the skill registry. After installation, you must initialize the local tracking infrastructure. First, create the storage directory and tracking file by executing mkdir -p ~/.openclaw/workspace/notes && touch ~/.openclaw/workspace/notes/cost-tracking.md. Next, populate the file with the standard header containing columns for Date, Task, Model, Estimate, Actual, and Ratio. Finally, define your operational risk tolerance by appending DAILY_BUDGET=20.00 (or your preferred limit) to the .env file located in ~/.openclaw/workspace/.

Use Cases

This skill is indispensable for long-running agent workflows involving complex research, recursive subagent spawning, or generative content creation. Use it to enforce fiscal discipline during exploratory AI sessions. It is particularly effective for 'multi-agent orchestration' where one master agent might attempt to spawn multiple subagents concurrently; without this governor, such branching logic could trigger significant API consumption across expensive models like Claude Opus or GPT-4.

Example Prompts

  1. "Perform a deep-dive market analysis on sustainable energy startups. (Note: Please run the cost-governor check before spawning the research subagent)."
  2. "I need to draft a series of creative blog posts about AI ethics. Estimate the budget for this using the creative task multiplier before starting."
  3. "Summarize my total expenditure for today and let me know how much room I have left in my $20 daily budget."

Tips & Limitations

Always review the cost-tracking.md file periodically to recalibrate your multipliers; if your agent consistently underestimates, adjust the multipliers in the configuration to better match your actual usage patterns. Note that this skill provides an estimate, not a real-time API billing read; it cannot stop an API call once the request has been dispatched to the provider. Ensure your system clocks are synchronized to maintain accurate logs in the tracking file.

Metadata

Stars2387
Views1
Updated2026-03-09
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-donovanpankratz-del-openclaw-cost-governor": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#budgeting#ai-cost-control#governance#agent-management
Safety Score: 5/5

Flags: file-write, file-read