{"skill":{"slug":"chitin-core","displayName":"chitin-core","summary":"Selects the most cost-effective capable model for tasks, handles rate limit failures gracefully, and supports tier overrides and health checks.","description":"# chitin-core\n\nRoute tasks to the cheapest capable model. Never crash on rate limits.\n\n## Activation\n\nWhen spawning sub-agents or delegating tasks, use ModelRouter to select the optimal model.\n\n**Trigger phrases:** \"route this\", \"spawn a sub-agent\", \"delegate\", or any time you need to choose a model for a task.\n\n## Usage\n\n### Route a Task\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js route \"task description here\"\n```\n\nReturns JSON:\n```json\n{\"tier\":\"MEDIUM\",\"model\":\"google-antigravity/gemini-3.1-pro\",\"confidence\":0.85,\"estimatedCost\":0.005,\"signals\":[\"codeSignals:2×1.2=2.4\"]}\n```\n\nUse the returned `model` value in `sessions_spawn`.\n\n### Handle Failures\nIf a spawned session fails with a rate limit or error:\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js fail \"provider/model\" \"error message\"\n```\n\nThen re-route — the failed model will be skipped:\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js route \"same task\"\n```\n\n### Check Health\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js health\n```\n\n### View Costs\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js costs\n```\n\n### Validate Config\n```bash\nnode ~/.openclaw/workspace/skills/chitin-core/scripts/router.js validate\n```\n\n## Workflow\n\n1. Receive task from user\n2. Run `router.js route \"<task>\"` to get optimal model\n3. `sessions_spawn` with returned model\n4. If spawn fails → `router.js fail \"<model>\" \"<error>\"` → retry route\n5. Return result to user\n\n## Tiers\n\n| Tier | Use Case | Models |\n|------|----------|--------|\n| LIGHT | Greetings, simple Q&A, status checks | Flash, DeepSeek, gpt-5-mini, Groq, Ollama |\n| MEDIUM | Code, summaries, standard tasks | Gemini Pro, gpt-5.2, DeepSeek Reasoner |\n| HEAVY | Architecture, complex reasoning, agentic | gpt-5.2-pro, o3, Codex |\n\n## Override Tags\n\nInclude in task text to force a tier:\n- `@light` — force cheapest model\n- `@medium` — force mid-tier\n- `@heavy` — force most capable\n\n## Graceful Degradation\n\nIf all models in a tier are rate-limited, the router automatically:\n1. Tries adjacent tiers (escalate or downgrade)\n2. Falls back to local Ollama if configured\n3. Returns structured error with retry time (never crashes)\n\n## Configuration\n\nEdit `config.json` in the skill directory to:\n- Add/remove models per tier\n- Adjust cost figures\n- Tune classification boundaries\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":786,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1772299676802,"updatedAt":1778994000495},"latestVersion":{"version":"1.0.0","createdAt":1772299676802,"changelog":"Initial release: unified model routing, cost optimization, provider failover, and nightly provider sync. The engine of the Chitin agentic OS.","license":null},"metadata":null,"owner":{"handle":"adroidian","userId":"s17a7dxsza82j0bpewnz1ves198851vm","displayName":"adroidian","image":"https://avatars.githubusercontent.com/u/7563431?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779967872618}}