CostLens - Token Cost Monitor
LiveVisibility into your OpenClaw token costs
Cost OptimizationOpenClawMonitoringBudgetAnalytics
CostLens - Token Cost Monitor
Stop the "token meltdown" before it happens.
The Problem
OpenClaw can become a token furnace:
- Multi-step tasks consume tokens rapidly
- Long contexts multiply costs
- Concurrent execution compounds spending
- No visibility until the bill arrives
The Solution
CostLens provides real-time cost visibility:
# Start monitoring
npx costlens monitor
# View dashboard
npx costlens dashboard
Dashboard
┌─────────────────────────────────────────┐
│ Today's Spend: $12.34 / $50.00 │
│ ████████████░░░░░░░░░░ 24.7% │
├─────────────────────────────────────────┤
│ Top Skills by Cost: │
│ 1. code-reviewer $4.56 (37%) │
│ 2. doc-writer $3.21 (26%) │
│ 3. test-generator $2.89 (23%) │
├─────────────────────────────────────────┤
│ Active Alerts: │
│ ⚠️ Budget 50% threshold reached │
└─────────────────────────────────────────┘
Budget Management
{
"daily": { "limit": 50, "alertAt": [50, 80, 100] },
"monthly": { "limit": 1000, "alertAt": [75, 90, 100] },
"perSkill": {
"code-reviewer": { "daily": 10 }
}
}
Cost Optimization Tips
- Model Selection - Use cheaper models for simple tasks
- Context Trimming - Reduce token context when possible
- Caching - Cache repeated queries
- Batching - Group related operations
Alerts
- 📧 Email notifications
- 💬 Slack/Discord webhooks
- 🔔 Desktop notifications
- 📱 Webhook for custom integrations
Trust Layer·Community Profile
Trust Layer
Data handling is explicit
Open and auditable workflow
Runtime boundaries are transparent
Risk Note
Third-party skills may include hidden network calls or unsafe install scripts. Scan before use.