Model Usage for CodexBar for Openclaw

A specialized utility to summarize per-model usage and costs for Codex and Claude via the CodexBar CLI.

justasknudge
v0.1.0
Feb 17, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install model-usage-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install model-usage-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Model Usage for CodexBar?

The model-usage skill is a powerful diagnostic tool designed for developers who need granular insights into their AI model expenditures. By leveraging CodexBar's local cost logs, this skill enables users to extract and summarize cost data for specific providers like Codex and Claude. It is a vital component of the Openclaw Skills ecosystem, offering both high-level summaries and deep-dive breakdowns into which specific models are consuming the most budget. This allows for better financial oversight and optimization of AI-driven development workflows.

Model Usage for CodexBar Use Cases

  • Monitoring daily spend across different AI models in real-time.
  • Identifying which specific Claude or Codex model is responsible for the highest costs.
  • Exporting model-level usage data to JSON for custom reporting or integration.
  • Auditing historical cost logs provided by CodexBar to track usage trends.

How Model Usage for CodexBar Works

  1. The skill triggers the CodexBar CLI to fetch the latest cost data in JSON format for a specific provider.
  2. It executes a local Python script to process the modelBreakdowns and modelsUsed arrays within the local logs.
  3. The logic identifies the current model by looking at the most recent daily entries or allows for a full breakdown of all models historically.
  4. The processed data is then formatted into a readable text summary or a structured JSON response for the user to review.

Model Usage for CodexBar Setup

To use this among your Openclaw Skills, ensure you have CodexBar installed on macOS.

Install CodexBar via Homebrew:

brew install --cask steipete/tap/codexbar

The skill uses a Python script located in the scripts directory. Ensure your environment has Python installed to execute the following:

python scripts/model_usage.py --provider codex --mode current

Model Usage for CodexBar Data Schema & Taxonomy

The skill processes JSON data structures returned by the CodexBar CLI and organizes them for analysis.

Field Description
provider Specifies the AI provider, such as codex or claude.
mode Defines the scope of analysis, either current or all.
format Determines output style, supporting text or json.
modelBreakdowns An array containing daily cost records per model.
modelsUsed A fallback array used when specific breakdowns are missing.

Model Usage for CodexBar Advanced Features

  • Automated fall-back logic that uses modelsUsed when specific modelBreakdowns are unavailable in the source JSON.
  • Support for standard input (stdin) piping, allowing for complex CLI automation and scriptable workflows.
  • Custom model overrides using the --model flag to target specific LLMs for cost extraction.
  • Pretty-print JSON output for seamless integration with other Openclaw Skills and automated data pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*