Agent skill

Model Usage

by openclaw in openclaw/openclaw

Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

MITAuto-check passed

Install Model Usage

skills CLI
$ npx skills add openclaw/openclaw --skill model-usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openclaw/openclaw model-usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openclaw/openclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/model-usage .claude/skills/model-usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
model-usage
GitHub stars
392k
Used in
1 other repo
Token cost
~637 tokens
SKILL.md length
206 words
Files
4 (incl. scripts, references)
Skills in repo
96
Repo updated
First seen
Licence
MIT

At a glance

Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

  • Works in 2 steps: Fetch cost JSON via CodexBar CLI or pass… → Use the bundled script to summarize by…
  • SKILL.md covers Overview, Quick start, Current model logic and Inputs, plus 2 more sections
  • Runs Python scripts from its folder; calls python

What it does

Model Usage is an agent skill from openclaw/openclaw. Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/codexbar-cli.md`, `scripts/model_usage.py` and `scripts/test_model_usage.py`).

It works with Linux. The repository describes itself as: The AI that really does things. Any OS. Any Platform. The lobster way. 🦞. The licence is MIT.

Example prompts

  • “/model-usage”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Fetch cost JSON via CodexBar CLI or pass a JSON file.
  2. Use the bundled script to summarize by model.

What it can do on your machine

Read from SKILL.md and the folder at commit f8e594e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • aur.archlinux.org
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Model Usage loads about 637 tokens when it runs, and up to ~962 if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 206 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~637
With references · SKILL.md plus every file in references/, read only if the agent opens them
~962

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from openclaw/openclaw at commit f8e594e, republished under its MIT licence (© openclaw). 206 words, ~637 tokens.

Download SKILL.mdSave it as .claude/skills/model-usage/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
model-usage
description
Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

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

  1. Fetch cost JSON via CodexBar CLI or pass a JSON file.
  2. Use the bundled script to summarize by model.
bash
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>.
  • 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:
bash
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.

© openclaw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/model-usage of openclaw/openclaw.

  • SKILL.md
  • references/codexbar-cli.md
  • scripts/model_usage.py
  • scripts/test_model_usage.py

Open the folder on GitHubat commit f8e594e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in openclaw/openclaw, which our catalogue first saw on October 9, 2026.

Compare with similar skills

Model Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Model Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Model Usage this skillopenclaw/openclaw392k1 repos~637Automated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Upgrade Browserflutter/flutter179k—~1.1kAutomated safety check: PassBSD-3-Clause
K8s Security PoliciesCybereason-Public/owLSM28012 repos~2kAutomated safety check: PassGPL-2.0
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • K8s Security Policies

    Cybereason-Public/owLSM

    Comprehensive guide for implementing NetworkPolicy, PodSecurityPolicy, RBAC, and Pod Security Standards in Kubernetes.

    280 GitHub starsUsed in 12 repos~2k tokens
    Backend & APIsAuto-check passed
  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from openclaw/openclaw

All 96 skills in this repo
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Feishu Doc

    openclaw/openclaw

    Feishu document read/write workflows. An agent skill from openclaw/openclaw.

    392k GitHub stars~516 tokensUpdated today
    Auto-check passed
  • Tmux

    openclaw/openclaw

    Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.

    392k GitHub starsUsed in 1 repo~640 tokens
    Auto-check passed
  • Openclaw PR Maintainer

    openclaw/openclaw

    Review, triage, repair, or land OpenClaw issues and pull requests with current-source evidence and the native maintainer workflow.

    392k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Browser Automation

    openclaw/openclaw

    A skill your agent uses when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

    392k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Clawsweeper

    openclaw/openclaw

    A skill your agent uses for all ClawSweeper work: OpenClaw issue/PR sweep reports, repair jobs, cloud fix PRs, @clawsweeper maintainer mention commands, trusted ClawSweeper-reviewed…

    392k GitHub stars~3k tokensUpdated today
    Auto-check passed

Works with

Questions about Model Usage

What does Model Usage do?

Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns. Model Usage is an agent skill from openclaw/openclaw. Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

How do I install Model Usage in Claude Code?

Run `npx skills add openclaw/openclaw --skill model-usage -a claude-code`. Or copy the skill folder (skills/model-usage in openclaw/openclaw) into .claude/skills/model-usage in your project. Claude Code loads it when a task matches its description.

How do I install Model Usage in Codex?

Run `npx skills add openclaw/openclaw --skill model-usage -a codex`. Or copy the skill folder (skills/model-usage in openclaw/openclaw) into .agents/skills/model-usage in your project. Codex loads it when a task matches its description.

Can I use Model Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openclaw/openclaw --skill model-usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/model-usage, .gemini/skills/model-usage, .github/skills/model-usage and .opencode/skills/model-usage in your project.

What does Model Usage need to run?

Going by SKILL.md and its folder, Model Usage needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Model Usage access the network?

SKILL.md names 2 domains. As links in the text: aur.archlinux.org and github.com. This is read from the text; nothing was executed.

Is Model Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Model Usage use?

Model Usage is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Model Usage use?

About 637 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 325 tokens, read only when the agent opens those files.

What are the alternatives to Model Usage?

Skills that share tags, products or a category with Model Usage: Configuring Horizon (coollabsio/coolify, 63k stars), Engine Whats New (flutter/flutter, 179k stars), Upgrade Browser (flutter/flutter, 179k stars) and K8s Security Policies (Cybereason-Public/owLSM, 280 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Model Usage?

openclaw (a GitHub organization) maintains it in openclaw/openclaw, which has 391,504 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on October 9, 2026.

Source: openclaw/openclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.