Cost Tracking for Models
WarnAudited by ClawScan on May 10, 2026.
Overview
The skill mostly fits cost reporting, but it has an unsafe shell wrapper and can expose session-log error details in Discord-style reports.
Install only if you are comfortable with the skill reading local OpenClaw session logs. Avoid using the Node CLI with untrusted or free-form arguments until the shell invocation is hardened, and review any Discord or cron setup to ensure it does not share sensitive error details.
Findings (3)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
A crafted invocation could run unintended commands on the user’s machine.
The wrapper passes raw command-line arguments into a shell command string with only double-quote wrapping. Arguments containing quotes or shell metacharacters could break out before the shell script validates options.
const args = process.argv.slice(2); ... execSync(`"${scriptPath}" ${args.map(arg => `"${arg}"`).join(' ')}`, {Use execFileSync or spawnFileSync with an argument array and shell:false, validate allowed options, and replace shell chmod with fs.chmodSync.
Private session or provider error details could be posted to a Discord channel when using the Discord report workflow.
The Discord report helper intentionally extracts errorMessage values from persistent OpenClaw session logs and formats them for output, which may include more than cost/model totals.
./cost_report.sh --today --format discord --show-errors ... cd ~/.openclaw/agents/main/sessions ... grep -a "errorMessage" ... jq -c '.message.model + ": " + .message.errorMessage'
Make error details opt-in, redact or truncate error messages by default, document exactly what log fields are shared, and limit reporting to user-approved channels.
If used as-is, reports may be posted automatically on a schedule.
The artifact provides enabled recurring job examples that would run agent turns and deliver reports to Discord if a user imports or enables them.
"schedule": { "kind": "cron", "expr": "20 8 * * *" ... }, "payload": { "kind": "agentTurn", ... "deliver": true, "channel": "discord", "to": "dailyreport" }, "enabled": trueReview cron examples before enabling them, set the intended destination explicitly, and disable or remove jobs that should not run automatically.
