← 返回 Skills 市场
aviclaw

Token Budget Monitor

作者 aviclaw · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1098
总下载
1
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install token-budget-monitor
功能描述
Track and control token consumption across OpenClaw cron jobs
安全使用建议
This skill appears to do what it says: it reads config.json in the skill folder and writes a local usage file to ~/.openclaw/workspace/outputs/token-usage.json. It asks for no credentials and makes no network calls. Before installing: 1) Review and, if desired, change the OUTPUT_DIR path to a location you control and ensure appropriate file permissions. 2) Do not paste untrusted values into the integration command as shown; avoid building shell commands by concatenation. Instead invoke the script with a safe argument array (child_process.spawn or execFile) or validate/sanitize job and model names to prevent command injection. 3) If you plan to run this under different users or CI, verify how HOME is set (code falls back to /home/ubuntu). 4) Run it in a sandbox or test environment first to confirm it writes only the expected JSON file. Overall this skill is internally consistent and low-risk for typical usage.
功能分析
Type: OpenClaw Skill Name: token-budget-monitor Version: 1.0.0 The SKILL.md file contains an 'Integration' example that demonstrates a shell injection vulnerability. The `exec` call constructs a shell command by directly concatenating potentially untrusted inputs (`<job-name>` and `model`) without proper sanitization. This flaw could allow an attacker to execute arbitrary commands on the host system if they can control these input parameters, for example, through a malicious LLM response. This is a critical vulnerability, but there is no clear evidence of intentional malicious behavior (e.g., data exfiltration, backdoors) within the provided code or instructions, thus classifying it as suspicious rather than malicious.
能力评估
Purpose & Capability
Name and description (token-budget monitoring for cron jobs) align with the files and code: track-usage.js implements per-job tracking, daily limits, alerts, and model recommendations. Required resources (no env vars, no external binaries) are proportionate to the stated functionality.
Instruction Scope
Runtime instructions stay within scope (run the CLI commands and add a call after LLM calls). One minor concern: the Integration example recommends building a shell command via string concatenation passed to exec (exec('node /path/to/track-usage.js track <job-name> ' + usage.input_tokens + ' ' + usage.output_tokens + ' ' + model)). That pattern can lead to shell-injection if job or model values are attacker-controlled. Otherwise the SKILL.md does not instruct reading unrelated files or sending data externally.
Install Mechanism
Instruction-only skill with no install steps and no downloads — lowest-risk install model. There are local code files but nothing is fetched from external URLs.
Credentials
No environment variables, no secrets, and only minimal use of HOME (to choose output dir) — consistent with the purpose. The code reads a local config.json in the skill directory; no unexpected credential or config paths are requested.
Persistence & Privilege
Does not request permanent/always-on privileges, does not modify other skills or system-wide config. It writes usage data to ~/.openclaw/workspace/outputs/token-usage.json which is a limited persistence scope and expected for this tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install token-budget-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /token-budget-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release – track and control token consumption for OpenClaw cron jobs. - Monitor and report token usage by job, with daily and per-job limits. - Alerts when budgets are close to or exceeded. - Integration hooks for cron jobs and OpenClaw fallback chains. - Configuration options for limits, thresholds, and free model recommendations. - Includes command-line utilities to check status, check budgets, raise alerts, and get model recommendations.
元数据
Slug token-budget-monitor
版本 1.0.0
许可证
累计安装 5
当前安装数 5
历史版本数 1
常见问题

Token Budget Monitor 是什么?

Track and control token consumption across OpenClaw cron jobs. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1098 次。

如何安装 Token Budget Monitor?

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

Token Budget Monitor 是免费的吗?

是的,Token Budget Monitor 完全免费(开源免费),可自由下载、安装和使用。

Token Budget Monitor 支持哪些平台?

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

谁开发了 Token Budget Monitor?

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

💬 留言讨论