Model Usage — OpenClaw Skill

Track per-model AI cost and usage from CodexBar local logs for Codex and Claude.

Analytics Vetted

What This Skill Does

The Model Usage skill gives your OpenClaw agent visibility into your AI model spending. Using CodexBar's local cost logs, it can summarize per-model usage costs for both Codex and Claude providers. You can see costs for the current (most recently used) model, get a full breakdown across all models, or export the data as JSON for further analysis.

The skill identifies your "current model" by finding the most recent daily log entry with model breakdowns and picking the model with the highest cost. This is useful for quick checks -- "how much am I spending on the model I'm using right now?" For deeper analysis, the "all models" mode shows a complete breakdown across every model you've used, making it easy to compare spending across GPT-5.2, Opus, and other models.

Model Usage reads only from local cost log files and never transmits data externally. It pairs well with the Session Logs skill for correlating costs with specific conversations, and is useful context when reading our OpenClaw pricing comparison.

Example Prompts

How much have I spent on the model I'm currently using?

Show me a full breakdown of my AI model costs across all models

What's my Claude usage cost for this month? Give me the numbers as JSON

Compare my Codex spending across different models

Which model am I spending the most on right now?

Requirements

Binary dependency: codexbar

  • macOS: brew install steipete/tap/codexbar
  • Platform: macOS only (CodexBar is a macOS menu bar app)
  • Data: CodexBar must have tracked cost data for summaries to work

Setup on KiwiClaw

Model Usage is available on KiwiClaw plans running on macOS. On KiwiClaw Standard plans, usage tracking is built into the dashboard directly. For BYOK plans, install CodexBar on your local machine to track costs from your own API keys.

Setup Self-Hosted

  1. Install CodexBar: brew install steipete/tap/codexbar
  2. Let CodexBar run and track usage for at least a day
  3. Verify data: codexbar cost --provider codex --format json
  4. The skill will automatically use CodexBar data when available

Related Skills

  • Session Logs -- correlate costs with specific conversations
  • Oracle -- delegate expensive queries to the right model
  • Healthcheck -- audit your overall OpenClaw deployment health
  • ClawHub -- manage installed skills that contribute to usage

FAQ

What can the Model Usage skill do in OpenClaw?

The Model Usage skill summarizes per-model AI spending from CodexBar's local cost logs. It can show cost for the current (most recent) model, give a full breakdown across all models, and output results as text or JSON for Codex and Claude providers.

Does Model Usage require CodexBar?

Yes. Model Usage reads cost data from CodexBar's local logs. CodexBar must be installed and have tracked cost data for the skill to produce summaries. See our pricing comparison for context on typical costs.

Can Model Usage track costs for multiple AI providers?

Yes. It supports both Codex and Claude providers. Use the --provider flag to specify which provider's costs you want to analyze.

Is the Model Usage skill safe to use?

The Model Usage skill has been security-vetted by KiwiClaw. It only reads local cost log files and never transmits data externally. All cost data stays on your machine.

Track AI costs from your agent

Per-model spending summaries and cost breakdowns -- all through natural language.