model-usage

Summarizes CodexBar cost logs into per-model usage and cost breakdowns.

2|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/papachong/RHClaw --skill model-usage-papachong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/papachong/RHClaw/tree/main/RHClaw-Desktop/src-tauri/skills/model-usage
Command: npx skills add https://github.com/papachong/RHClaw --skill model-usage-papachong

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Provide a simple, scriptable summary of per-model usage and cost from CodexBar local cost logs so engineers and operators can quickly see which model is currently driving spend or get a full model cost breakdown for billing and tuning.

Core Features & Use Cases

  • Per-model aggregation: Aggregates costs from daily modelBreakdowns into per-model totals.
  • Current-model detection: Picks the most recent top-cost model or falls back to the last model in modelsUsed, with an override to specify a model explicitly.
  • Flexible inputs & outputs: Reads CodexBar CLI output, a file, or stdin and emits human-readable text or structured JSON; supports provider selection (codex/claude), day-range filtering, and pretty JSON.
  • Use Case: Run after a daily cost snapshot to identify which model to prioritize for optimization or to generate a scriptable report for finance and engineering.

Quick Start

Use the bundled Python script to summarize CodexBar local cost JSON and report either the current top-cost model or a full per-model cost breakdown.

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I summarize per-model usage and cost from CodexBar local cost logs?

Summarize per-model usage and cost by running a Python script that aggregates CodexBar daily modelBreakdowns into per-model totals, supporting both Codex and Claude providers with human-readable text or structured JSON output.

How does current-model detection work for CLI cost breakdowns?

Current-model detection picks the most recent top-cost model from the cost logs or falls back to the last model in the modelsUsed list, with an option to override and specify a model explicitly.

Can I filter CodexBar cost analytics by provider and day range?

Yes, you can filter CodexBar cost analytics by selecting a provider (codex or claude) and specifying a day range to limit the per-model usage and cost summary scope.

What inputs does the model-usage cost summary script accept?

The model-usage cost summary script accepts CodexBar CLI output, a saved cost JSON file, or stdin input, requiring either CodexBar available on PATH or a directly provided cost JSON.

How do I generate structured JSON output for per-model cost reporting?

Generate structured JSON output by running the script with the pretty JSON option, which formats the per-model usage and cost aggregation into a scriptable report suitable for finance and engineering analysis.

What are the limitations of using CodexBar logs for model cost optimization?

Cost summarization is limited to CodexBar local cost logs for Codex and Claude providers and requires either CodexBar on PATH or a provided cost JSON input to function.