Agent Skills › databricks/unity-gateway › smart-router

smart-router

GitHub

用于在 Claude Code 或 Codex 会话中启用或禁用 Unity Gateway 的智能路由功能及智能路由器编排器,通过执行特定 Python 命令控制子代理模型的选择策略。

skills/smart-router/SKILL.md databricks/unity-gateway

Trigger Scenarios

用户请求开启或关闭智能路由功能 需要切换子代理模型选择策略时

Install

npx skills add databricks/unity-gateway --skill smart-router -g -y
More Options

Use without installing

npx skills use databricks/unity-gateway@smart-router

指定 Agent (Claude Code)

npx skills add databricks/unity-gateway --skill smart-router -a claude-code -g -y

安装 repo 全部 skill

npx skills add databricks/unity-gateway --all -g -y

预览 repo 内 skill

npx skills add databricks/unity-gateway --list

SKILL.md

Frontmatter
{
    "name": "smart-router",
    "metadata": {
        "version": "1.2.0"
    },
    "description": "Enable or disable Unity Gateway subagent model routing for the current smart-routed Claude or Codex session, along with Smart Router Orchestrator when opted in.",
    "allowed-tools": "Bash(\"$UCODE_SMART_ROUTER_PYTHON\" -m ucode.cli claude --enable-smart-routing), Bash(\"$UCODE_SMART_ROUTER_PYTHON\" -m ucode.cli claude --disable-smart-routing), Bash(\"$UCODE_SMART_ROUTER_PYTHON\" -m ucode.cli codex --enable-smart-routing), Bash(\"$UCODE_SMART_ROUTER_PYTHON\" -m ucode.cli codex --disable-smart-routing)"
}

Smart Router

Use the Python executable exported by the launching Unity Gateway installation. Keep its path quoted and do not substitute ug or python from PATH.

  • In Claude Code, run exactly "$UCODE_SMART_ROUTER_PYTHON" -m ucode.cli claude --enable-smart-routing for on or "$UCODE_SMART_ROUTER_PYTHON" -m ucode.cli claude --disable-smart-routing for off.
  • In Codex, run exactly "$UCODE_SMART_ROUTER_PYTHON" -m ucode.cli codex --enable-smart-routing for on or "$UCODE_SMART_ROUTER_PYTHON" -m ucode.cli codex --disable-smart-routing for off.

In PowerShell, use & "$env:UCODE_SMART_ROUTER_PYTHON" in place of "$UCODE_SMART_ROUTER_PYTHON"; keep the remaining arguments the same. If UCODE_SMART_ROUTER_PYTHON or UCODE_SESSION_ENV_FILE is unset, ask the user to restart through an updated Unity Gateway with smart routing enabled.

With no argument, explain that only on and off are accepted. Do not edit the state file. This affects subsequent subagent model selection in the current session, not the root model or first prompt. In sessions launched with ENABLE_SMART_ROUTER_ORCHESTRATOR=1, it also controls Smart Router Orchestrator. When turned off, earlier Smart Router Orchestrator instructions are superseded: do not start new automatic delegation or fall back to Smart Router Orchestrator role models. Continue in the root unless the user explicitly requests a subagent. Honor that request using native tools and normal harness model selection, without Smart Router Orchestrator; keep routing off. Existing children can finish. When turned on, apply the smart-router-orchestrator skill to further work only if the session was launched with ENABLE_SMART_ROUTER_ORCHESTRATOR=1. Do not change the orchestration feature flag. Return the command's result.

Version History

  • ca0804b Current 2026-10-18 17:58

Metadata

Files
0
Version
ca0804b
Hash
0f9e8976
Indexed
2026-10-18 17:58

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-21 08:31
浙ICP备14020137号-1