Model Usage

v0.1.0

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trig...

0· 549·3 current·3 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description ask for per-model cost summaries from CodexBar; the skill only requires the codexbar CLI and a Python script that calls 'codexbar cost' or reads a provided JSON file. Required binaries and OS restriction (darwin) match the stated purpose.
Instruction Scope
SKILL.md and the script stay on-topic: they run 'codexbar cost --format json --provider', accept file/stdin input, parse local cost JSON, and render summaries. The instructions do not direct the agent to read unrelated system files or network endpoints.
Install Mechanism
Install uses a Homebrew cask from the steipete/tap (third-party) tap. This is expected to install the codexbar binary but carries the usual trust considerations for third-party brew taps (moderate supply-chain risk compared to official packages).
Credentials
The skill declares no environment variables, no credentials, and the code does not attempt to read undisclosed env vars. Access to local cost logs is performed indirectly via the codexbar CLI or user-supplied JSON, which is appropriate for the task.
Persistence & Privilege
Skill is not always-enabled and does not request persistent system-wide privileges. It does not modify other skills or global agent config.
Assessment
This skill appears to do what it says: run the CodexBar CLI or parse a CodexBar JSON export and summarize per-model costs. Before installing, confirm you trust the Homebrew tap (steipete/tap) used to install codexbar, since third-party taps have higher supply-chain risk than official packages. Also note that CodexBar itself will read local cost logs under your home directory (as documented) when you run it — if you don't want that, run the bundled Python script on an exported JSON file instead. If you'd like greater assurance, review the upstream codexbar source or the installed cask before installing.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📊 Clawdis
OSmacOS
Binscodexbar

Install

Install CodexBar (brew cask)
Bins: codexbar
latestvk97e3jx71cqak86qk3vwk7ncsx81atg1
549downloads
0stars
1versions
Updated 1mo ago
v0.1.0
MIT-0
macOS

Model usage

Overview

Get per-model usage cost from CodexBar's local cost logs. Supports "current model" (most recent daily entry) or "all models" summaries for Codex or Claude.

TODO: add Linux CLI support guidance once CodexBar CLI install path is documented for Linux.

Quick start

  1. Fetch cost JSON via CodexBar CLI or pass a JSON file.
  2. Use the bundled script to summarize by model.
python {baseDir}/scripts/model_usage.py --provider codex --mode current
python {baseDir}/scripts/model_usage.py --provider codex --mode all
python {baseDir}/scripts/model_usage.py --provider claude --mode all --format json --pretty

Current model logic

  • Uses the most recent daily row with modelBreakdowns.
  • Picks the model with the highest cost in that row.
  • Falls back to the last entry in modelsUsed when breakdowns are missing.
  • Override with --model <name> when you need a specific model.

Inputs

  • Default: runs codexbar cost --format json --provider <codex|claude>.
  • File or stdin:
codexbar cost --provider codex --format json > /tmp/cost.json
python {baseDir}/scripts/model_usage.py --input /tmp/cost.json --mode all
cat /tmp/cost.json | python {baseDir}/scripts/model_usage.py --input - --mode current

Output

  • Text (default) or JSON (--format json --pretty).
  • Values are cost-only per model; tokens are not split by model in CodexBar output.

References

  • Read references/codexbar-cli.md for CLI flags and cost JSON fields.

Comments

Loading comments...