Skip to content
Back to skills

Model Usage 1.0.0

ASecurity

汇总 Codex 或 Claude 的各模型使用情况。**Auto-trigger**: 当用户询问模型使用情况、成本统计、token 消耗时自动使用。

  • 8 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 12, 2026
toolspythonbash

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add lza6/Claude-code-cli-config --skill model-usage-1.0.0 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Usage 1.0.0?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Usage 1.0.0
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lza6-model-usage-1-0-0/badge)](https://www.skillsdirectory.com/skills/lza6-model-usage-1-0-0)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-usage
description: '汇总 Codex 或 Claude 的各模型使用情况。**Auto-trigger**: 当用户询问模型使用情况、成本统计、token 消耗时自动使用。'
metadata: {"clawdbot":{"emoji":"📊","os":["darwin"],"requires":{"bins":["codexbar"]},"install":[{"id":"brew-cask","kind":"brew","cask":"steipete/tap/codexbar","bins":["codexbar"],"label":"Install CodexBar (brew cask)"}]}}
---

# 模型使用情况

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

TODO: 一旦 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 字段。

Files in this skill

  • SKILL.md1.9 KB
  • _meta.json130 B
  • references/codexbar-cli.md1.2 KB
  • scripts/model_usage.py10.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.