Skip to content

Guide · Agent skill

How to use the Model Usage Summary agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The model-usage skill teaches an AI agent to read cost records from CodexBar, a command-line tool that tracks local usage logs for Codex and Claude, and report cost per model. This guide explains what the skill does, how to install it from the downloaded ZIP, how to ask for summaries in plain language, and what it needs to run. By the end you will be able to get either the most recent model's cost or a full breakdown across all models, as text or JSON.

Model Usage Summaryspinabot/brigade · MIT

Quick start

  1. 1Download the ZIP. Download the model-usage skill ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder.
  3. 3Or upload it in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill.
  4. 4Install CodexBar CLI. Install the CodexBar CLI with brew install --cask steipete/tap/codexbar on macOS.
  5. 5Ask for a summary. Request model-level usage or cost data from CodexBar in plain language, naming Codex or Claude.
  6. 6Choose a mode. Ask for the current model or all models, and specify text or JSON output if needed.

What is an agent skill, and what does model-usage do?

An agent skill is a folder containing a SKILL.md file with instructions, and optionally scripts, that an AI agent can load when a request matches the skill's description. The skill does not add new capabilities to the agent by itself; it tells the agent how to use tools that are already available on your machine.

The model-usage skill covers one job: summarising per-model usage cost from CodexBar's local cost logs. It supports two modes. A current model mode reports the model used in the most recent daily entry. An all models mode gives a full breakdown of cost across models. Both work for Codex or Claude.

Install the model-usage skill

Download the ZIP for the skill from this page. You can install it in one of three ways.

For a personal install available to all your projects, unzip it into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder. In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: unzip into ~/.claude/skills/
  • Single project: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload

Install the CodexBar CLI and Python

The skill needs the CodexBar CLI, which the skill's metadata lists as installable with Homebrew using the cask steipete/tap/codexbar. The skill also runs a bundled Python script, so Python must be available. The skill is listed for macOS (darwin) only.

  • macOS (darwin) is required
  • CodexBar CLI, installed via the Homebrew cask steipete/tap/codexbar
  • Python to run the bundled model_usage.py script
brew install --cask steipete/tap/codexbar

Ask the agent for a summary in plain language

You do not need to run the script yourself. The skill triggers when you ask for model-level usage or cost data from CodexBar, or when you need a scriptable per-model summary from CodexBar cost JSON. Ask for the mode you want: the current model, or all models.

You can also ask for JSON output when you plan to process the result in another script.

  • "Which model did I use most recently in Codex, and what did it cost?"
  • "Give me a cost breakdown by model for Claude from CodexBar."
  • "Summarise my Codex model costs as JSON I can pipe into another tool."

Run the script directly

The skill's quick start shows the bundled script being run with a provider and a mode. The --format json and --pretty flags produce JSON output. The --model flag overrides the automatic choice when you need a specific model.

By default the script runs codexbar cost --format json --provider with your chosen provider. You can also save CodexBar's output to a file and pass that file in with --input, or pipe it through stdin using --input -.

  • Current model for Codex: --provider codex --mode current
  • All models for Codex: --provider codex --mode all
  • All models for Claude as pretty JSON: --provider claude --mode all --format json --pretty
  • Use a saved file: --input /tmp/cost.json
  • Read from stdin: --input -
python {baseDir}/scripts/model_usage.py --provider codex --mode current python {baseDir}/scripts/model_usage.py --provider codex --mode all python {baseDir}/scripts/model_usage.py --provider claude --mode all --format json --pretty

How the current model is chosen

In current mode, the script uses the most recent daily row that has model breakdowns. It picks the model with the highest cost in that row. If breakdowns are missing, it falls back to the last entry in the modelsUsed list. Use --model <name> to force a specific model.

  • Uses the most recent daily row with modelBreakdowns
  • Picks the model with the highest cost in that row
  • Falls back to the last entry in modelsUsed if breakdowns are missing
  • Override with --model <name>

Know the limits before you rely on the output

The output is cost only for each model. CodexBar does not split tokens by model, so per-model token counts are not available. The skill also has no Linux guidance yet, and it only reads data that CodexBar produces, so without CodexBar installed there is nothing for it to summarise.

The skill's metadata says it does not use the network, but it does run a bundled script. Read the script before you run it on sensitive machines, and check what it reads from the CodexBar output.

  • Cost only, no per-model token split
  • macOS only; Linux install is not yet documented in the source
  • Needs CodexBar installed and producing logs
  • Runs a bundled Python script; metadata lists network use as no

Tips for useful summaries

Use the all models mode when you want to compare spend across models. Use current mode for a quick answer about your latest work. When you feed results into another script, choose JSON output with --pretty for readable inspection or leave it compact for piping. If you need the CLI flags and cost JSON field details, the skill references a file named references/codexbar-cli.md.

  • Use all mode to compare models; current mode for the latest model
  • Save the CodexBar output to a file first if you want to rerun the summary without calling the CLI again
  • Check references/codexbar-cli.md for flags and JSON fields

What people use it for

  • Check which Codex model you used most recently and what it cost.
  • Compare cost across all Claude models over the period CodexBar has logged.
  • Produce a per-model cost summary in JSON for a spreadsheet or a script.
  • Save CodexBar output to a file and rerun summaries without calling the CLI again.

Frequently asked questions

Is the model-usage skill free?

The skill is published under the MIT licence. CodexBar and its install path are separate, and the source does not state pricing for them.

What do I need to run the model-usage skill?

You need macOS, the CodexBar CLI (installable via the Homebrew cask steipete/tap/codexbar), and Python to run the bundled model_usage.py script. The skill does not work on Linux or Windows according to the source.

Can I use model-usage on Windows or Linux?

No. The skill is limited to macOS (darwin), and the source says Linux CLI install guidance is not yet documented.

How do I install the model-usage skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or a project's .claude/skills/ folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.

Why does the skill show cost but not tokens per model?

CodexBar does not split tokens by model in its output, so the skill reports cost only for each model.

Why does the skill return nothing or fail?

The skill only reads data produced by CodexBar. Check that CodexBar is installed and has logs for the provider you chose, and that Python is available for the bundled script.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use model-usage if you are on a Mac, already run CodexBar, and want per-model cost for Codex or Claude as text or JSON. Pick something else if you are on Linux or Windows, do not use CodexBar, or need exact token counts per model.

Download the skill