model-usage

Analyze local CodexBar cost logs for per-model usage and cost summaries.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/zyj18860969891-byte/openclaw-railway --skill model-usage-zyj18860969891-byte
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/zyj18860969891-byte/openclaw-railway/tree/main/skills/model-usage
Command: npx skills add https://github.com/zyj18860969891-byte/openclaw-railway --skill model-usage-zyj18860969891-byte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

CodexBar model-cost insights are surfaced from local logs, allowing you to understand and compare per-model usage and costs without relying on web dashboards or external services.

Core Features & Use Cases

  • Current-model view: quickly identify the most expensive active model from CodexBar data.
  • Full-model breakdown: aggregate costs by model across multiple days for Codex and Claude.
  • Output options: generate human-friendly text or structured JSON for dashboards or automation.
  • Use Case: budgeting and optimization for teams running local AI workloads on CodexBar logs.

Quick Start

Run the model_usage.py script with --provider codex (or --provider claude) and --mode current or --mode all to view per-model cost summaries.

Frequently Asked Questions about model-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze local CodexBar cost logs for per-model usage breakdowns?▼

To analyze local CodexBar cost logs for per-model usage, run the model_usage.py script with --provider codex or --provider claude. It reads local JSON cost logs and generates per-model usage summaries, gracefully handling missing data and optional time filters.

Can I get a current-model view of the most expensive active model from CodexBar data?▼

Yes, you can get a current-model view of the most expensive active model from CodexBar data by running the script with --mode current. This quickly identifies the highest-cost active model without relying on external web dashboards.

Does the per-model cost breakdown support both Codex and Claude providers?▼

Yes, the per-model cost breakdown supports both Codex and Claude providers. You specify the target provider using the --provider flag to aggregate usage and costs across multiple days for the selected provider.

What is the best way to output per-model cost summaries for dashboards or automation?▼

The best way to output per-model cost summaries for dashboards or automation is generating structured JSON. The script provides output options for both human-friendly text and structured JSON formats to support reporting and automation workflows.

How do I aggregate costs by model across multiple days for team budgeting?▼

To aggregate costs by model across multiple days for team budgeting, run the script with --mode all. It processes historical local cost logs to produce full-model breakdowns, with optional time filters to narrow the reporting window.

What happens if the local model usage logs have missing data?▼

If local model usage logs have missing data, the script gracefully handles the gaps without failing. It processes available JSON cost logs and applies optional time filters to ensure per-model usage summaries remain accurate.