model-usage

Per-model cost summaries from CodexBar CLI logs for Codex or Claude providers. Supports two summary modes: "current" (most recent daily model with highest cost) and "all" (full model breakdown across all logged days) Accepts input via live CodexBar CLI invocation, JSON file, or stdin; outputs as plain text or formatted JSON Requires CodexBar CLI installed locally (macOS only via Homebrew; Linux support pending) Falls back to last entry in modelsUsed when model breakdowns are unavailable; override with --model flag for specific model queries

INSTALLATION
npx skills add https://github.com/steipete/clawdis --skill model-usage
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2a

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.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card