{"skill":{"slug":"openclaw-model-router-skill","displayName":"OpenClaw Model Router Skill","summary":"Deterministic model routing for OpenClaw with prefix routing (@codex/@mini), timezone-aware schedule switching, verify-after-switch, rollback, lock protectio...","description":"---\nname: openclaw-model-router-skill\ndescription: Production-grade model router for OpenClaw: prefix routing (@codex/@mini), timezone-aware schedule switching, verify-after-switch, rollback, lock protection, and JSONL audit logs.\n---\n\n# OpenClaw Model Router Skill\n\nDeterministic model routing with a **closed-loop production switch pipeline**.\n\n## Why use this skill\n\n- Explicit user intent routing (`@codex`, `@mini`)\n- Time-window model policy (`router.schedule.json`)\n- Safe switch flow with verification and rollback\n- Concurrency lock to prevent race conditions\n- Structured audit logs for operations and incident review\n\n## Core capabilities\n\n1) **Prefix routing**\n- `@codex` → `openai-codex/gpt-5.3-codex`\n- `@mini` → `minimax/MiniMax-M2.5`\n- Aliases: `@c`, `@m`\n\n2) **Scheduler routing**\n- Rule-based windows by day/time/priority\n- Timezone-aware resolution (`router.schedule.json.timezone`)\n- Supports overnight windows (e.g. 18:00 → 09:00)\n\n3) **Production switch loop**\n- `schedule apply` / `schedule end`\n- Auth gate (`auth.requiredEnv[]`)\n- Switch + readback verify\n- Failure classification (`auth_expired`, `rate_limit`, `provider_drift`, `unknown`)\n- Optional rollback (`safety.rollbackOnFailure`)\n- Lock file (`safety.lockPath`) to avoid concurrent switching\n- Audit logs (`router.log.jsonl` + rotation)\n\n## Quick commands\n\n```bash\n# Validate config\nnode src/cli.js validate\n\n# Route inspection\nnode src/cli.js route \"@codex implement this\" --json\n\n# Scheduler\nnode src/cli.js schedule validate\nnode src/cli.js schedule resolve --at \"2026-03-02T10:00:00+01:00\" --json\nnode src/cli.js schedule apply --json\nnode src/cli.js schedule end --id workday_codex --json\n```\n\n## Key config files\n\n- `router.config.json` (prefix map, retry, auth, safety, logging, controller)\n- `router.schedule.json` (timezone + rules)\n\n## Reliability checklist\n\n- Deterministic mapping\n- Idempotent switching behavior\n- Execute only after switch verification\n- Observable success/failure events\n- Recoverability on failure paths\n\n## Tests\n\n```bash\nnode --test\n```\n","tags":{"latest":"0.2.1"},"stats":{"comments":0,"downloads":1089,"installsAllTime":4,"installsCurrent":4,"stars":0,"versions":2},"createdAt":1772320789360,"updatedAt":1778491674555},"latestVersion":{"version":"0.2.1","createdAt":1772320868069,"changelog":"优化ClawHub商店文案：生产闭环能力、风险控制与操作指南重构","license":null},"metadata":null,"owner":{"handle":"vulcanusalex","userId":"s17e006bpwqzpg8cejbkdy5srx858k50","displayName":"Tianqu","image":"https://avatars.githubusercontent.com/u/256598462?v=4"},"moderation":null}