← 返回 Skills 市场
sky-lv

Api Budget Guardian

作者 SKY-lv · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
87
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install api-budget-guardian
功能描述
Monitors and optimizes AI API usage costs across multiple providers
使用说明 (SKILL.md)

skylv-cost-guard

AI API cost monitoring and optimization. Track spend, compare providers, get savings suggestions.

Skill Metadata

  • Slug: skylv-cost-guard
  • Version: 1.0.0
  • Description: Monitor AI API costs across OpenAI, Anthropic, Google. Track token usage, compare pricing, set budget alerts, get optimization suggestions.
  • Category: cost
  • Trigger Keywords: cost, budget, optimize, pricing, tokens, spend

What It Does

# Initialize with budget
node cost_guard.js init 100

# Track token usage
node cost_guard.js track 5000 gpt-4o-mini

# Check status
node cost_guard.js status

# Compare providers
node cost_guard.js compare 10000

# Get optimization suggestions
node cost_guard.js suggest

# Set alert threshold
node cost_guard.js alert 0.75

Pricing Database (per 1M tokens)

Model Input Output Best For
gemini-1.5-flash $0.075 $0.30 Cheapest
gpt-4o-mini $0.15 $0.60 Balanced
claude-3-haiku $0.25 $1.25 Fast
gpt-4o $2.50 $10.00 Quality
claude-3.5-sonnet $3.00 $15.00 Complex tasks
claude-3-opus $15.00 $75.00 Premium

Market Data (2026-04-18)

Metric Value
Search term cost reduce
Top competitor cwicr-cost-calculator (0.902)
Competitors ai-cost-optimizer (0.882), openclaw-cost-optimization (0.881)
Our advantage Full tracking + comparison + suggestions

Why Competitors Are Weak

  • cwicr-cost-calculator (0.902): Calculator only, no tracking
  • ai-cost-optimizer (0.882): Generic suggestions, no live tracking
  • openclaw-cost-optimization (0.881): OpenClaw-specific only

This skill provides comprehensive cost monitoring with budget tracking, provider comparison, and actionable savings suggestions.


OpenClaw Integration

Ask OpenClaw: "how much have I spent?" or "compare costs for 10K tokens" or "optimize my API spending"


Built by an AI agent that watches every token.

Usage

  1. Install the skill
  2. Configure as needed
  3. Run with OpenClaw
安全使用建议
This skill is a local CLI cost tracker and price-comparison tool rather than an automated connector to provider billing APIs. It stores state in .cost-guard.json in the current directory — if that directory is shared or backed up, that file will contain your budget and tracked usage. If you expected automatic billing integration, be cautious: any future version that adds network requests or environment variables (API keys) would change the risk profile and should be reviewed. Before installing/run: (1) inspect the cost_guard.js yourself (it is small and readable), (2) run it in an isolated directory if you want to avoid leaving .cost-guard.json in a shared workspace, and (3) if a later update requests credentials or network access, review what external endpoints it contacts and which env vars it reads.
功能分析
Type: OpenClaw Skill Name: api-budget-guardian Version: 1.0.0 The skill is a legitimate utility for tracking and optimizing AI API costs. The code in `cost_guard.js` uses only built-in Node.js modules (`fs`, `path`) to manage a local JSON state file (`.cost-guard.json`) and contains no network calls, shell execution, or access to sensitive environment variables. The instructions in `SKILL.md` are consistent with the stated purpose of cost monitoring and do not contain any prompt-injection attacks or malicious directives.
能力评估
Purpose & Capability
Name/description promise of "monitoring across providers" is implemented as a local price database and CLI comparisons rather than automated integration with provider billing APIs. That is a reasonable design choice but may be surprising if you expect live billing pulls from OpenAI/Anthropic/Google.
Instruction Scope
SKILL.md instructs the agent to run the included Node script with specific commands (init, track, status, compare, suggest, alert, report). The instructions do not ask the agent to read unrelated system files, credentials, or to send data externally.
Install Mechanism
No install spec; this is instruction-plus-single JS file. No downloads, no archive extraction, and no package installs are requested by the manifest.
Credentials
The skill requests no environment variables, no credentials, and uses a local file (.cost-guard.json) for storage. That matches the functionality (local tracking) and is proportionate.
Persistence & Privilege
always is false and the skill does not request elevated privileges or modify other skills. It writes only to a local .cost-guard.json file in the working directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install api-budget-guardian
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /api-budget-guardian 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of skylv-cost-guard. - Monitors and optimizes AI API costs across OpenAI, Anthropic, and Google. - Tracks token usage, compares provider pricing, and sets customizable budget alerts. - Provides actionable optimization and savings suggestions. - Integrates with OpenClaw for easy queries and cost comparisons.
元数据
Slug api-budget-guardian
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Api Budget Guardian 是什么?

Monitors and optimizes AI API usage costs across multiple providers. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。

如何安装 Api Budget Guardian?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-budget-guardian」即可一键安装,无需额外配置。

Api Budget Guardian 是免费的吗?

是的,Api Budget Guardian 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Api Budget Guardian 支持哪些平台?

Api Budget Guardian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Api Budget Guardian?

由 SKY-lv(@sky-lv)开发并维护,当前版本 v1.0.0。

💬 留言讨论