model-usage

Summarizes per-model cost usage from CodexBar local cost JSON for Codex or Claude.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/Cyandex/ErnOS --skill model-usage-cyandex
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/Cyandex/ErnOS/tree/main/skills/model-usage
Command: npx skills add https://github.com/Cyandex/ErnOS --skill model-usage-cyandex

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? CodexBar's local cost logs contain per-model breakdowns buried in raw JSON, making it hard to quickly answer which model you used most recently or how much each model cost. This Skill turns that JSON into a clear per-model cost summary. ## Core Features & Use Cases - Current Model Detection: Identifies the most recent model from the latest daily entry, picking the highest-cost model in that day's breakdown and falling back to the last entry in modelsUsed when breakdowns are missing. - All-Models Breakdown: Aggregates cost per model across daily rows, with an optional --days filter to limit the window. - Flexible Input and Output: Reads from the codexbar CLI directly, a JSON file, or stdin, and renders results as text or JSON. - Use Case: Ask which Claude model you used most recently and what it cost, and get a one-line answer with the latest day cost and total cost across rows. ## Quick Start Ask the assistant to show your current Codex model usage and cost from CodexBar, or request a full per-model cost breakdown for Claude.

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I get per-model cost usage from CodexBar?▼

Run the bundled model_usage.py script with --provider codex or claude and --mode all to aggregate cost per model from codexbar cost JSON. Use --mode current to report only the most recently used model.

How do I find which Codex or Claude model I used most recently?▼

Use current mode, which reads the most recent daily row with modelBreakdowns and picks the highest-cost model. If breakdowns are missing, it falls back to the last entry in modelsUsed, and you can override with --model.

Can I use codexbar cost data without the CLI installed?▼

Yes, pass a saved JSON file with --input or pipe data via stdin using --input -. Without an input file, the script runs codexbar cost --format json directly and requires the codexbar binary on PATH.

Does CodexBar cost tracking work on Linux?▼

The skill metadata currently targets macOS (darwin) with installation via the steipete/tap/codexbar Homebrew cask. Linux CLI support is noted as a TODO pending documented install paths.

Why does the script report no model data found?▼

This happens when the codexbar cost payload contains no daily rows with modelBreakdowns or modelsUsed entries. Verify that local JSONL session logs exist under ~/.codex/sessions or ~/.claude/projects and that you selected the correct provider.