Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计通过

openclaw-cost-governorOpenClaw cost governor 搜索

Agent Skill

openclaw-cost-governor 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

21,432

周安装

902

GitHub Stars

公开资料未说明

下载量

7,505
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-cost-governor(OpenClaw cost governor 搜索)
来源仓库:https://github.com/donovanpankratz-del/openclaw-cost-governor
安装命令:
openclaw skills install openclaw-cost-governor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openclaw-cost-governor

简介

预估子代理生成成本并防止 API 超支和意外计费。

  • 适用于预算控制和 session_spawn 调用前的费用预审。
  • 安装后可在 OpenClaw 中建立经济约束机制。
  • 使用前需配置预算上限和计费接口访问权限。openclaw-cost-governor 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 建议设置多级预警阈值以应对突发高消耗任务。

SKILL.md

name
cost-governor
version
1.0.0
description
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.
homepage
https://clawhub.com
changelog
Initial release - Pre-flight gates, historical multipliers, spend tracking
metadata
openclaw
emoji
💰
requires
bins
[]
os

Cost Governor - Subagent Cost Control

Pre-flight cost checks before spawning subagents. Tracks spend. Gates expensive operations. Prevents surprise $300+ bills.

Files Included

  • SKILL.md — This file (agent instructions)
  • README.md — Human-readable setup guide
  • cost-tracking-template.md — Copy this to notes/cost-tracking.md to get started
  • lib/cost-tracker.js — Core estimation and logging library
  • bin/cost-summary.js — CLI: daily/monthly spend summary

Problem Solved

You spawn a subagent for "research passive income ideas" on Opus. 30 minutes later: $12 gone. This skill estimates cost before execution, requires approval for expensive tasks (>$0.50), and tracks all spend.

When to Use

  • Before spawning any subagent — estimate cost, log it
  • Daily spend review — summarize costs vs budget
  • Post-task reconciliation — compare estimated vs actual

Core Rules

  1. Every subagent spawn >$0.50 estimated requires explicit user approval
  2. All spawns get logged to $WORKSPACE/notes/cost-tracking.md
  3. Estimates use multipliers from historical data (see Cost Model)
  4. No silent expensive operations — always surface cost before execution

Cost Model

Based on historical data from cost-tracking.md:

Task TypeBase EstimateMultiplierEffective Estimate
Creative (open-ended)Token estimate7.5xApply to all creative tasks
Research (bounded)Token estimate3xWeb search + synthesis
Technical (structured)Token estimate2xCode, config, structured output
Simple (template)Token estimate1.5xFill-in, short responses

Model cost rates (approximate per 1K tokens):

  • Claude Opus: ~$0.075 input / $0.375 output
  • Claude Sonnet: ~$0.003 input / $0.015 output
  • GPT-4: ~$0.03 input / $0.06 output
  • Grok 4.1 Fast Reasoning: ~$0.003 input / $0.015 output
  • Claude Haiku 4.5: ~$0.0008 input / $0.004 output

Estimation Formula

estimated_cost = (estimated_output_tokens / 1000) * output_rate * task_multiplier

Example:

  • Task: Creative writing (5000 tokens estimated on Opus)
  • Calculation: (5000 / 1000) * $0.375 * 7.5 = $14.06
  • Action: Require approval (>$0.50 threshold)

Setup

  1. Create cost tracking file:
mkdir -p ~/.openclaw/workspace/notes
touch ~/.openclaw/workspace/notes/cost-tracking.md
  1. Add header to cost-tracking.md:
# Cost Tracking Log

| Date | Task | Model | Est. | Actual | Ratio | Notes |
|------|------|-------|------|--------|-------|-------|
  1. Set your daily budget (optional):
echo "DAILY_BUDGET=20.00" >> ~/.openclaw/workspace/.env

Usage

Pre-Flight Check (Before Spawning)

User: "Research passive income methods"
Agent: Checking cost... Estimated $3.50 (Research task, Opus, ~3K tokens * 3x multiplier). Approve?
User: Yes
Agent: [spawns, logs to cost-tracking.md]

Daily Spend Dashboard

Run manually or via cron:

## Daily Spend — 2026-02-21
| Task | Model | Est. | Actual | Ratio |
|------|-------|------|--------|-------|
| PassiveIncomeResearch | Opus | $3.50 | $4.20 | 1.2x |
| AIHardwareResearch | Sonnet | $0.80 | $0.65 | 0.8x |
**Total:** $4.30 est / $4.85 actual
**Budget remaining:** $15.15 / $20.00 daily

Post-Task Reconciliation

After each subagent completes:

  1. Check actual cost (if available via /status)
  2. Log to cost-tracking.md
  3. Update multipliers if ratio is consistently off

Triggers

  • Pre-spawn gate: Before sessions_spawn, estimate and log. If >$0.50, ask user.
  • Cron (daily, optional): Summarize daily spend, flag overruns.
  • Post-task: Log actual cost, update multipliers if data available.

Approval Gate Flow

  1. Estimate cost using model + task type + multiplier
  2. If estimate ≤ $0.50 → proceed, log silently
  3. If estimate > $0.50 → present estimate to user, wait for "approve" / "yes"
  4. Log decision (approved/rejected/modified) to tracking file

Budget Alerts

Set a daily budget cap. When spend exceeds it, the agent stops spawning and notifies you.

Setup: Add to your workspace config or mention it in system prompt:

"Daily API budget: $XX. Stop spawning subagents if estimated total exceeds this."

Cron-based daily summary (optional): Add to your cron:

# Daily cost summary at 11 PM
0 23 * * * node ~/.openclaw/workspace/skills/cost-governor/bin/cost-summary.js --daily

Anti-Patterns (What NOT to Do)

  • ❌ Spawning Opus for simple lookups (use Sonnet or Haiku)
  • ❌ Open-ended creative tasks without cost ceiling ("write a novel")
  • ❌ Multiple subagents when one suffices
  • ❌ Skipping post-task reconciliation
  • ❌ Ignoring consistent ratio mismatches (update multipliers!)

Advanced: Custom Multipliers

Edit multipliers in your cost-tracking.md header:

## Multipliers (Updated 2026-02-21)
- Creative: 10x (our tasks run long)
- Research: 2.5x (bounded queries)

Agent reads these on each check.

Integration with Other Skills

  • sessions_spawn: Always run cost check before spawning
  • AGENTS.md: Log cost in agent entry ("Last used: $X.XX")
  • Cron jobs: Wrap expensive recurring tasks with cost gates

Troubleshooting

Q: Estimates are consistently off A: Update multipliers in cost-tracking.md based on actual ratios.

Q: How do I get actual costs? A: Use /status after subagent completes, or check provider dashboard.

Why This Matters

Real story from r/LocalLLM (Jan 2026):

"Left my OpenClaw agent running overnight. Spawned 8 research subagents on Opus. Woke up to $340 API bill. This skill would've saved me."

Don't be that person.


Author: OpenClaw Community License: MIT Requires: OpenClaw with subagent support, notes/ directory

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.49%
按下载量换算7,016

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install openclaw-cost-governor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills