model-usage

Aggregate per-model costs from CodexBar local logs into JSON.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

CodexBar's local cost logs can be difficult to interpret at a glance; this Skill aggregates per-model costs and provides a clear view of model-level spend and trends to support budgeting and optimization.

Core Features & Use Cases

  • Retrieve per-model usage costs for Codex or Claude from local logs.
  • Choose between the current (latest daily) data or a full model breakdown for deeper analysis.
  • Output results as readable text or structured JSON for automation, dashboards, or reporting.

Quick Start

Run the script with --provider codex --mode current to view the latest per-model costs, or with --mode all to see a full model breakdown.

Frequently Asked Questions about model-usage

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

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

Aggregate per-model usage costs by running the script with --provider codex --mode current for the latest daily data, or --mode all for a full model breakdown. It reads local cost logs and parses daily modelBreakdowns to summarize costs by model.

Can I get a per-model cost breakdown for both Codex and Claude?▼

Yes, retrieve per-model cost breakdowns for Codex and Claude by specifying the --provider argument. The script reads local CodexBar logs to aggregate and display costs for the selected provider.

What is the best way to integrate per-model spend data into a reporting dashboard?▼

Output aggregated per-model cost results as structured JSON to integrate spend data into dashboards. The script supports JSON output for piping the full model breakdown into automated reporting systems.

Do I need the CodexBar CLI installed to parse model cost logs?▼

You need CodexBar installed as a dependency. The Skill accepts input from a JSON file or the CodexBar CLI, allowing you to parse local cost logs directly from a saved file or by invoking the CLI.

How does parsing daily modelBreakdowns help with API budget optimization?▼

Parsing daily modelBreakdowns aggregates costs by model to reveal spend and trends. This detailed breakdown supports budgeting and optimization by highlighting exactly where API costs accumulate per model.