π¦ ClawHub
CostLens
by @mike007jd
Calculate OpenClaw usage cost from offline event logs, apply budget thresholds, and export operator-facing reports.
TERMINAL
clawhub install costlensπ About This Skill
name: costlens description: Calculate OpenClaw usage cost from offline event logs, apply budget thresholds, and export operator-facing reports. homepage: https://github.com/mike007jd/openclaw-skills/tree/main/costlens metadata: {"openclaw":{"emoji":"πΈ","requires":{"bins":["node"]}}}
CostLens
Turn JSON usage events into cost summaries, budget checks, and offline reports.
When to use
Commands
node {baseDir}/bin/costlens.js monitor --events ./events.json --budget 10.00 --threshold 80
node {baseDir}/bin/costlens.js budget check --events ./events.json --budget 5.00 --format json
node {baseDir}/bin/costlens.js report --events ./events.json --out ./reports/cost-report.json
Built-in default rates
| Model | Input/1k | Output/1k | | --- | --- | --- | | gpt-4.1 | $0.01 | $0.03 | | gpt-4o-mini | $0.00015 | $0.0006 | | claude-3-5-sonnet | $0.003 | $0.015 | | default | $0.002 | $0.008 |
Events can override the defaults with inputCostPer1k and outputCostPer1k.
Event shape
[
{
"model": "gpt-4.1",
"promptTokens": 1500,
"completionTokens": 800,
"timestamp": "2026-02-26T10:00:00Z"
}
]
Output
ok, warning, or critical)