model-usage skill
Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.
Is the model-usage skill safe?
Clean: nothing in its files matched our rules. We read 4 files in the folder on 2026-11-10.
No findings.
Install the model-usage skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw mkdir -p ~/.claude/skills cp -r /tmp/openclaw/skills/model-usage ~/.claude/skills/model-usage
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
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.
CodexBar ships CLI builds for macOS and Linux. When codexbar is on PATH, the skill reads local usage directly; the bundled Python summarizer also accepts exported CodexBar JSON through --input anywhere Python is available.
Quick start
- Fetch cost JSON via CodexBar CLI or pass a JSON file.
- 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 --prettyCurrent 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 when you need a specific model.
Inputs
- Default: runs codexbar cost --format json --provider .
- macOS and Linux: use the bundled Homebrew formula installer above for live local usage reads. Linux users can also use CodexBar's AUR package or official release tarballs.
- Other platforms: use --input with exported CodexBar JSON.
- 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 currentOutput
- 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.
More skills from openclaw/openclaw
- A1passwordSet up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
- Aacp-routerRoute plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.
- Aadd-model-providerAdd and live-prove a model provider with non-interactive config one-liners, without exposing credentials.
- Aagent-transcriptRequested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.
- Aapple-notesCreate, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
- Aapple-remindersList, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.
- Aauto-qaRun OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.
- AautoreviewStructured code review through the shared OpenClaw agent-skills installation.
- Abear-notesCreate, search, and manage Bear notes via grizzly CLI.
- Ablock-kitUse proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.
- AblogwatcherMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
- AblucliBluOS CLI (blu) for discovery, playback, grouping, and volume.