model-usage

Summarize CodexBar local cost logs by model for Codex or Claude providers.

1|Updated Jun 9, 2026
Ready to run
npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill model-usage-jerome-prakash-l
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/JEROME-PRAKASH-L/openclaw/tree/main/skills/model-usage
Command: npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill model-usage-jerome-prakash-l

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Tracking per-model spending across Codex and Claude sessions requires manually parsing CodexBar's local cost JSON logs, which is tedious and error-prone when you just want to know which model costs the most. ## Core Features & Use Cases - Current Model Summary: Identifies the most recent daily entry and reports the highest-cost model, with fallback to the last entry in modelsUsed when breakdowns are missing. - All-Models Breakdown: Aggregates cost totals per model across daily rows, with optional filtering to the last N days. - Flexible Input and Output: Reads live CodexBar CLI output on macOS or accepts exported JSON via file/stdin on any platform, and renders results as text or pretty-printed JSON. - Use Case: A developer on macOS wants to check which Claude model drove costs this week, so they run the summarizer with --provider claude --mode all --days 7 to get a ranked per-model cost list. ## Quick Start Ask the assistant to summarize your current Codex model usage cost from CodexBar, optionally specifying the provider, mode, or a JSON input file.

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I check per-model cost usage for Codex or Claude?▼

Run the bundled model_usage.py script with --provider codex or claude and --mode current or all. It reads CodexBar cost JSON and reports the highest-cost current model or a ranked breakdown of all models.

How to summarize CodexBar cost JSON from a file?▼

Pass the exported JSON with --input /path/to/cost.json, or pipe it via stdin using --input -. This works on any platform with Python, without needing the codexbar CLI installed.

Does CodexBar cost tracking work on Linux or Windows?▼

Live codexbar CLI invocation is documented for macOS only. On Linux or other platforms, export the cost JSON elsewhere and use --input mode, which works anywhere Python is available.

Why does the script report no model data found?▼

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

Can I limit the cost summary to recent days?▼

Yes, use --days N to filter daily rows to the last N days based on their date field. This applies to both current and all modes before costs are aggregated.