model-usage

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

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill model-usage-amirulandalib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/AmirulAndalib/Vilvona-AI/tree/main/skills/model-usage
Command: npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill model-usage-amirulandalib

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Tracking per-model AI spending requires manually parsing CodexBar's raw cost JSON logs. This Skill automates that analysis, turning local Codex and Claude usage logs into clear per-model cost summaries. ## Core Features & Use Cases - Current Model Detection: Identifies the most recently used model from daily breakdowns, picking the highest-cost model in the latest daily row with fallback to modelsUsed entries. - All-Models Aggregation: Aggregates total cost 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 JSON. - Use Case: A developer wants to know which Claude model cost the most this week. They run the summarizer with --provider claude --mode all --days 7 and get a ranked per-model cost breakdown. ## 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 with CodexBar?

Run the bundled model_usage.py script with --provider codex or claude and --mode current or all. It invokes codexbar cost --format json and summarizes costs per model from the daily modelBreakdowns entries.

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 mode 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 on a Mac and use --input mode, which works anywhere Python is available.

Can I filter model usage costs to the last N days?

Yes, use the --days flag with a positive integer to limit aggregation to recent daily rows. Entries older than the cutoff date are excluded from both current-model detection and all-model totals.

Why does the script report no model data found?

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