model-usage

Summarize per-model costs from CodexBar JSON logs with text or JSON output.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/dingdyan/openclaw-workspace-v2 --skill model-usage-dingdyan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/dingdyan/openclaw-workspace-v2/tree/main/skills/model-usage
Command: npx skills add https://github.com/dingdyan/openclaw-workspace-v2 --skill model-usage-dingdyan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires codexbar, python3, json, subprocess, and includes scripts (resource) and references (resource) components.

What problem does it solve?

CodexBar cost logs can be hard to interpret because you need an accurate per-model cost breakdown to understand spending and spot changes over time.

Core Features & Use Cases

  • Per-model cost summaries from local CodexBar logs: Produces a readable or JSON summary of cost grouped by model for the Codex or Claude providers.
  • Current model insight (most recent day): Selects the model with the highest cost from the latest daily entry, with a fallback to the last item in modelsUsed when modelBreakdowns are missing.
  • Flexible inputs for repeatable analysis: Works directly from CodexBar CLI output by default, or from a provided JSON file/stdin to support scripted workflows and reporting.

Quick Start

Ask: "Summarize the latest Codex model usage and cost from my local CodexBar logs and show the current model and latest day cost."

Frequently Asked Questions about model-usage

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

FAQPage Schema
How do I get a per-model cost breakdown from CodexBar logs?

To get a per-model cost breakdown from CodexBar logs, the tool reads local cost JSON, extracts daily modelBreakdowns, and aggregates total cost by model for Codex or Claude providers.

What is the best way to find the current model from CodexBar cost data?

To find the current model from CodexBar cost data, use the current reporting mode to select the model with the highest cost from the latest daily entry, falling back to the last modelsUsed item if modelBreakdowns are missing.

Can I parse CodexBar cost data from a JSON file instead of the CLI?

Yes, you can parse CodexBar cost data from a JSON file or standard input instead of the CLI default, supporting scripted workflows and repeatable reporting without direct CLI execution.

Does this tool support text and JSON output formats for cost analytics?

Yes, this tool supports text and JSON output formats for cost analytics, letting you choose a readable summary for quick review or structured JSON data for integration into downstream tracking systems.

Do I need Python3 and subprocess to run CodexBar cost analysis?

Yes, you need Python3 and the subprocess module to run CodexBar cost analysis, as the tool relies on Python3 to execute scripts, parse JSON, and invoke the CodexBar CLI through subprocess calls.