← Back to Skills Marketplace
aiwithabidi

Cost Tracker

by aiwithabidi · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
791
Downloads
0
Stars
8
Active Installs
1
Versions
Install in OpenClaw
/install cost-tracker
Description
AI spending monitor — track costs across OpenRouter models with daily, weekly, and monthly reports. Budget limits with alerts, per-model analysis, savings re...
README (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

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cost-tracker
  3. After installation, invoke the skill by name or use /cost-tracker
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug cost-tracker
Version 1.0.0
License
All-time Installs 8
Active Installs 8
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 791 downloads so far.

How do I install Cost Tracker?

Run "/install cost-tracker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cost Tracker free?

Yes, Cost Tracker is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Cost Tracker support?

Cost Tracker is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cost Tracker?

It is built and maintained by aiwithabidi (@aiwithabidi); the current version is v1.0.0.

💬 Comments