← 返回 Skills 市场
dasweltall

OpenClaw Cost Guard (Budgets + Token-Saving Playbook)

作者 CodingPenguin44 · GitHub ↗ · v0.1.0
cross-platform ✓ 安全检测通过
2764
总下载
4
收藏
10
当前安装
1
版本数
在 OpenClaw 中安装
/install openclaw-cost-guard
功能描述
Track OpenClaw/Clawdbot token and cost usage from session JSONL logs (prefer real usage.cost when present), generate daily/weekly summaries and top expensive sessions, and run budget checks (exit code on breach). Use to monitor spend, enforce budgets via cron/alerts, and apply a token-saving playbook to reduce output/tool-call cost.
安全使用建议
This skill appears to do what it says: read OpenClaw/Clawdbot session logs and report costs. Before installing/running: confirm the session log paths (~/.openclaw and ~/.clawdbot) are where you expect logs to live, review file permissions (these logs can contain chat content), and run the included script locally to inspect output. If you wire budget alerts to external services (Telegram, email, etc.), avoid embedding API tokens in the script or cron job; store credentials securely and limit recipients. If you want extra assurance, review the included scripts yourself or run them in a restricted user account.
功能分析
Type: OpenClaw Skill Name: openclaw-cost-guard Version: 0.1.0 The skill bundle is designed to track OpenClaw/Clawdbot token and cost usage from local session JSONL logs. The `scripts/extract_cost.py` script correctly targets only the specified log files (`~/.openclaw/...jsonl`, `~/.clawdbot/...jsonl`) and does not exhibit any network activity, arbitrary command execution, or access to other sensitive system files. The `SKILL.md` contains instructions for the AI agent (a 'Token-saving playbook'), which is a form of prompt injection, but its clear intent is to guide the agent towards more cost-efficient behavior, not to perform malicious actions or subvert user intent for harmful purposes. All observed behaviors are aligned with the stated purpose and lack high-risk or malicious indicators.
能力评估
Purpose & Capability
Name/description (cost guard, budgets, token-saving playbook) align with the provided files. The script reads session JSONL files under ~/.openclaw and ~/.clawdbot, extracts usage/cost, aggregates by day/session, and implements budget checks and JSON/text output — exactly what the skill claims.
Instruction Scope
SKILL.md instructs the agent to read the specified session log paths and run the included Python script with various flags; the instructions do not ask the agent to read unrelated paths, harvest environment secrets, or post data to external endpoints. The doc suggests wiring alerts to a channel (e.g., Telegram) but explicitly warns not to embed secrets and leaves implementation to the user.
Install Mechanism
No install spec and only a single Python script are included. There are no downloads or third-party installs, and the script is plain Python (no hidden binaries or archives). This is low-risk and proportionate for the described functionality.
Credentials
No required env vars or credentials are declared. Optional PRICE_* env vars are reasonable and explicitly documented for cost estimation fallback. The script does not request unrelated secrets or cloud credentials.
Persistence & Privilege
The skill is not always-enabled and makes no changes to agent/system configuration. It runs as a user-level script reading files under the user's home directory and returns nonzero exit codes for budget breaches as documented.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openclaw-cost-guard
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openclaw-cost-guard 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: accurate JSONL cost extraction (OpenClaw + Clawdbot), top expensive sessions, budget check (exit 2 on breach) for cron alerts, and a token-saving playbook to reduce spend.
元数据
Slug openclaw-cost-guard
版本 0.1.0
许可证
累计安装 10
当前安装数 10
历史版本数 1
常见问题

OpenClaw Cost Guard (Budgets + Token-Saving Playbook) 是什么?

Track OpenClaw/Clawdbot token and cost usage from session JSONL logs (prefer real usage.cost when present), generate daily/weekly summaries and top expensive sessions, and run budget checks (exit code on breach). Use to monitor spend, enforce budgets via cron/alerts, and apply a token-saving playbook to reduce output/tool-call cost. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2764 次。

如何安装 OpenClaw Cost Guard (Budgets + Token-Saving Playbook)?

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

OpenClaw Cost Guard (Budgets + Token-Saving Playbook) 是免费的吗?

是的,OpenClaw Cost Guard (Budgets + Token-Saving Playbook) 完全免费(开源免费),可自由下载、安装和使用。

OpenClaw Cost Guard (Budgets + Token-Saving Playbook) 支持哪些平台?

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

谁开发了 OpenClaw Cost Guard (Budgets + Token-Saving Playbook)?

由 CodingPenguin44(@dasweltall)开发并维护,当前版本 v0.1.0。

💬 留言讨论