← 返回 Skills 市场
aiwithabidi

Cost Tracker

作者 aiwithabidi · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
791
总下载
0
收藏
8
当前安装
1
版本数
在 OpenClaw 中安装
/install cost-tracker
功能描述
AI spending monitor — track costs across OpenRouter models with daily, weekly, and monthly reports. Budget limits with alerts, per-model analysis, savings re...
使用说明 (SKILL.md)

💰 Cost Tracker

AI spending monitor for OpenRouter. Track per-model costs, get daily/weekly/monthly reports, set budget alerts, and get savings recommendations.

Usage

# Fetch and store current usage from OpenRouter
python3 {baseDir}/scripts/cost_tracker.py fetch

# Show spending reports
python3 {baseDir}/scripts/cost_tracker.py report --period daily
python3 {baseDir}/scripts/cost_tracker.py report --period weekly
python3 {baseDir}/scripts/cost_tracker.py report --period monthly

# Per-model breakdown
python3 {baseDir}/scripts/cost_tracker.py models

# Set monthly budget + check status
python3 {baseDir}/scripts/cost_tracker.py budget --set 25.00
python3 {baseDir}/scripts/cost_tracker.py budget --check

# Savings recommendations
python3 {baseDir}/scripts/cost_tracker.py savings

# Export data as JSON
python3 {baseDir}/scripts/cost_tracker.py export --format json
python3 {baseDir}/scripts/cost_tracker.py export --format csv

Features

  • Live Usage Fetch — Pulls real spending data from OpenRouter's /api/v1/auth/key endpoint
  • Per-Model Tracking — See which models cost you the most
  • Period Reports — Daily, weekly, monthly summaries with trends
  • Budget Alerts — Set limits and get warned at 80% threshold
  • Savings Tips — Identifies cheaper models that could handle the same workload
  • Historical Data — SQLite storage for long-term trend analysis
  • Export — JSON or CSV export for spreadsheets

Data Storage

All data stored in {baseDir}/data/cost_tracker.db (SQLite).

Credits

Built by M. Abidi | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation

安全使用建议
This skill appears to do what it says: it uses your OPENROUTER_API_KEY to query OpenRouter for usage and models, stores results locally in data/cost_tracker.db, and prints reports. Before installing, confirm you trust the skill source (homepage: agxntsix.ai) and are comfortable giving the skill your OpenRouter API key. Note the DB will contain raw JSON from the /auth/key response (account/usage data) — protect that file. The script requires the Python requests library; consider running it in an isolated virtualenv. If you want extra assurance, inspect the rest of the script (the truncated portion in the provided file appears consistent but you can review the full file) and verify it only contacts openrouter.ai and performs only local DB writes.
功能分析
Type: OpenClaw Skill Name: cost-tracker Version: 1.0.0 The OpenClaw skill bundle 'cost-tracker' is classified as benign. The `SKILL.md` provides clear instructions for the AI agent, all of which are directly related to the skill's stated purpose and do not contain any prompt injection attempts. The `scripts/cost_tracker.py` script securely interacts with the `openrouter.ai` API using the `OPENROUTER_API_KEY` from environment variables, stores data locally in an SQLite database (`cost_tracker.db` within the skill's data directory), and performs calculations and reporting. There is no evidence of data exfiltration to unauthorized endpoints, malicious execution, persistence mechanisms, or obfuscation. All network and file system operations are justified by the skill's functionality.
能力评估
Purpose & Capability
Name/description (OpenRouter cost tracking) align with the code and SKILL.md: the script calls OpenRouter endpoints (/api/v1/auth/key and /api/v1/models), stores data in a local SQLite DB, produces reports, and provides savings recommendations. Required env var is the OpenRouter API key, which is appropriate.
Instruction Scope
SKILL.md instructs running the included Python script with subcommands (fetch, report, models, budget, savings, export). The script operates on a local data directory and only queries OpenRouter. It does store raw JSON of the /auth/key response in the DB (expected for tracking usage) but does not reference unrelated system files or other environment variables.
Install Mechanism
No install spec is provided (instruction-only + included script). The only third‑party library used is requests; missing this library causes the script to exit with a clear message asking the user to pip install requests. No arbitrary downloads or extracted archives are present.
Credentials
Only OPENROUTER_API_KEY is required and is used to authenticate to OpenRouter. No additional credentials, secrets, or unrelated env vars are requested. The script stores account/usage JSON locally in data/cost_tracker.db, which is proportional to the stated purpose.
Persistence & Privilege
The skill does not request persistent platform privileges (always:false). It writes only to its own data directory (./data/cost_tracker.db) and creates local SQLite tables; it does not modify other skills or global agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cost-tracker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cost-tracker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of cost-tracker — an AI spending monitor for OpenRouter. - Track AI costs per model with daily, weekly, and monthly reports - Set monthly budget limits and receive alerts at 80% usage - Analyze spending across models with historical tracking in SQLite - Get savings recommendations to optimize model selection - Export usage data as JSON or CSV for further analysis
元数据
Slug cost-tracker
版本 1.0.0
许可证
累计安装 8
当前安装数 8
历史版本数 1
常见问题

Cost Tracker 是什么?

AI spending monitor — track costs across OpenRouter models with daily, weekly, and monthly reports. Budget limits with alerts, per-model analysis, savings re... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 791 次。

如何安装 Cost Tracker?

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

Cost Tracker 是免费的吗?

是的,Cost Tracker 完全免费(开源免费),可自由下载、安装和使用。

Cost Tracker 支持哪些平台?

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

谁开发了 Cost Tracker?

由 aiwithabidi(@aiwithabidi)开发并维护,当前版本 v1.0.0。

💬 留言讨论