Summarize per-model AI cost usage from CodexBar's local logs — supports Codex and Claude, current or all-model breakdowns.
npx clawhub@latest install model-usagePlatforms
Model Usage is a skill that reads CodexBar's local cost logs and produces per-model spending summaries for Codex or Claude. It can report on the single most-recently-used model ("current") or aggregate costs across every model in your history. Output is available as human-readable text or structured JSON, making it easy to pipe into dashboards or scripts.
gpt-4o vs claude-3-5-sonnet) over your usage history.--format json --pretty.Automatically identifies the most recently used model by finding the latest daily row containing modelBreakdowns and selecting the highest-cost model. Falls back to modelsUsed when breakdowns are absent, and supports a manual --model <name> override.
Aggregates cost data across every model in your CodexBar history with --mode all, giving you a complete picture of where your AI spend is going.
Works with both --provider codex and --provider claude, covering the two main providers tracked by CodexBar.
Can fetch data live via codexbar cost --format json, read from a saved file with --input /path/to/cost.json, or accept piped stdin with --input -.
Returns human-readable text by default. Pass --format json --pretty to get structured JSON output suitable for scripting or further processing.
Run --provider codex --mode current each morning to instantly see which model you used most recently and what it cost, without digging through raw JSON logs.
Use --mode all --format json --pretty to export a full model-by-model cost breakdown, then import it into a spreadsheet or cost-tracking dashboard.
Pipe the JSON output into a shell script or CI job that checks whether any model's cost exceeds a threshold, enabling automated budget guardrails.
Run the skill twice — once with --provider codex and once with --provider claude — to compare total spending across both providers side by side.
npx clawhub@latest install model-usagenpx clawhub@latest install model-usagePlatforms
Log in to write a review
No reviews yet. Be the first to share your experience!