model-usage

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? CodexBar's raw cost JSON is hard to interpret when you need to know which AI model is driving your spending. This Skill parses CodexBar local cost logs and produces a clear per-model cost breakdown, either for the current (most recently used) model or for all models. ## Core Features & Use Cases - Current Model Detection: Identifies the most recent model by picking the highest-cost model in the latest daily entry, with fallback to the last entry in modelsUsed. - All-Models Breakdown: Aggregates cost per model across daily rows, with optional filtering to the last N days. - Flexible Input and Output: Reads from the codexbar CLI, a JSON file, or stdin, and outputs human-readable text or structured JSON. - Use Case: You want to know how much you spent on each Codex model this week. Run the script with --provider codex --mode all --days 7 to get a ranked cost list per model. ## Quick Start Ask the agent to show your current Codex model usage cost using the model-usage skill.

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 model_usage.py script with --provider codex or --provider 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 to check which Codex model I used most recently?

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

Does CodexBar cost tracking work on Linux?

The skill metadata specifies macOS (darwin) only, installed via the steipete/tap/codexbar Homebrew cask. Linux CLI support is noted as a TODO pending documented install paths.

Can I use codexbar cost JSON from a file instead of the CLI?

Yes, pass --input with a file path or '-' for stdin. The script accepts either a single provider object or the full array payload and selects the matching provider entry.

Why does the script report no model data found?

This happens when the codexbar cost payload contains no daily entries with modelBreakdowns or modelsUsed. Verify that codexbar cost --format json returns daily rows and that local JSONL session logs exist for the provider.