Agent Skillswukongrobot/wukongbot › model-usage

model-usage

GitHub

调用 CodexBar CLI 获取并汇总 AI 模型(Codex/Claude)的本地使用成本数据,支持按当前或全模型输出摘要。

skills/model-usage/SKILL.md wukongrobot/wukongbot

触发场景

查询 CodexBar 的模型级使用量或成本数据 需要脚本化解析 CodexBar 成本 JSON 以获取每模型摘要

安装

npx skills add wukongrobot/wukongbot --skill model-usage -g -y
更多选项

不安装直接使用

npx skills use wukongrobot/wukongbot@model-usage

指定 Agent (Claude Code)

npx skills add wukongrobot/wukongbot --skill model-usage -a claude-code -g -y

安装 repo 全部 skill

npx skills add wukongrobot/wukongbot --all -g -y

预览 repo 内 skill

npx skills add wukongrobot/wukongbot --list

SKILL.md

Frontmatter
{
    "name": "model-usage",
    "metadata": {
        "moltbot": {
            "os": [
                "darwin"
            ],
            "emoji": "📊",
            "install": [
                {
                    "id": "brew-cask",
                    "bins": [
                        "codexbar"
                    ],
                    "cask": "steipete\/tap\/codexbar",
                    "kind": "brew",
                    "label": "Install CodexBar (brew cask)"
                }
            ],
            "requires": {
                "bins": [
                    "codexbar"
                ]
            }
        }
    },
    "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. Trigger when asked for model-level usage\/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON."
}

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

版本历史

  • 2a72816 当前 2026-08-20 10:14

同 Skill 集合

extensions/open-prose/skills/prose/SKILL.md
skills/1password/SKILL.md
skills/apple-notes/SKILL.md
skills/apple-reminders/SKILL.md
skills/bear-notes/SKILL.md
skills/bird/SKILL.md
skills/blogwatcher/SKILL.md
skills/blucli/SKILL.md
skills/bluebubbles/SKILL.md
skills/browserwing-executor/SKILL.md
skills/clawdhub/SKILL.md
skills/coding-agent/SKILL.md
skills/eightctl/SKILL.md
skills/gemini/SKILL.md
skills/gifgrep/SKILL.md
skills/github/SKILL.md
skills/gog/SKILL.md
skills/goplaces/SKILL.md
skills/himalaya/SKILL.md
skills/imsg/SKILL.md
skills/local-places/SKILL.md
skills/mcporter/SKILL.md
skills/nano-banana-pro/SKILL.md
skills/nano-pdf/SKILL.md
skills/notion/SKILL.md
skills/obsidian/SKILL.md
skills/openai-image-gen/SKILL.md
skills/openai-whisper-api/SKILL.md
skills/openai-whisper/SKILL.md
skills/openhue/SKILL.md
skills/oracle/SKILL.md
skills/ordercli/SKILL.md
skills/peekaboo/SKILL.md
skills/session-logs/SKILL.md
skills/sherpa-onnx-tts/SKILL.md
skills/skill-creator/SKILL.md
skills/slack/SKILL.md
skills/songsee/SKILL.md
skills/sonoscli/SKILL.md
skills/spotify-player/SKILL.md
skills/summarize/SKILL.md
skills/things-mac/SKILL.md
skills/tmux/SKILL.md
skills/trello/SKILL.md
skills/video-frames/SKILL.md
skills/voice-call/SKILL.md
skills/wacli/SKILL.md
skills/weather/SKILL.md
skills/camsnap/SKILL.md

元信息

文件数
0
版本
2a72816
Hash
e5595535
收录时间
2026-08-20 10:14

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-17 02:15
浙ICP备14020137号-1