model-usage

Calculate per-model usage costs from CodexBar local logs.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/zhanbei1/OpenOcta --skill model-usage-zhanbei1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/zhanbei1/OpenOcta/tree/main/src/skills/model-usage
Command: npx skills add https://github.com/zhanbei1/OpenOcta --skill model-usage-zhanbei1

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Organizations need clear, model-level cost visibility from CodexBar's local logs to track spending and optimize prompts.

Core Features & Use Cases

  • Current model cost: identify the most expensive active model from recent logs.
  • All-model breakdown: compute total costs per model across daily entries.
  • Flexible inputs: read from CodexBar JSON or local files; output can feed dashboards or reports.

Quick Start

Run the model_usage.py script with a provider (codex or claude) and an input source to generate a per-model cost summary.

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I calculate per-model usage costs from CodexBar local logs?

You can calculate per-model usage costs from CodexBar local logs by running the model_usage.py script with a provider and input source. It analyzes daily modelBreakdowns to output a per-model cost summary.

What is the best way to get a full per-model cost breakdown for Codex and Claude providers?

Getting a full per-model cost breakdown for Codex and Claude providers involves running the model_usage.py script with the --mode parameter. This analyzes daily modelBreakdowns to output total costs per model.

Do I need the CodexBar CLI installed to analyze model usage costs?

Yes, you need the CodexBar CLI installed and access to local cost logs to analyze model usage costs. The script processes these local JSON logs to compute per-model spending.

Can I read CodexBar cost logs from a local file instead of the CLI output?

Yes, you can read CodexBar cost logs from a local file by passing the --input parameter to the model_usage.py script. This allows flexible data sourcing for your cost reporting.

How do I identify the most expensive active model from recent usage logs?

You identify the most expensive active model from recent logs by executing the model_usage.py script with the appropriate provider. It exposes the current model cost directly from recent local entries.