Install
openclaw skills install task-complexity-routerRegex-based routing sends simple tasks to local AI, medium to mid-tier, complex to premium — saving 60%+ on API costs.
openclaw skills install task-complexity-routerRegex-based routing sends simple tasks to local AI, medium to mid-tier, complex to premium — saving 60%+ on API costs.
Automatically routes prompts to the cheapest model that can handle them.
Pattern matching classifies tasks into tiers:
| Task Type | Example | Routed To | Cost |
|---|---|---|---|
| Simple | "hi", "thanks", "what time is it" | Local (Ollama) | $0 |
| Moderate | "write an email", "analyze this" | Mid-tier (Sonnet) | $ |
| Complex | "debug this codebase", "write a chapter" | Premium (Opus) | $$$ |
const { TaskRouter } = require('./src/task-router');
const router = new TaskRouter({
defaultModel: 'local',
escalationModel: 'sonnet',
heavyModel: 'opus'
});
const result = router.route('analyze the sales data from Q3');
// { model: 'sonnet', reason: 'Analysis task', confidence: 0.8 }
Add your own routing patterns:
router.addRule({
name: 'code-review',
pattern: /\b(review|refactor|debug|optimize)\b.*\b(code|function|class)\b/i,
model: 'opus',
reason: 'Code review needs deep reasoning'
});
This software is provided "AS IS", without warranty of any kind, express or implied.
USE AT YOUR OWN RISK.
By downloading, installing, or using this software, you acknowledge that you have read this disclaimer and agree to use the software entirely at your own risk.
DATA DISCLAIMER: This software processes and stores data locally on your system. The author(s) are not responsible for data loss, corruption, or unauthorized access resulting from software bugs, system failures, or user error. Always maintain independent backups of important data. This software does not transmit data externally unless explicitly configured by the user.
| 🐛 Bug Reports | TheShadowyRose@proton.me |
| ☕ Ko-fi | ko-fi.com/theshadowrose |
| 🛒 Gumroad | shadowyrose.gumroad.com |
| @TheShadowyRose | |
| 🐙 GitHub | github.com/TheShadowRose |
| 🧠 PromptBase | promptbase.com/profile/shadowrose |
Built with OpenClaw — thank you for making this possible.
🛠️ Need something custom? Custom OpenClaw agents & skills starting at $500. If you can describe it, I can build it. → Hire me on Fiverr