token-optimizer-qsmtco
qsmtco 제작
Coding Agents & IDEs요약
Reduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking.
설명
이 스킬이 하는 일
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.
사용 시점
- 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
예시 워크플로
User asks: debug this error in the logs
- 1
Runs model_router.py with the user prompt to classify task complexity
- 2
Receives Standard tier recommendation based on the debug task pattern
- 3
Runs token_tracker.py to check if daily budget is within limits
- 4
Falls back to Haiku model if budget status is 'exceeded'
- 5
Proceeds with the selected model for the session
Request processed with the appropriate model tier and budget constraint enforced
요구 사항
- OPENROUTER_API_KEY environment variable (only needed to refresh live model pricing data)
설치
clawhub install qsmtco/token-optimizer-qsmtcoCLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.