{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cost-guardian",
    "name": "Cost Guardian",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/mariusfit/cost-guardian",
    "canonicalUrl": "https://clawhub.ai/mariusfit/cost-guardian",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/cost-guardian",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cost-guardian",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/cost-guardian.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cost-guardian"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/cost-guardian",
    "agentPageUrl": "https://openagent3.xyz/skills/cost-guardian/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cost-guardian/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cost-guardian/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "cost-guardian — AI & Infrastructure Cost Tracker",
        "body": "Track, analyze, and optimize the total cost of running your AI agent and infrastructure. Budget alerts, spend forecasts, and concrete optimization recommendations."
      },
      {
        "title": "Initialize",
        "body": "python scripts/cost-guardian.py init\n\nCreates config and database in ~/.openclaw/workspace/costs/."
      },
      {
        "title": "Track a Cost Entry",
        "body": "# Track API spend\npython scripts/cost-guardian.py track --provider openai --amount 12.50 --currency USD --period monthly --category api\n\n# Track infrastructure cost\npython scripts/cost-guardian.py track --provider hetzner --amount 5.00 --currency EUR --period monthly --category hosting\n\n# Track one-time cost\npython scripts/cost-guardian.py track --provider cloudflare --amount 10.00 --currency USD --period once --category domain\n\n# Track electricity\npython scripts/cost-guardian.py track --provider electricity --amount 15.00 --currency EUR --period monthly --category power"
      },
      {
        "title": "Scan Token Usage from Gateway Logs",
        "body": "# Scan recent gateway logs for token consumption per model\npython scripts/cost-guardian.py scan-tokens\n\n# Scan specific days\npython scripts/cost-guardian.py scan-tokens --days 7"
      },
      {
        "title": "Set Budget",
        "body": "# Monthly budget\npython scripts/cost-guardian.py budget --monthly 50.00 --currency EUR\n\n# Budget with alert threshold (alert at 80%)\npython scripts/cost-guardian.py budget --monthly 50.00 --alert-pct 80"
      },
      {
        "title": "Cost Report",
        "body": "# Current month report\npython scripts/cost-guardian.py report\n\n# Weekly report\npython scripts/cost-guardian.py report --period week\n\n# JSON output\npython scripts/cost-guardian.py report --json\n\n# Specific month\npython scripts/cost-guardian.py report --month 2026-02"
      },
      {
        "title": "Optimization Recommendations",
        "body": "# Get optimization suggestions\npython scripts/cost-guardian.py optimize\n\n# JSON output\npython scripts/cost-guardian.py optimize --json"
      },
      {
        "title": "Forecast Spend",
        "body": "# Forecast next 3 months\npython scripts/cost-guardian.py forecast\n\n# Forecast next N months\npython scripts/cost-guardian.py forecast --months 6\n\n# JSON output\npython scripts/cost-guardian.py forecast --json"
      },
      {
        "title": "Manage Subscriptions",
        "body": "# Add a subscription\npython scripts/cost-guardian.py sub add --name \"OpenRouter\" --amount 20.00 --currency USD --cycle monthly --renews 2026-03-15 --category api\n\n# List subscriptions\npython scripts/cost-guardian.py sub list\n\n# Remove a subscription\npython scripts/cost-guardian.py sub remove --name \"OpenRouter\"\n\n# Check upcoming renewals\npython scripts/cost-guardian.py sub upcoming --days 14"
      },
      {
        "title": "Status Dashboard",
        "body": "# Quick status overview\npython scripts/cost-guardian.py status\n\n# JSON output  \npython scripts/cost-guardian.py status --json"
      },
      {
        "title": "Categories",
        "body": "api — AI model API costs (OpenAI, Anthropic, OpenRouter, etc.)\nhosting — VPS, cloud, domain, DNS\npower — Electricity for homelab\nsubscription — SaaS subscriptions\nhardware — One-time hardware purchases\nother — Everything else"
      },
      {
        "title": "Output Modes",
        "body": "All commands support:\n\nHuman-readable (default) — colored terminal output\nJSON (--json) — structured data for programmatic use"
      },
      {
        "title": "Cron Integration",
        "body": "Add to OpenClaw cron for automated cost tracking:\n\nDaily: scan-tokens to track API usage\nWeekly: report --period week for digest\nMonthly: report + forecast for full analysis\nOn-demand: optimize when looking to cut costs"
      },
      {
        "title": "Data Storage",
        "body": "All data stored in ~/.openclaw/workspace/costs/:\n\nconfig.json — budget settings, preferences\ncosts.db — SQLite database (entries, subscriptions, token scans)"
      },
      {
        "title": "Zero Dependencies",
        "body": "Pure Python 3 stdlib — no pip install needed. Uses sqlite3, json, datetime, pathlib."
      }
    ],
    "body": "cost-guardian — AI & Infrastructure Cost Tracker\n\nTrack, analyze, and optimize the total cost of running your AI agent and infrastructure. Budget alerts, spend forecasts, and concrete optimization recommendations.\n\nCommands\nInitialize\npython scripts/cost-guardian.py init\n\n\nCreates config and database in ~/.openclaw/workspace/costs/.\n\nTrack a Cost Entry\n# Track API spend\npython scripts/cost-guardian.py track --provider openai --amount 12.50 --currency USD --period monthly --category api\n\n# Track infrastructure cost\npython scripts/cost-guardian.py track --provider hetzner --amount 5.00 --currency EUR --period monthly --category hosting\n\n# Track one-time cost\npython scripts/cost-guardian.py track --provider cloudflare --amount 10.00 --currency USD --period once --category domain\n\n# Track electricity\npython scripts/cost-guardian.py track --provider electricity --amount 15.00 --currency EUR --period monthly --category power\n\nScan Token Usage from Gateway Logs\n# Scan recent gateway logs for token consumption per model\npython scripts/cost-guardian.py scan-tokens\n\n# Scan specific days\npython scripts/cost-guardian.py scan-tokens --days 7\n\nSet Budget\n# Monthly budget\npython scripts/cost-guardian.py budget --monthly 50.00 --currency EUR\n\n# Budget with alert threshold (alert at 80%)\npython scripts/cost-guardian.py budget --monthly 50.00 --alert-pct 80\n\nCost Report\n# Current month report\npython scripts/cost-guardian.py report\n\n# Weekly report\npython scripts/cost-guardian.py report --period week\n\n# JSON output\npython scripts/cost-guardian.py report --json\n\n# Specific month\npython scripts/cost-guardian.py report --month 2026-02\n\nOptimization Recommendations\n# Get optimization suggestions\npython scripts/cost-guardian.py optimize\n\n# JSON output\npython scripts/cost-guardian.py optimize --json\n\nForecast Spend\n# Forecast next 3 months\npython scripts/cost-guardian.py forecast\n\n# Forecast next N months\npython scripts/cost-guardian.py forecast --months 6\n\n# JSON output\npython scripts/cost-guardian.py forecast --json\n\nManage Subscriptions\n# Add a subscription\npython scripts/cost-guardian.py sub add --name \"OpenRouter\" --amount 20.00 --currency USD --cycle monthly --renews 2026-03-15 --category api\n\n# List subscriptions\npython scripts/cost-guardian.py sub list\n\n# Remove a subscription\npython scripts/cost-guardian.py sub remove --name \"OpenRouter\"\n\n# Check upcoming renewals\npython scripts/cost-guardian.py sub upcoming --days 14\n\nStatus Dashboard\n# Quick status overview\npython scripts/cost-guardian.py status\n\n# JSON output  \npython scripts/cost-guardian.py status --json\n\nCategories\napi — AI model API costs (OpenAI, Anthropic, OpenRouter, etc.)\nhosting — VPS, cloud, domain, DNS\npower — Electricity for homelab\nsubscription — SaaS subscriptions\nhardware — One-time hardware purchases\nother — Everything else\nOutput Modes\n\nAll commands support:\n\nHuman-readable (default) — colored terminal output\nJSON (--json) — structured data for programmatic use\nCron Integration\n\nAdd to OpenClaw cron for automated cost tracking:\n\nDaily: scan-tokens to track API usage\nWeekly: report --period week for digest\nMonthly: report + forecast for full analysis\nOn-demand: optimize when looking to cut costs\nData Storage\n\nAll data stored in ~/.openclaw/workspace/costs/:\n\nconfig.json — budget settings, preferences\ncosts.db — SQLite database (entries, subscriptions, token scans)\nZero Dependencies\n\nPure Python 3 stdlib — no pip install needed. Uses sqlite3, json, datetime, pathlib."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mariusfit/cost-guardian",
    "publisherUrl": "https://clawhub.ai/mariusfit/cost-guardian",
    "owner": "mariusfit",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cost-guardian",
    "downloadUrl": "https://openagent3.xyz/downloads/cost-guardian",
    "agentUrl": "https://openagent3.xyz/skills/cost-guardian/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cost-guardian/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cost-guardian/agent.md"
  }
}