π¦ ClawHub
Token Usage Tracker
by @gerhardvr26
Token usage logging, alerting, and context-compression utilities for OpenClaw. Use when you want to track per-call token usage, normalize timestamps, and red...
TERMINAL
clawhub install oken-usage-trackerπ About This Skill
name: token-usage-tracker description: Token usage logging, alerting, and context-compression utilities for OpenClaw. Use when you want to track per-call token usage, normalize timestamps, and reduce context sent to LLMs via summarization/compression.
token-usage-tracker
Quick start
1. Configure defaults in skill-config.json (timezone, log_folder).
2. Install scripts (examples provided) into your workspace and wire the interceptor into your message pipeline.
3. Use scripts/context_summarizer.py before sending large contexts to reduce token usage.
What this skill provides
token_tracker.py writes per-call token usage to a JSONL log. Includes timestamp normalization.token_interceptor.py example that normalizes timestamps and forwards sanitized messages to the tracker.token_alerts.py example for threshold-based alerts (no external posting by default).context_summarizer.py produces short summaries to reduce token payloads.When to use
Files
Configuration
See skill-config.json for defaults. The skill exposes:
Security and installation
references/systemd/ β apply them manually after review.License: MIT (adapt as you prefer)