Calculate and report daily OpenClaw API usage costs from session files. Use when asked about daily costs, spending, API usage, token costs, or "how much did we spend" questions. Returns day-by-day cost breakdown for last N days (default 7), including per-agent and per-model breakdown with token counts.
Recursos
1Instal·la
npx skillscat add 0xjohmsmith/openclaw/daily-cost-report Instal·la des del registre de SkillsCat.
SKILL.md
Daily Cost Report
Usage
Run the script to get a cost breakdown:
# Last 7 days (default)
python3 skills/daily-cost-report/scripts/daily_cost.py
# Custom number of days
python3 skills/daily-cost-report/scripts/daily_cost.py 14Output
Per day: total cost, token breakdown (input/output/cache_read/cache_write), cost by agent, cost by model.
Summary: grand total + daily average.
Workflow
- Run the script with
exec - Parse stdout and present a clean summary to the user
- Highlight any expensive days or models worth noting
Notes
- Scans
~/.openclaw/agents/*/sessions/*.jsonl - Reads
usage.cost.totalfrom eachtype=messagerecord - Filters by timestamp to the requested day window