ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Community Verified developer tools Safety 4/5

model-usage

Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/openclaw/skills/model-usage
Or

What This Skill Does

The model-usage skill provides detailed insights into the cost and usage of AI models, specifically Codex and Claude, as logged by the CodexBar CLI. It allows users to retrieve summaries of model expenses, either focusing on the most recently used model for a given day or providing a comprehensive breakdown of all models used over time. This skill is invaluable for developers and teams looking to monitor and manage their AI operational costs effectively. It can process cost data directly from the CodexBar CLI or from a provided JSON file, offering flexibility in how usage data is obtained and analyzed. The output can be presented in a human-readable text format or a structured JSON format for further programmatic use.

Installation

To install the model-usage skill, use the following command:

clawhub install openclaw/openclaw/skills/model-usage

Ensure you have the CodexBar CLI installed and configured. Refer to the CodexBar CLI documentation for installation and setup instructions.

Use Cases

This skill is highly versatile and can be applied in several scenarios:

  • Cost Monitoring: Track the daily or cumulative costs associated with different AI models (Codex, Claude) to understand spending patterns.
  • Model Optimization: Identify which models are incurring the highest costs, enabling informed decisions about model selection and potential cost-saving optimizations.
  • Resource Allocation: Gain insights into model usage to better allocate computational resources and budget.
  • Auditing and Reporting: Generate reports on AI model expenses for financial auditing or internal management purposes.
  • Development Workflow Integration: Integrate model usage summaries into development pipelines or dashboards for continuous monitoring.

Example Prompts

  1. "Show me the current most expensive model I used today with Codex."
  2. "Summarize the total cost for all Claude models from the CodexBar logs."
  3. "Provide a JSON output of my Codex model usage for the last month."

Tips & Limitations

  • Data Source: The accuracy of the model-usage skill's output depends entirely on the quality and completeness of the data logged by the CodexBar CLI. Ensure CodexBar is properly configured to capture all relevant usage.
  • CodexBar CLI Dependency: This skill relies on the CodexBar CLI. Make sure it's installed and accessible in your environment. The script uses codexbar cost --format json by default.
  • Linux Support: Guidance for Linux CLI installation paths is still pending documentation. Users on Linux may need to manually configure paths.
  • Token vs. Cost: The output primarily focuses on cost. CodexBar's raw output does not differentiate tokens by model breakdown, so the summary is cost-centric.
  • 'Current Model' Logic: The 'current model' feature identifies the most costly model from the most recent daily entry. If modelBreakdowns are absent, it falls back to modelsUsed. You can explicitly specify a model using the --model <name> flag.
  • Input Flexibility: You can pipe output from codexbar cost directly into the script via stdin or specify a file using the --input flag for greater control over data processing.

Metadata

Author@openclaw
Stars370199
Views36
Updated2026-05-09
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-openclaw-model-usage": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#cost-analysis#model-usage#codexbar#ai-monitoring#developer-tools
Safety Score: 4/5

Flags: code-execution, file-read