router-first-architecture
Router-First Architecture
适合你,如果正在规划或重构前端项目结构
/ 下载安装
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code
~/.claude/skills/(项目级 .claude/skills/)Codex CLI
~/.codex/skills/Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add parcadei/continuous-claude-v3/router-first-architecture/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- parcadei/continuous-claude-v3/router-first-architecture/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify parcadei/continuous-claude-v3/router-first-architecture安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
3859GitHub stars
~310上下文体积 · 单文件
镜像托管
怎么用
商店整理自技能原文 · 版本 d07ff4b · 表述以原文为准它做什么
安装后,Claude 会先调用领域路由器(如 math-router)来解析你的意图,再执行具体命令。路由器会根据你的需求自动选择正确的脚本。
什么时候触发
当你提出涉及数学运算等特定领域的问题时,Claude 会优先使用对应的路由器。
装好后可以这样说
路由器会映射到代数求解脚本。
技能原文 SKILL.md
Router-First Architecture
Route through domain routers before using individual tools. Routers abstract tool selection.
Pattern
Domain routers (like math-router) provide deterministic mapping from user intent to exact CLI commands. Always use the router first; only bypass for edge cases.
DO
- Call
math-router route "<intent>"before any math operation - Let domain skills co-activate with their router (via
coActivatein skill-rules.json) - Trust the router's confidence score; only fall back if
command: null - Keep trigger keywords/patterns in skill-rules.json broader than routing patterns
DON'T
- Call individual scripts directly when a router exists
- Duplicate routing logic in individual skills
- Let domain skills bypass their router
Co-Activation Pattern
Domain skills should co-activate with their router:
{
"math/abstract-algebra/groups": {
"coActivate": ["math-router"],
"coActivateMode": "always"
}
}
This ensures the router is always available when domain knowledge is activated.
Two-Layer Architecture
- Skill-rules trigger layer: Nudges Claude to use the router (keywords, intent patterns)
- Router routing layer: Deterministic mapping to scripts via regex patterns
Keep the trigger layer broader than routing - the router should handle "not found" gracefully.
Source Sessions
- 2bbc8d6e: "Trigger layer was narrower than routing layer" - expanded triggers
- This session: Wired 8 domain math skills to co-activate with math-router
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…