model-usage

Generates per-model summaries from CodxBar logs for specified intervals and formats.

Updated May 18, 2022
One-click install
npx skills add https://github.com/kendreaditya/.config --skill model-usage-kendreaditya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/kendreaditya/.config/tree/main/claude/skills/model-usage
Command: npx skills add https://github.com/kendreaditya/.config --skill model-usage-kendreaditya

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Quickly understand how much each model (Codex or Claude) costs and how usage is distributed, by compiling per-model cost data from CodexBar's local logs.

Core Features & Use Cases

  • Summarizes current-model costs (most recent daily entry) or full model breakdowns from local CodexBar logs.
  • Supports both Codex and Claude providers and outputs as readable text or structured JSON for automation.
  • Useful for cost attribution, budgeting, and auditing model usage across projects.

Quick Start

Run the script to generate a per-model usage and cost summary from local CodexBar logs.

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 costs from CodexBar local logs?

You can summarize per-model usage costs from CodexBar local logs by running the script with --mode current or all. It processes local JSON outputs with optional date filtering and provider specification to produce readable text or structured JSON.

Can I filter model usage costs by provider for Codex and Claude?

Yes, you can filter model usage costs by provider using the --provider flag. The script supports specifying either codex or claude to isolate cost attribution and usage distribution data for your selected provider from local JSON logs.

Do I need CodexBar CLI installed to analyze local JSON logs?

Yes, you need the CodexBar CLI installed and accessible on your PATH to analyze local JSON logs. The script depends on this environment setup to extract and compile per-model cost data from your local outputs successfully.

What is the difference between current and all mode for model cost breakdowns?

Current mode summarizes only the most recent daily entry for model costs, while all mode provides a full model breakdown from local CodexBar logs. Both modes support outputting readable text or structured JSON suitable for automation.

How do I output structured JSON from CodexBar logs for automation?

To output structured JSON from CodexBar logs for automation, run the script and select the JSON output format. This allows you to pipe or integrate per-model usage and cost data directly into downstream budgeting or auditing workflows.

Can I use stdin or a file path to input local JSON logs for cost analysis?

Yes, you can use stdin or the --input flag to provide local JSON logs for cost analysis. This flexibility allows you to pipe data directly or specify a file path for processing per-model usage and costs from CodexBar outputs.