model-usage

Parse CodexBar JSON logs to aggregate per-model costs and identify the top-cost model.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/vut08905/openclaw-app --skill model-usage-vut08905
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/vut08905/openclaw-app/tree/main/skills/model-usage
Command: npx skills add https://github.com/vut08905/openclaw-app --skill model-usage-vut08905

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automates visibility into model-level spending and usage by parsing local CodexBar logs.

Core Features & Use Cases

  • Current model cost: identify the most expensive active model from the latest daily row.
  • All-model breakdown: aggregate total costs by model across days.
  • Flexible inputs/outputs: supports provider codex or claude, and outputs in text or JSON.

Use Case: Imagine you are monitoring monthly costs across Codex and Claude models to optimize deployment.

Quick Start

Run the model_usage script to view current model costs or generate a full per-model cost breakdown from your local CodexBar logs.

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I track per-model usage costs from local CodexBar logs?

Per-model usage costs from local CodexBar logs are calculated by parsing daily JSON entries and aggregating modelBreakdowns data. The script identifies the current top-cost model from the latest daily row and provides a full cost breakdown across all models.

Can I view cost breakdowns for both Codex and Claude providers?

Yes, cost breakdowns support both Codex and Claude providers. The script accepts a provider argument to filter and parse local JSON logs specifically for either the codex or claude provider.

What is the difference between current model cost and all-model breakdown?

Current model cost identifies the most expensive active model from only the latest daily log row, while the all-model breakdown aggregates and sums total costs by model across all available daily entries in the log file.

Does the model usage script support filtering costs by specific day ranges?

Yes, the model usage script supports filtering costs by specific day ranges. You can pass an optional day range parameter to narrow the cost aggregation and breakdown to a targeted period within your local logs.

How does the script handle missing data or unsupported inputs in CodexBar logs?

Missing data or unsupported inputs in CodexBar logs are handled gracefully by the script. It skips incomplete entries without failing the entire aggregation process, ensuring you still get partial cost summaries.

Can I export the aggregated model cost breakdown in JSON format?

Yes, the aggregated model cost breakdown can be exported in JSON format. The script supports flexible outputs, allowing you to choose between standard text or JSON format for the final usage and cost results.