← Back to Skills Marketplace
142
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install token-usage-tracker
Description
Token 使用追踪系统。记录每个对话的输入/输出 token 消耗,累计统计,预算控制。 当用户说"token统计"、"用量追踪"、"消耗了多少"、"花了我多少token"时触发。
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install token-usage-tracker - After installation, invoke the skill by name or use
/token-usage-tracker - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is Token Usage Tracker?
Token 使用追踪系统。记录每个对话的输入/输出 token 消耗,累计统计,预算控制。 当用户说"token统计"、"用量追踪"、"消耗了多少"、"花了我多少token"时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 142 downloads so far.
How do I install Token Usage Tracker?
Run "/install token-usage-tracker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Token Usage Tracker free?
Yes, Token Usage Tracker is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Token Usage Tracker support?
Token Usage Tracker is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Token Usage Tracker?
It is built and maintained by xhmqq616 (@xhmqq616); the current version is v1.0.0.
More Skills