Skip to content
Back to skills

Openclaw Model Router Skill

ASecurity

"Production-grade model router for OpenClaw: prefix routing

  • 14 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
testingbashnode

Works with

  • cli

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill openclaw-model-router-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openclaw Model Router Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openclaw Model Router Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-openclaw-model-router-skill/badge)](https://www.skillsdirectory.com/skills/modbender-openclaw-model-router-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openclaw-model-router-skill
description: "Production-grade model router for OpenClaw: prefix routing
  (@codex/@mini), timezone-aware schedule switching, verify-after-switch,
  rollback, lock protection, and JSONL audit logs."
---


# OpenClaw Model Router Skill

Deterministic model routing with a **closed-loop production switch pipeline**.

## Why use this skill

- Explicit user intent routing (`@codex`, `@mini`)
- Time-window model policy (`router.schedule.json`)
- Safe switch flow with verification and rollback
- Concurrency lock to prevent race conditions
- Structured audit logs for operations and incident review

## Core capabilities

1) **Prefix routing**
- `@codex` → `openai-codex/gpt-5.3-codex`
- `@mini` → `minimax/MiniMax-M2.5`
- Aliases: `@c`, `@m`

2) **Scheduler routing**
- Rule-based windows by day/time/priority
- Timezone-aware resolution (`router.schedule.json.timezone`)
- Supports overnight windows (e.g. 18:00 → 09:00)

3) **Production switch loop**
- `schedule apply` / `schedule end`
- Auth gate (`auth.requiredEnv[]`)
- Switch + readback verify
- Failure classification (`auth_expired`, `rate_limit`, `provider_drift`, `unknown`)
- Optional rollback (`safety.rollbackOnFailure`)
- Lock file (`safety.lockPath`) to avoid concurrent switching
- Audit logs (`router.log.jsonl` + rotation)

## Quick commands

```bash
# Validate config
node src/cli.js validate

# Route inspection
node src/cli.js route "@codex implement this" --json

# Scheduler
node src/cli.js schedule validate
node src/cli.js schedule resolve --at "2026-03-02T10:00:00+01:00" --json
node src/cli.js schedule apply --json
node src/cli.js schedule end --id workday_codex --json
```

## Key config files

- `router.config.json` (prefix map, retry, auth, safety, logging, controller)
- `router.schedule.json` (timezone + rules)

## Reliability checklist

- Deterministic mapping
- Idempotent switching behavior
- Execute only after switch verification
- Observable success/failure events
- Recoverability on failure paths

## Tests

```bash
node --test
```

Files in this skill

  • CHANGELOG.md592 B
  • README.md3 KB
  • SKILL.md2.1 KB
  • assets/logo.svg2.6 KB
  • docs/runbook.md1.9 KB
  • docs/scheduler-notes.md2 KB
  • router.config.json886 B
  • router.schedule.json532 B
  • src/cli.js11.4 KB
  • src/errors.js1.1 KB
  • src/executor.js6.5 KB
  • src/lock.js1.2 KB
  • src/logger.js1.2 KB
  • src/router.js5.4 KB
  • src/scheduler.js8.1 KB
  • src/session-controller.js3 KB
  • test/router.test.js11.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…