ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified finance Safety 4/5

cost-tracker

AI spending monitor — track costs across OpenRouter models with daily, weekly, and monthly reports. Budget limits with alerts, per-model analysis, savings recommendations, and historical tracking via SQLite. Use for controlling AI costs and optimizing model selection.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aiwithabidi/cost-tracker
Or

What This Skill Does

The cost-tracker skill is a robust financial oversight tool specifically designed for OpenClaw agents interacting with the OpenRouter API. It acts as an automated auditor for your AI consumption, interfacing directly with OpenRouter's usage telemetry to capture, store, and analyze expenditure data. By utilizing a local SQLite database, it maintains a persistent historical record of every request made, the model used, and the associated cost. It enables users to move from reactive spending to proactive financial management by providing actionable insights through summary reports, budgetary guardrails, and intelligent model-swapping recommendations.

Installation

To integrate this skill into your environment, use the OpenClaw command-line interface. Ensure your OpenRouter API keys are correctly configured in your environment variables, as the tool relies on them for authenticated access to usage logs:

clawhub install openclaw/skills/skills/aiwithabidi/cost-tracker

After installation, the tool initializes a local SQLite file at {baseDir}/data/cost_tracker.db. Verify connectivity by running python3 {baseDir}/scripts/cost_tracker.py fetch to pull your initial usage data.

Use Cases

  • Startup Budgeting: For developers building applications on top of LLMs, this tool prevents surprise bills by enforcing strict monthly spending caps.
  • Model Optimization: Teams can identify if expensive models like GPT-4 or Claude 3.5 Opus are being used for simple tasks, allowing them to switch to more cost-effective options without sacrificing output quality.
  • Trend Analysis: Agencies can correlate project milestones with specific spikes in API spending to provide transparent billing to clients.

Example Prompts

  1. "What is my total spending across all models for the current week?"
  2. "Set a monthly budget of $50.00 and notify me if I hit the 80% threshold."
  3. "Analyze my last month of usage and suggest which models I could swap out to lower my bill while maintaining performance."

Tips & Limitations

  • Data Granularity: The accuracy of the reports is dependent on how frequently you trigger the fetch command; consider setting up a cron job for automated daily updates.
  • Security: Ensure your local SQLite database folder is included in your system backups but excluded from public code repositories to prevent sensitive metadata leakage.
  • Limits: The tool is designed specifically for OpenRouter; it cannot track costs for direct API calls made to OpenAI, Anthropic, or Mistral outside of the OpenRouter ecosystem. Always verify your actual bill on the OpenRouter dashboard periodically to ensure consistency between internal tracking and external billing.

Metadata

Stars4473
Views4
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aiwithabidi-cost-tracker": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#fintech#ai-costs#openrouter#budgeting#monitoring
Safety Score: 4/5

Flags: file-write, file-read, external-api

Related Skills

agent-memory

Full AI agent memory stack — Mem0 unified memory engine with vector search (Qdrant) and knowledge graph (Neo4j), plus SQLite for structured data. Complete setup script and tools. Give your OpenClaw agent a real brain with semantic recall, entity relationships, and structured storage.

aiwithabidi 4473

skill-auditor

Security audit and quarantine system for third-party OpenClaw skills. Use when evaluating, reviewing, or installing any skill from ClawHub or external sources. Automatically triggered before any skill installation.

aiwithabidi 4473

Model Intel

Live LLM model intelligence and pricing from OpenRouter

aiwithabidi 4473

deep-search

Multi-tier Perplexity search with Langfuse tracing. Three depth levels: quick (sonar), pro (sonar-pro), deep (sonar-reasoning-pro). Supports focus modes: internet, academic, news, youtube, reddit. Returns AI-synthesized answers with citations. Use for research, comparisons, market analysis, fact-checking. Triggers: search, research, look up, find out, compare, what is, deep search, web research.

aiwithabidi 4473

amplitude

Amplitude product analytics — track events, analyze user behavior, run cohort analysis, manage user properties, and query funnel/retention data via the Amplitude API. Understand product usage, measure feature adoption, and analyze user journeys. Built for AI agents — Python stdlib only, zero dependencies. Use for product analytics, user behavior tracking, funnel analysis, retention analysis, and cohort segmentation.

aiwithabidi 4473