π¦ ClawHub
Token Budget Monitor
by @aviclaw
Track and control token consumption across OpenClaw cron jobs
TERMINAL
clawhub install token-budget-monitorπ About This Skill
name: token-budget-monitor version: "1.0.0" description: Track and control token consumption across OpenClaw cron jobs author: aviclaw tags: - token - budget - monitor - openclaw
token-budget-monitor
Track and control token consumption across OpenClaw cron jobs, fallback chains, and sessions.
Installation
openclaw skills install aviclaw/token-budget-monitor
Usage
# Check current usage
node track-usage.js statusCheck budget for a specific job
node track-usage.js check daily-tweetAlert if over budget
node track-usage.js alertGet model recommendations
node track-usage.js recommend
Integration
Add to cron jobs to track usage:
// After LLM call completes
const usage = result.usage;
exec('node /path/to/track-usage.js track ' +
usage.input_tokens + ' ' + usage.output_tokens + ' ' + model);
Configuration
Edit config.json:
{
"dailyLimit": 100000,
"jobLimits": {
"daily-tweet": 5000,
"rss-brief": 15000
},
"alertThreshold": 0.8,
"freeModels": [
"nvidia/moonshotai/kimi-k2.5",
"google/gemini-2.0-flash-exp"
]
}
Features
Author
License
MIT
π‘ Examples
# Check current usage
node track-usage.js statusCheck budget for a specific job
node track-usage.js check daily-tweetAlert if over budget
node track-usage.js alertGet model recommendations
node track-usage.js recommend
βοΈ Configuration
Edit config.json:
{
"dailyLimit": 100000,
"jobLimits": {
"daily-tweet": 5000,
"rss-brief": 15000
},
"alertThreshold": 0.8,
"freeModels": [
"nvidia/moonshotai/kimi-k2.5",
"google/gemini-2.0-flash-exp"
]
}