Skip to content
Agentmart
Submit a tool

model-usage

使用 CodexBar CLI 本地成本使用情况来汇总 Codex 或 Claude 的按模型使用情况,包括当前(最新)模型或完整的模型细分。当被要求提供 codexbar 的模型级别使用/成本数据,或需要从 codexbar cost JSON 获取可脚本化的按模型摘要时触发。

Skill by L-LesterYu

IndexedMIT★ 57
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/l-lesteryu-model-usage

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

使用 CodexBar CLI 本地成本使用情况来汇总 Codex 或 Claude 的按模型使用情况,包括当前(最新)模型或完整的模型细分。当被要求提供 codexbar 的模型级别使用/成本数据,或需要从 codexbar cost JSON 获取可脚本化的按模型摘要时触发。

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/model-usage

What's inside

Skill name
model-usage
Description
使用 CodexBar CLI 本地成本使用情况来汇总 Codex 或 Claude 的按模型使用情况,包括当前(最新)模型或完整的模型细分。当被要求提供 codexbar 的模型级别使用/成本数据,或需要从 codexbar cost JSON 获取可脚本化的按模型摘要时触发。
License
MIT
Instructions
41 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "model-usage" does not match folder "model-usage-zh"

Files (4)

  • SKILL.md
  • _meta.json
  • codexbar-cli.md · references/
  • model_usage.py · scripts/

SKILL.md (first lines)

# 模型使用情况

## 概述
从 CodexBar 的本地成本日志中获取按模型的使用成本。支持"当前模型"(最新的每日条目)或"所有模型"摘要,适用于 Codex 或 Claude。

待办:一旦 CodexBar CLI 在 Linux 上的安装路径有文档说明,将添加 Linux CLI 支持指南。

## 快速开始
1) 通过 CodexBar CLI 获取成本 JSON 或传递一个 JSON 文件。
2) 使用捆绑的脚本按模型汇总。

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

## 当前模型逻辑
- 使用包含 `modelBreakdowns` 的最新每日行。
- 选择该行中成本最高的模型。
- 当缺少细分时,回退到 `modelsUsed` 的最后一个条目。
- 当需要特定模型时,使用 `--model <name>` 覆盖。

## 输入
- 默认:运行 `codexbar cost --format json --provider <codex|claude>`。
- 文件或标准输入:

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

## 输出
- 文本(默认)或 JSON(`--format json --pretty`)。
- 数值仅为每个模型的成本;CodexBar 输出中未按模型拆分 token。

## 参考资料
- 阅读 `references/codexbar-cli.md` 了解 CLI 标志和成本 JSON 字段。

From L-LesterYu/OpenClaw-hot-skills-zh, MIT.

More from L-LesterYu/OpenClaw-hot-skills-zh

Signals

Stars
57
Forks
9
Open issues
0
Last commit (this folder)
Mar 15, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from L-LesterYu

Cite this page

model-usage skill. Agent Mart. https://agentmart.dev/skills/l-lesteryu-model-usage (last updated 2026-10-24)