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
Views1
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

freshsales

Freshsales CRM integration — manage contacts, leads, deals, accounts, tasks, and sales sequences via the Freshsales API. Track deal pipelines, automate lead assignments, log activities, and generate sales reports. Built for AI agents — Python stdlib only, no dependencies. Use for sales CRM, contact management, deal tracking, pipeline reporting, and sales automation.

aiwithabidi 4473

gemini-video-analyzer

Native video analysis using Google Gemini API. Upload and analyze video files — describe scenes, extract text/UI, answer questions about content, transcribe speech, identify objects and actions. Use when: (1) User sends a video file and wants it analyzed, (2) Video summarization or description needed, (3) Extracting text, UI elements, or information from screen recordings, (4) Answering questions about video content, (5) Comparing multiple videos, (6) Analyzing tutorials, demos, or walkthroughs.

aiwithabidi 4473

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

neon

Neon serverless Postgres — manage projects, branches, databases, roles, endpoints, and compute via the Neon API. Create database branches for development, manage connection endpoints, scale compute, and monitor usage. Built for AI agents — Python stdlib only, zero dependencies. Use for serverless Postgres, database branching, database management, development workflows, and cloud database automation.

aiwithabidi 4473

onepassword

1Password Connect — vaults, items, secrets management for server-side applications.

aiwithabidi 4473