← 返回 Skills 市场
asauler

Token Stats

作者 A_Saul读A不读鹅 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
242
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install token-stats
功能描述
统计 OpenClaw 的 token 用量。扫描所有 session JSONL 文件,输出 prompt/cache/output token 明细。Use when: user asks about token usage, cost, consumption, how many tokens were u...
安全使用建议
This skill appears to do exactly what it says: locally scan your OpenClaw session JSONL files and report token usage. Before running, consider: (1) inspect the included scripts/token_stats.py (already provided) to confirm you’re comfortable with its file reads; (2) it reads files under ~/.openclaw/agents/<agent>/sessions (and optional .deleted/.bak files) — if those files contain sensitive content beyond token metadata, be aware the script will read them locally; (3) SKILL.md uses a {baseDir} example but the script reads your home path directly, so you can run it from anywhere with python3; (4) no network or credential access is required. If you want extra assurance, run the script in a restricted environment or review it line-by-line (it is short and uses only standard library file I/O and JSON parsing).
功能分析
Type: OpenClaw Skill Name: token-stats Version: 1.0.0 The skill provides token usage statistics by scanning local OpenClaw session JSONL files. The Python script (scripts/token_stats.py) uses only standard libraries to aggregate data from the application's own data directory (~/.openclaw/) and contains no network activity, obfuscation, or unauthorized file access.
能力评估
Purpose & Capability
Name/description (token usage stats) match the provided script and SKILL.md. The script only needs to read session JSONL files under ~/.openclaw/agents/<agent>/sessions to compute prompt/cache/output token details, which is exactly what the description promises.
Instruction Scope
SKILL.md instructs running the included Python script. The script's runtime behavior is limited to reading session JSONL files and sessions.json in the user's OpenClaw home directory and aggregating usage fields. It does not access unrelated system paths, environment variables, or external endpoints. Minor note: SKILL.md examples use a {baseDir} placeholder, but the script itself reads ~/.openclaw directly, so running it from any directory works.
Install Mechanism
No install specification (instruction-only plus an included script). No downloads or package installs are performed by the skill; it requires only a Python interpreter present on the system, which is proportional for a Python utility.
Credentials
The skill declares no required environment variables or credentials. The script reads only files under ~/.openclaw/agents/<agent>/sessions and sessions.json, which is appropriate for computing OpenClaw token statistics; no unrelated secrets or cloud credentials are requested.
Persistence & Privilege
Flags show no forced persistence (always:false). The skill does not modify other skills or global agent configuration; it only reads session files and prints results. It does not store tokens or install background services.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install token-stats
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /token-stats 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: scan OpenClaw session JSONL files, report prompt/cache/output token breakdown with correct negative-input handling
元数据
Slug token-stats
版本 1.0.0
许可证 MIT-0
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Token Stats 是什么?

统计 OpenClaw 的 token 用量。扫描所有 session JSONL 文件,输出 prompt/cache/output token 明细。Use when: user asks about token usage, cost, consumption, how many tokens were u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 242 次。

如何安装 Token Stats?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install token-stats」即可一键安装,无需额外配置。

Token Stats 是免费的吗?

是的,Token Stats 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Token Stats 支持哪些平台?

Token Stats 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Token Stats?

由 A_Saul读A不读鹅(@asauler)开发并维护,当前版本 v1.0.0。

💬 留言讨论