← 返回 Skills 市场
Token Tamer — AI API Cost Control
作者
Shadow Rose
· GitHub ↗
· v1.1.0
· MIT-0
238
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install token-tamer
功能描述
Monitor, budget, and optimize AI API spending across any provider. Tracks every call, enforces budgets, detects waste, provides optimization recommendations.
安全使用建议
This appears to be a local, instruction-driven cost tracker that matches its description. Before installing: 1) Copy and edit config_example.py to set USAGE_FILE to a safe location you control; do not leave paths pointing to root or other sensitive dirs. 2) Ensure all your application API calls call tamer.log_usage()/check_before_call() if you want enforcement — the tool does not intercept calls automatically. 3) Back up the USAGE_FILE if you need history and avoid concurrent writes (multiple processes may corrupt the JSON). 4) Note the kill switch is process-local (resets on restart) and webhook/export fields are present in config_example but not active by default — review any future changes that enable network exports. 5) If you need team-wide or multi-host tracking, migrate to a DB or central exporter (the skill is intentionally local-only). Overall the package is coherent and does not request unrelated secrets or perform hidden network activity.
功能分析
Type: OpenClaw Skill
Name: token-tamer
Version: 1.1.0
The 'Token Tamer' skill bundle is a utility designed to track and optimize AI API costs by logging usage to a local JSON file. The code (token_tamer.py, token_reports.py, token_optimizer.py) uses only Python standard libraries and performs legitimate operations such as cost calculation, budget enforcement, and report generation. No evidence of data exfiltration, malicious execution, or prompt injection was found; the file access is limited to the configured usage log, and the documentation accurately reflects the code's functionality.
能力评估
Purpose & Capability
Name/description (API cost tracking, budgets, waste detection) align with the provided code and SKILL.md. The code implements local logging, cost calculation, reports, and heuristics for waste — everything needed for the stated purpose. No unrelated cloud credentials, binaries, or capabilities are requested.
Instruction Scope
SKILL.md instructions limit the agent to local setup (copy config, set filepath, call log_usage, run CLI scripts). Instructions do not ask the agent to read unrelated system files, environment variables, or transmit data externally. Limitations are documented (manual logging, no provider reconciliation).
Install Mechanism
There is no install spec and code is pure-Python stdlib. Nothing is downloaded or written to system locations apart from the configured usage JSON file. This is low-risk compared with remote installers or archive extraction.
Credentials
The skill declares no required env vars, no credentials, and the code only imports a local token_config module. Config fields for webhooks exist in the example but default to None; there are no implementations that automatically send data to external endpoints. Requested configuration is proportional to purpose.
Persistence & Privilege
The skill persists usage to a local JSON file (USAGE_FILE) and will create parent directories when saving. Kill-switch state is in-memory and resets on process restart (documented). This file-write behavior is expected for a tracker but you should ensure USAGE_FILE path and permissions are acceptable for your environment; concurrent writers may corrupt the file (documented limitation).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install token-tamer - 安装完成后,直接呼叫该 Skill 的名称或使用
/token-tamer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Fixed SKILL.md API examples — corrected method names (log_usage not record_usage), constructor args, class names (ReportGenerator/WasteDetector/Optimizer), and CLI flags to match actual code
v1.0.0
Initial release
元数据
常见问题
Token Tamer — AI API Cost Control 是什么?
Monitor, budget, and optimize AI API spending across any provider. Tracks every call, enforces budgets, detects waste, provides optimization recommendations. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 238 次。
如何安装 Token Tamer — AI API Cost Control?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install token-tamer」即可一键安装,无需额外配置。
Token Tamer — AI API Cost Control 是免费的吗?
是的,Token Tamer — AI API Cost Control 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Token Tamer — AI API Cost Control 支持哪些平台?
Token Tamer — AI API Cost Control 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Token Tamer — AI API Cost Control?
由 Shadow Rose(@theshadowrose)开发并维护,当前版本 v1.1.0。
推荐 Skills