openclaw-cost-tracker

Track OpenClaw usage costs and provide detailed reports by date and model. Supports daily, weekly, and monthly report formats for Discord and other messaging channels.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openclaw-cost-tracker" with this command: npx skills add vincentqiu/cost-report

OpenClaw Cost Tracker

Overview

Precisely track OpenClaw usage costs with detailed reports by date and model type. This skill uses the jq tool to directly parse JSON data from OpenClaw session logs, extracting accurate cost information.

Supports multiple report formats:

  • Daily Reports (today/yesterday costs)
  • Weekly Reports (current week total/comparison with previous week)
  • Monthly Reports (current month total/month-over-month growth)

Quick Start

# Today's cost report
bash {baseDir}/scripts/cost_report.sh --today

# Yesterday's cost report
bash {baseDir}/scripts/cost_report.sh --yesterday

# Weekly cost report
bash {baseDir}/scripts/cost_report.sh --week

# Date range report
bash {baseDir}/scripts/cost_report.sh --from 2026-01-01 --to 2026-01-31

Cost Calculation Method

This script directly extracts cost data from OpenClaw session log files (~/.openclaw/agents/*/sessions/*.jsonl):

  1. Uses jq to parse JSON data, locating the message.usage.cost.total field
  2. Calculates totals grouped by date and model
  3. Ensures each API call's cost is counted only once

Discord Output Format

💰 OpenClaw Cost Report (2026-02-04)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Today's Total Cost: $XX.XX (🟢 -XX% vs yesterday)

📊 Model Details:
• claude-opus-4-5: $XX.XX (XX%)
• gpt-4o: $X.XX (X%)
• ...

📈 Weekly Total: $XXX.XX

Installation Requirements

  • jq: JSON parsing tool (brew install jq or apt install jq)
  • Access to OpenClaw log files

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Epic AI Swarm Orchestration

Production playbook for running parallel AI coding agents (Claude, Codex, Gemini) with automatic model selection via duty table, token-limit auto-fallback, h...

Registry SourceRecently Updated
2020Profile unavailable
General

token-sisyphus

Burn LLM tokens toward a target count to satisfy corporate AI usage KPIs. Trigger when user says: burn tokens, consume tokens, fill KPI, push the boulder, si...

Registry SourceRecently Updated
1530Profile unavailable
Coding

Oneshot Ship

Ship code with oneshot CLI. One command that plans, executes, reviews, and opens a PR. Runs over SSH or locally. Use when the user wants to ship code changes...

Registry SourceRecently Updated
4150Profile unavailable
Coding

Hybrid Deep Search

Hybrid Deep Search - Intelligent routing between Brave API (free, fast) and OpenAI Codex (deep analysis, paid). Auto-selects optimal search strategy based on...

Registry SourceRecently Updated
6770Profile unavailable