When a user makes a request, route to the corresponding skill according to the following rules.
Routing Decision Rules
Rule 1: Identify user intent
Analyze the user input and identify the following intent types:
| Intent type | Keyword examples | Routing target |
|---|---|---|
| Site building | build, create new, from scratch | /gate-discuss |
| Frontend development | page, component, style, UI | /gate-frontend |
| SEO | search engine, SEO, optimization | /gate-seo |
| UI design | design, interface, prototype, UX | /ui-ux-pro-max |
| Component design | component, reuse, component library | /component-design |
| Styling | Tailwind, CSS, style | /styling-tailwind |
| Code review | review, review, check code | /code-review |
| Debugging | bug, debug, issue, error | /diagnosing-bugs |
| Testing | test, TDD, unit test | /tdd |
| Refactoring | refactor, optimize code, code structure | /ai-refactoring |
| Product | PRD, requirements, user story | /prd-development |
| Optimization | optimize, performance, speed | /gate-optimize |
Rule 2: Check project status
Before routing, check the current project status:
# 检查是否存在项目
ls package.json 2>/dev/null # Node.js 项目
ls pyproject.toml 2>/dev/null # Python 项目
ls Cargo.toml 2>/dev/null # Rust 项目
# 检查是否有 Git 仓库
git status 2>/dev/null
# 检查是否有部署配置
ls vercel.json 2>/dev/null # Vercel 部署
ls netlify.toml 2>/dev/null # Netlify 部署
Status determination:
- No project → new project flow (
/gate-discuss) - Has project but not completed → continue development flow
- Project already launched → optimization flow (
/gate-optimize)
Rule 3: Routing priority
When multiple skills match, choose according to the following priority:
- Skill explicitly specified by the user → call directly
- Skill most relevant to the current stage → based on project status +
nextfield selection - Skill that best matches user intent → based on keyword matching
- Default routing → ask the user for specific requirements
Rule 4: Recommend next step
After calling a skill, read its next field and automatically recommend it to the user.
The complete routing information for each skill (trigger / next / dependencies) is in the frontmatter of its own SKILL.md. There is no need to maintain a copy here.
Routing decision flow
用户输入
↓
分析意图(关键词匹配)
↓
检查项目状态
↓
选择最匹配的技能
↓
调用技能
↓
执行任务
↓
更新项目状态
↓
推荐下一个技能
Usage examples
Example 1: A new user wants to build a site
用户:我想搭建一个个人网站
AI:分析意图 → 建站
AI:检查项目状态 → 无项目
AI:路由到 → /gate-discuss
Example 2: The user has a project that needs optimization
用户:我的网站加载太慢了
AI:分析意图 → 性能优化
AI:检查项目状态 → 项目已部署
AI:路由到 → /gate-perf
Example 3: The user needs design help
用户:我想设计一个登录页面
AI:分析意图 → UI 设计
AI:检查项目状态 → 有项目
AI:路由到 → /ui-ux-pro-max
Notes
- Prefer using gate- skills*: The site building flow and optimization flow should preferentially use the corresponding gate skills
- Call skills directly: Design, engineering, AI, and product skills can be called directly
- Check dependencies: Before calling a skill, check whether there are dependency skills
- Update status: After completing a skill, update the project status
- Recommend next step: Recommend the next related skill after completion