← 返回 Skills 市场
xhmqq616

Token Usage Tracker

作者 xhmqq616 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
142
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install token-usage-tracker
功能描述
Token 使用追踪系统。记录每个对话的输入/输出 token 消耗,累计统计,预算控制。 当用户说"token统计"、"用量追踪"、"消耗了多少"、"花了我多少token"时触发。
安全使用建议
This skill looks coherent and locally scoped, but check two small issues before installing: (1) the SKILL.md import example uses require(...) while the file is an ES module — import it with ESM syntax or adapt as needed; (2) the README implies prompts might be recorded but the code only stores numeric token counts (it does not persist raw prompt/response text). Also note the tracker writes a JSON file by default at ./ .usage-tracker.json — if that location is sensitive, set storagePath to a secure directory with appropriate permissions. If you need the skill to keep no disk traces, do not enable it or pass a temporary in-memory path. Otherwise it is internally consistent and does not request secrets or network access.
功能分析
Type: OpenClaw Skill Name: token-usage-tracker Version: 1.0.0 The skill is a utility for tracking and budgeting token usage in AI conversations. It implements local state persistence using a JSON file (.usage-tracker.json) and provides logic for token estimation and cost calculation based on Claude API pricing. The code in scripts/usage-tracker.mjs and the instructions in SKILL.md are well-aligned with the stated purpose and do not exhibit any signs of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
The name/description (token usage tracking, budgeting) matches the code and SKILL.md: functions to estimate tokens, record turns, compute stats, check budgets, and export history are implemented. No unrelated credentials or binaries are requested.
Instruction Scope
SKILL.md shows example usage and describes storing prompts in the TurnUsage interface, but the implementation only records numeric token counts (it does not persist raw prompt/response text). Also the README example uses require(...) (CommonJS) while the shipped file is an ES module (.mjs with export), so the import example is incorrect — callers must use import or adjust usage. Aside from these doc mismatches, the instructions do not ask the agent to read unrelated system files or exfiltrate data.
Install Mechanism
There is no install spec and no downloads; this is an instruction + code-only skill with no external install artifacts. That minimizes supply-chain risk.
Credentials
The skill does not request environment variables, credentials, or config paths. Its behavior (local counting and budgeting) does not require secrets, so the lack of required env vars is appropriate.
Persistence & Privilege
The tracker persists data to disk by default (storagePath defaults to './.usage-tracker.json'). This is reasonable for a usage tracker, but users should be aware it writes a JSON file in the current working directory (or whatever storagePath is provided). No evidence of attempts to modify other skills or system-wide settings; always:false and no elevated privileges are requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install token-usage-tracker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /token-usage-tracker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the usage-tracker skill for tracking token usage. - Tracks input/output tokens per conversation turn, maintaining cumulative stats and budget controls. - Supports commands like "token统计", "用量追踪", "消耗了多少", and "花了我多少token" for usage reporting. - Provides cost estimation based on Claude API pricing and simple token estimation logic. - Emits warnings when usage approaches or exceeds defined budgets.
元数据
Slug token-usage-tracker
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Token Usage Tracker 是什么?

Token 使用追踪系统。记录每个对话的输入/输出 token 消耗,累计统计,预算控制。 当用户说"token统计"、"用量追踪"、"消耗了多少"、"花了我多少token"时触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 142 次。

如何安装 Token Usage Tracker?

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

Token Usage Tracker 是免费的吗?

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

Token Usage Tracker 支持哪些平台?

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

谁开发了 Token Usage Tracker?

由 xhmqq616(@xhmqq616)开发并维护,当前版本 v1.0.0。

💬 留言讨论