模型使用情况
SkillAI & modelsUses CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (latest) model or a full model breakdown. Trigger when asked for codexbar model-level usage/cost data, or when a scriptable per-model summary from codexbar cost JSON is needed.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the 模型使用情况 skill
What this skill tells your AI
The instructions your AI receives, as published by l-lesteryu/openclaw-hot-skills-zh in skills/model-usage-zh/SKILL.md and read by ahel’s review.
概述
从 CodexBar 的本地成本日志中获取按模型的使用成本。支持"当前模型"(最新的每日条目)或"所有模型"摘要,适用于 Codex 或 Claude。
待办:一旦 CodexBar CLI 在 Linux 上的安装路径有文档说明,将添加 Linux CLI 支持指南。
快速开始
- 通过 CodexBar CLI 获取成本 JSON 或传递一个 JSON 文件。
- 使用捆绑的脚本按模型汇总。
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
当前模型逻辑
- 使用包含
modelBreakdowns的最新每日行。 - 选择该行中成本最高的模型。
- 当缺少细分时,回退到
modelsUsed的最后一个条目。 - 当需要特定模型时,使用
--model <name>覆盖。
输入
- 默认:运行
codexbar cost --format json --provider <codex|claude>。 - 文件或标准输入:
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
输出
- 文本(默认)或 JSON(
--format json --pretty)。 - 数值仅为每个模型的成本;CodexBar 输出中未按模型拆分 token。
参考资料
- 阅读
references/codexbar-cli.md了解 CLI 标志和成本 JSON 字段。
Signals
- GitHub stars
- 54
- Forks
- 8
- Last commit
- Apr 2026
Advanced
- Catalog kind
- skill
- Gateway key
model-usage-l-lesteryu- Source
- github.com/l-lesteryu/openclaw-hot-skills-zh