โ† All skills
Tencent SkillHub ยท Productivity

Cost Guardian

Track, analyze, and optimize AI and infrastructure costs with budgeting, spend forecasts, token usage scans, and optimization suggestions.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Track, analyze, and optimize AI and infrastructure costs with budgeting, spend forecasts, token usage scans, and optimization suggestions.

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, scripts/cost-guardian.py

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 15 sections Open source page

cost-guardian โ€” AI & Infrastructure Cost Tracker

Track, analyze, and optimize the total cost of running your AI agent and infrastructure. Budget alerts, spend forecasts, and concrete optimization recommendations.

Initialize

python scripts/cost-guardian.py init Creates config and database in ~/.openclaw/workspace/costs/.

Track a Cost Entry

# Track API spend python scripts/cost-guardian.py track --provider openai --amount 12.50 --currency USD --period monthly --category api # Track infrastructure cost python scripts/cost-guardian.py track --provider hetzner --amount 5.00 --currency EUR --period monthly --category hosting # Track one-time cost python scripts/cost-guardian.py track --provider cloudflare --amount 10.00 --currency USD --period once --category domain # Track electricity python scripts/cost-guardian.py track --provider electricity --amount 15.00 --currency EUR --period monthly --category power

Scan Token Usage from Gateway Logs

# Scan recent gateway logs for token consumption per model python scripts/cost-guardian.py scan-tokens # Scan specific days python scripts/cost-guardian.py scan-tokens --days 7

Set Budget

# Monthly budget python scripts/cost-guardian.py budget --monthly 50.00 --currency EUR # Budget with alert threshold (alert at 80%) python scripts/cost-guardian.py budget --monthly 50.00 --alert-pct 80

Cost Report

# Current month report python scripts/cost-guardian.py report # Weekly report python scripts/cost-guardian.py report --period week # JSON output python scripts/cost-guardian.py report --json # Specific month python scripts/cost-guardian.py report --month 2026-02

Optimization Recommendations

# Get optimization suggestions python scripts/cost-guardian.py optimize # JSON output python scripts/cost-guardian.py optimize --json

Forecast Spend

# Forecast next 3 months python scripts/cost-guardian.py forecast # Forecast next N months python scripts/cost-guardian.py forecast --months 6 # JSON output python scripts/cost-guardian.py forecast --json

Manage Subscriptions

# Add a subscription python scripts/cost-guardian.py sub add --name "OpenRouter" --amount 20.00 --currency USD --cycle monthly --renews 2026-03-15 --category api # List subscriptions python scripts/cost-guardian.py sub list # Remove a subscription python scripts/cost-guardian.py sub remove --name "OpenRouter" # Check upcoming renewals python scripts/cost-guardian.py sub upcoming --days 14

Status Dashboard

# Quick status overview python scripts/cost-guardian.py status # JSON output python scripts/cost-guardian.py status --json

Categories

api โ€” AI model API costs (OpenAI, Anthropic, OpenRouter, etc.) hosting โ€” VPS, cloud, domain, DNS power โ€” Electricity for homelab subscription โ€” SaaS subscriptions hardware โ€” One-time hardware purchases other โ€” Everything else

Output Modes

All commands support: Human-readable (default) โ€” colored terminal output JSON (--json) โ€” structured data for programmatic use

Cron Integration

Add to OpenClaw cron for automated cost tracking: Daily: scan-tokens to track API usage Weekly: report --period week for digest Monthly: report + forecast for full analysis On-demand: optimize when looking to cut costs

Data Storage

All data stored in ~/.openclaw/workspace/costs/: config.json โ€” budget settings, preferences costs.db โ€” SQLite database (entries, subscriptions, token scans)

Zero Dependencies

Pure Python 3 stdlib โ€” no pip install needed. Uses sqlite3, json, datetime, pathlib.

Category context

Workflow acceleration for inboxes, docs, calendars, planning, and execution loops.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
1 Docs1 Scripts
  • SKILL.md Primary doc
  • scripts/cost-guardian.py Scripts