← Back to Skills Marketplace
landercortazarromero

Korta Model Usage

by landercortazarromero · GitHub ↗ · v1.0.0 · MIT-0
darwin ✓ Security Clean
86
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install korta-model-usage
Description
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...
README (SKILL.md)

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 \x3Cname> when you need a specific model.

Inputs

  • Default: runs codexbar cost --format json --provider \x3Ccodex|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.
Usage Guidance
This skill appears coherent and limited to parsing CodexBar cost JSON. Before installing: 1) Confirm the codexbar Homebrew tap (steipete/tap) is from a trusted maintainer — third-party taps can install arbitrary binaries. 2) Review or run the codexbar CLI separately to ensure it behaves as expected (it will run locally and may read local logs). 3) If you prefer not to install a third-party CLI, you can produce the cost JSON via other means and run the included Python script against the JSON file or stdin. 4) The bundled script does not exfiltrate data, but any CLI you install could; audit the codexbar project if you will install it system-wide.
Capability Analysis
Type: OpenClaw Skill Name: korta-model-usage Version: 1.0.0 The skill bundle is a utility for summarizing AI model usage costs by interfacing with the CodexBar CLI. The Python script (scripts/model_usage.py) safely processes JSON data from the local filesystem or via subprocess calls to the 'codexbar' binary without shell injection risks, and the documentation (SKILL.md) contains no malicious instructions or prompt injection attempts.
Capability Assessment
Purpose & Capability
Name/description ask for per-model usage from CodexBar and the skill requires the codexbar binary, provides a script that parses codexbar cost JSON, and documents codexbar CLI flags — all are proportionate and expected.
Instruction Scope
SKILL.md and the bundled script only run the codexbar CLI (or accept a JSON file/stdin) and parse local cost JSON; they do not reference unrelated files, environment variables, or external endpoints in the skill files.
Install Mechanism
Install spec uses a Homebrew cask from the tap 'steipete/tap' (steipete/tap/codexbar). Homebrew casks are reasonable for CLI install, but this is a third-party tap — verify the tap/maintainer before installing.
Credentials
No environment variables, credentials, or config paths are requested. The script only calls codexbar and reads JSON input from codexbar, a file, or stdin — proportions are appropriate for the stated task.
Persistence & Privilege
Skill does not request permanent/always-on presence and does not modify other skills or global agent settings. It only invokes a CLI and runs a local Python script.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install korta-model-usage
  3. After installation, invoke the skill by name or use /korta-model-usage
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of the model-usage skill for CodexBar. - Provides summary of per-model usage costs for Codex or Claude from local CodexBar cost logs. - Supports "current model" (most recent daily entry) or "all models" breakdowns. - Accepts input via CodexBar CLI output (default), a file, or stdin. - Output available in text or pretty JSON formats. - Includes quick start instructions and model selection logic.
Metadata
Slug korta-model-usage
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Korta Model Usage?

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... It is an AI Agent Skill for Claude Code / OpenClaw, with 86 downloads so far.

How do I install Korta Model Usage?

Run "/install korta-model-usage" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Korta Model Usage free?

Yes, Korta Model Usage is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Korta Model Usage support?

Korta Model Usage is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin).

Who created Korta Model Usage?

It is built and maintained by landercortazarromero (@landercortazarromero); the current version is v1.0.0.

💬 Comments