Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
A toolkit for reducing token usage and API costs in OpenClaw deployments. Provides scripts for context lazy-loading, task-based model routing, heartbeat interval management, and daily budget tracking. All analysis runs locally with no network requests unless live pricing is explicitly requested.
Bundles context lazy-loading, model routing, heartbeat throttling, and budget tracking in one local toolkit, so cost reductions apply automatically without manually selecting a model for each request.
When to use it
- Automatically routing casual chat messages to cheaper model tiers
- Reducing context token load by 80% for simple or repetitive prompts
- Enforcing cheap models for all scheduled cronjobs and heartbeat checks
- Monitoring daily API spend and switching models when a budget limit is hit
- Spacing out periodic background checks to reduce unnecessary API calls
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: debug this error in the logs
- 1Runs model_router.py with the user prompt to classify task complexity
- 2Receives Standard tier recommendation based on the debug task pattern
- 3Runs token_tracker.py to check if daily budget is within limits
- 4Falls back to Haiku model if budget status is 'exceeded'
- 5Proceeds with the selected model for the session
Request processed with the appropriate model tier and budget constraint enforced
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.