Use this skill when the user asks to design, implement, audit, or evolve model routing policies across multiple providers/models. Triggers: 'Which model should I use for X?', 'Design a routing policy across many models/providers', 'Work/private/sensitive routing policy', 'Coding should prefer domestic models, but escalate on hard tasks', 'How do we handle future model name changes?', 'Create a router script / policy config / fallback chain', 'Audit current model routing', work/private routing, coding vs research routing, provider safety constraints, fallback chains, slot/alias-based routing, or future-proof model name migration. Includes a runnable router and policy validator.
From openclaw-devnpx claudepluginhub arctrany/openclaw-devThis skill uses the workspace's default tool permissions.
assets/alias-map.jsonassets/openclaw-agent-routing.jsonassets/routing-policy.jsonassets/smoke-routes.jsonreferences/model-change-sop.mdreferences/provider-constraints.mdreferences/task-taxonomy.mdscripts/route_openclaw_agent.pyscripts/select_model.pyscripts/smoke_test_routes.pyscripts/validate_policy.pySearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Processes code review feedback technically: verify suggestions against codebase, clarify unclear items, push back if questionable, implement after evaluation—not blind agreement.
This skill standardizes how to choose models across providers using:
slot-based routing (stable intent labels, not hard-coded model names)alias_map compatibility (model renames and provider ID changes)Use this skill to build or maintain a routing system that can be shared across Claude/Codex/OpenClaw-style runtimes.
scripts/select_model.pyscripts/validate_policy.pyscripts/smoke_test_routes.pyscripts/route_openclaw_agent.pyscripts/oc-route.pyslot + alias_map policy in JSONNote: 以下命令均从项目根目录执行。路径
skills/model-routing-governor/是相对于 openclaw-dev 仓库根目录的,部署到其他位置时需相应调整。日常使用推荐scripts/oc-route.pywrapper(见第 6 步)。
python3 skills/model-routing-governor/scripts/validate_policy.py
python3 skills/model-routing-governor/scripts/select_model.py \
--scene work \
--task-type deep_research \
--sensitivity sensitive_research \
--complexity high \
--value high \
--context-size long \
--pretty
python3 skills/model-routing-governor/scripts/select_model.py \
--scene work \
--task-type coding \
--provider-preference domestic_first \
--complexity high \
--value high \
--context-size long \
--pretty
python3 skills/model-routing-governor/scripts/smoke_test_routes.py --pretty
python3 skills/model-routing-governor/scripts/route_openclaw_agent.py \
--scene work \
--task-type deep_research \
--sensitivity sensitive_research \
--complexity high \
--value high \
--message "先给我一版调研框架" \
--pretty
oc-route sensitive-research -m "先给我一版调研框架" --pretty
oc-route research-cn -m "调研这个赛道" --run --pretty
oc-route coding-cn -m "重构模块并加测试" --run --pretty
If oc-route is not installed on PATH yet, use python3 scripts/oc-route.py ....
Collect or infer routing labels (see references/task-taxonomy.md):
scenesensitivitytask_typemodalitycomplexityvaluecontext_sizelanguagelatency_budgetcost_budgetprivacy_requirementprovider_preferenceBefore ranking models, apply non-negotiable constraints:
Provider-specific caveats are in references/provider-constraints.md.
A route is a list of stages, each stage points to a slot:
Slots are stable intent labels. Their concrete candidates live in policy JSON.
Always normalize model IDs through alias mapping before final output. This prevents policy drift when provider/model IDs change.
Return:
stage -> slot)primaryfallbacksassets/routing-policy.json
assets/alias-map.json
scripts/select_model.py
scripts/validate_policy.py
scripts/smoke_test_routes.py
scripts/route_openclaw_agent.py
openclaw agent.scripts/oc-route.py (repo root)
assets/smoke-routes.json
assets/openclaw-agent-routing.json
annie-research vs annie-research-cn).references/task-taxonomy.md
references/provider-constraints.md
references/model-change-sop.md
assets/routing-policy.json under models.assets/alias-map.json.slots.select_model.py.assets/alias-map.jsonscripts/smoke_test_routes.py before rolloutassets/routing-policy.jsonreferences/task-taxonomy.mdscripts/smoke_test_routes.pyThis skill is the knowledge + tooling layer. For hard guarantees in production:
Do not rely on prompt-only routing if the runtime can dispatch to a blocked provider before the model reads the policy.
For ongoing maintenance, follow references/model-change-sop.md.
The provided scripts/route_openclaw_agent.py is the starter implementation for a pre-router wrapper around openclaw agent.
For day-to-day operator usage, prefer repo-root scripts/oc-route.py presets and override labels only when needed.
When reporting a routing decision, return:
Keep the explanation concise and operational.