ClawCost
v1.0.2Track OpenClaw agent costs. Check daily/weekly spending and model breakdown.
⭐ 0· 720·1 current·1 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the code and instructions: the skill is a Python script that reads OpenClaw session logs (~/.openclaw/agents/main/sessions/*.jsonl) to compute daily/weekly/all-time costs and model breakdowns, and stores settings under ~/.clawcost/config.json. Required binary (python3) is appropriate and no extraneous credentials or unrelated binaries are requested.
Instruction Scope
SKILL.md instructs running the included script and formatting output; the script implements those actions and stays within scope (reads session logs, aggregates cost, writes a local config). Notes: (1) the script reads the user's session files — these can contain conversation content; the script only extracts usage/cost fields but still opens and parses the session files. (2) There is a small bug: when run with --format json the code attempts to use args.user (which does not exist) instead of the local 'user' variable, which will raise an AttributeError; this is an availability/quality issue, not malicious behavior.
Install Mechanism
No install spec is provided (instruction-only with an included Python script). That is low-risk compared to remote downloads. The script is shipped with the skill (scripts/clawcost.py) so nothing will be fetched from external URLs during install.
Credentials
The skill requests no environment variables or credentials. It uses standard user-local paths (HOME via Path.home()) and reads/writes only: ~/.openclaw/agents/main/sessions/*.jsonl (read) and ~/.clawcost/config.json (read/write). These accesses are proportional to a local cost-tracking tool. The script also reads USER env var for display (non-sensitive).
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It writes only its own config under ~/.clawcost, which is reasonable for storing the initial balance/budget.
Assessment
This skill appears to do what it says: it runs locally, reads your OpenClaw session logs to compute costs, and stores a small local config file. Before installing, consider: 1) inspect the included script (scripts/clawcost.py) yourself — it's short and readable; 2) be aware it reads session log files in ~/.openclaw/agents/main/sessions/*.jsonl (those files may contain conversation content), so if those logs are sensitive, review access policies or run the tool on a copy; 3) the tool writes ~/.clawcost/config.json to store initial_balance and budget — back up any existing config or check permissions; 4) there's a minor bug with JSON output mode (uses args.user) that can crash the script — run in text mode first or fix the variable; 5) if you want extra assurance, run the script in a sandboxed environment or with a non-privileged user and test with sample session files.Like a lobster shell, security has layers — review code before you run it.
latestvk973sz1b3aqr8jd3efk8vhmyxn812755
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
💰 Clawdis
Binspython3
