MyClaw
HomeProductsUse CasesPricingSkillsResourcesCompany
HomeUse CasesPricingSkills
Sign In
Home
ProductsOpenClaw HostingHermes Agent Hosting
Use CasesPricingSkills
ResourcesCompareTutorialLearnBlogUpdatesResourcesCommunity
CompanyAboutSupport
Sign In
MyClaw.ai

Your AI agent, already running.

Product

OpenClaw HostingHermes Agent HostingUse CasesPricingCompareAlibaba Cloud

Resources

BlogUpdatesSkillsModelsSupportCommunityCapybara

Legal

TermsPrivacyCookieGDPRContact

© 2023 Cubo World Inc. All rights reserved.

← Back to Skills
Coding Agents & IDEs
🖥️

Model Usage

Summarize per-model AI cost usage from CodexBar's local logs — supports Codex and Claude, current or all-model breakdowns.

Peter Steinbergerv1.0.0
ProductivityAI PoweredAutomationCLIDeveloper Tool
Connecting to VM...
Connecting to VM...
npx clawhub@latest install model-usage
69Stars
19.9kDownloads
9Current Installs
797All-time Installs
📦
v1.0.0Version
📅
Feb 26, 2026Updated

Platforms

darwin
View Source(ClawHub)

Model Usage Skill Overview

Model Usage is a skill that reads CodexBar's local cost logs and produces per-model spending summaries for Codex or Claude. It can report on the single most-recently-used model ("current") or aggregate costs across every model in your history. Output is available as human-readable text or structured JSON, making it easy to pipe into dashboards or scripts.

How to Use It

Step 1: Run in your terminal or install this skill on MyClaw

npx clawhub@latest install model-usage
or

Click the Install button at the top of this page for one-click setup

When to Use Model Usage

Best Fit

  • You use CodexBar on macOS and want to know which AI model is costing the most right now.
  • You need a scriptable, machine-readable breakdown of model-level costs from CodexBar's JSON output.
  • You want to compare spending across all models (e.g., gpt-4o vs claude-3-5-sonnet) over your usage history.
  • You want to feed model cost data into another tool or CI check via --format json --pretty.

When Not to Use

  • You are on Linux — CodexBar CLI support for Linux is not yet documented and this skill is macOS-only.
  • You need token-level breakdowns per model — CodexBar's output provides cost only, not token splits.
  • You are not using CodexBar at all — this skill has no value without CodexBar's local cost logs.

Key Features

Current-model detection

Automatically identifies the most recently used model by finding the latest daily row containing modelBreakdowns and selecting the highest-cost model. Falls back to modelsUsed when breakdowns are absent, and supports a manual --model <name> override.

Full model breakdown (all-models mode)

Aggregates cost data across every model in your CodexBar history with --mode all, giving you a complete picture of where your AI spend is going.

Codex and Claude provider support

Works with both --provider codex and --provider claude, covering the two main providers tracked by CodexBar.

Flexible input sources

Can fetch data live via codexbar cost --format json, read from a saved file with --input /path/to/cost.json, or accept piped stdin with --input -.

Text and JSON output formats

Returns human-readable text by default. Pass --format json --pretty to get structured JSON output suitable for scripting or further processing.

Use Cases

Daily cost check for active model

Run --provider codex --mode current each morning to instantly see which model you used most recently and what it cost, without digging through raw JSON logs.

Monthly model-spend audit

Use --mode all --format json --pretty to export a full model-by-model cost breakdown, then import it into a spreadsheet or cost-tracking dashboard.

Scripted cost alerting

Pipe the JSON output into a shell script or CI job that checks whether any model's cost exceeds a threshold, enabling automated budget guardrails.

Comparing Codex vs Claude spend

Run the skill twice — once with --provider codex and once with --provider claude — to compare total spending across both providers side by side.

Connecting to VM...
npx clawhub@latest install model-usage
69Stars
19.9kDownloads
9Current Installs
797All-time Installs
📦
v1.0.0Version
📅
Feb 26, 2026Updated

Platforms

darwin
View Source(ClawHub)

FAQ

Reviews

0 reviews

Log in to write a review

No reviews yet. Be the first to share your experience!