model-usage

Aggregate CodexBar cost JSON into per-model cost summaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the manual effort of turning CodexBar local cost logs into a clear, per-model view of usage and cost.

Core Features & Use Cases

  • Per-model cost summaries: Produces a cost-only breakdown for either the current (most recent) model or an all-model list from CodexBar cost JSON.
  • Current-model selection logic: Chooses the highest-cost model within the latest daily entry that includes modelBreakdowns, with a fallback to the last item in modelsUsed.
  • Scriptable automation: Accepts live data from codexbar cost --provider <codex|claude> --format json or an input JSON file/stdin, and can output text or JSON.
  • Use Case: Use it to quickly answer “What model did I spend the most on recently?” or “How did my Codex/Claude model costs distribute across models over time?” for local cost-only reporting.

Quick Start

Run this Skill to get an all-model per-model cost breakdown from your local CodexBar cost logs by telling the assistant: “Summarize CodexBar local cost usage for all Codex models and return the per-model totals.”

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I summarize CodexBar cost logs by model?

You can summarize CodexBar cost logs by model by feeding the JSON output from `codexbar cost --format json` into this tool, which aggregates `daily[].modelBreakdowns` to produce a per-model cost breakdown.

What is the best way to see which model incurred the highest cost recently?

To see which model incurred the highest cost recently, the tool identifies the current model by selecting the highest-cost entry in the latest daily row's `modelBreakdowns`, with a fallback to the last item in `modelsUsed`.

Can I parse CodexBar JSON cost data from a local file instead of the CLI?

Yes, you can parse CodexBar JSON cost data from a local file or standard input, allowing you to process saved cost logs and aggregate per-model usage without running the live CLI command.

Does this tool work with both Codex and Claude provider cost JSON?

Yes, it works with both Codex and Claude provider cost JSON, accepting data from `codexbar cost --provider <codex|claude> --format json` to aggregate local cost-only reporting across models.

How do I get a full per-model cost breakdown across all historical data?

To get a full per-model cost breakdown across all historical data, instruct the tool to aggregate all daily entries from the CodexBar cost JSON, outputting a comprehensive list of per-model totals in text or JSON format.

Why does my current model selection show a different model than expected?

Current model selection might differ from expectations because the logic prioritizes the highest-cost model within the latest daily entry containing `modelBreakdowns`, defaulting to the last item in `modelsUsed` only as a fallback.