← Back to Skills Marketplace
dasweltall

OpenClaw Cost Guard (Budgets + Token-Saving Playbook)

by CodingPenguin44 · GitHub ↗ · v0.1.0
cross-platform ✓ Security Clean
2764
Downloads
4
Stars
10
Active Installs
1
Versions
Install in OpenClaw
/install openclaw-cost-guard
Description
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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-cost-guard
  3. After installation, invoke the skill by name or use /openclaw-cost-guard
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug openclaw-cost-guard
Version 0.1.0
License
All-time Installs 10
Active Installs 10
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 2764 downloads so far.

How do I install OpenClaw Cost Guard (Budgets + Token-Saving Playbook)?

Run "/install openclaw-cost-guard" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is OpenClaw Cost Guard (Budgets + Token-Saving Playbook) free?

Yes, OpenClaw Cost Guard (Budgets + Token-Saving Playbook) is completely free (open-source). You can download, install and use it at no cost.

Which platforms does OpenClaw Cost Guard (Budgets + Token-Saving Playbook) support?

OpenClaw Cost Guard (Budgets + Token-Saving Playbook) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created OpenClaw Cost Guard (Budgets + Token-Saving Playbook)?

It is built and maintained by CodingPenguin44 (@dasweltall); the current version is v0.1.0.

💬 Comments