wasintoh/toh-framework/smart-routing
Claude Code and agent skill by wasintoh/toh-framework
- community
Checking that the SKILL.md file is still in the repository.
Intelligent request routing for /toh command. Analyzes user intent, assesses confidence, surveys the runtime (2-step, per orchestration-protocol), and routes to the appropriate agent(s). Memory-first approach ensures context awareness. Triggers: /toh command, natural language requests, ambiguous inputs.
Install
npx vskill@latest install wasintoh/toh-framework/smart-routingSKILL.md
The same SKILL.md was published earlier as wasintoh/toh-framework/smart-routing.
Smart Routing Skill
Intelligent routing engine for the /toh smart command. Routes any natural language request to the right agent(s).
๐ง Routing Pipeline
๐ Intent Classification Matrix
Illustrative heuristics only โ native agent-description matching makes the actual call (see /toh); do not compute or display confidence scores.
Primary Patterns โ Agent Mapping
| Pattern Category | Keywords (EN) | Keywords (TH) | Primary Agent | Confidence | |
|---|---|---|---|---|---|
| Create UI | create, add, make, build + page/component/UI | เธชเธฃเนเธฒเธ, เนเธเธดเนเธก, เธเธณ + เธซเธเนเธฒ/component | UI Agent | HIGH | |
| Add Logic | logic, state, function, hook, validation | logic, state, function, เนเธเธดเนเธก logic | Dev Agent | HIGH | |
| Fix Bug | bug, error, broken, fix, not working | bug, error, เธเธฑเธ, เนเธกเนเธเธณเธเธฒเธ, เนเธเน | Fix Agent | HIGH | |
| Improve Design | prettier, beautiful, design, polish, style | เธชเธงเธข, design, เธเธฃเธฑเธ design | Design Agent | HIGH | |
| Testing | test, check, verify | test, เธเธเธชเธญเธ, เนเธเนเธ | Test Agent | HIGH | |
| Connect Backend | connect, database, Supabase, API, backend | เนเธเธทเนเธญเธก, database, Supabase | Connect Agent | HIGH | |
| Deploy | deploy, ship, production, publish | deploy, ship, เธเธถเนเธ production | Ship Agent | HIGH | |
| LINE Platform | LINE, LIFF, LINE MINI App | LINE, LIFF | LINE Agent | HIGH | |
| Mobile Platform | mobile, iOS, Android, PWA, Capacitor | mobile, เธกเธทเธญเธเธทเธญ | Mobile Agent | HIGH | |
| New Project | new project, start, build app, create system | project เนเธซเธกเน, เธชเธฃเนเธฒเธ app | Vibe Agent | HIGH | |
| Planning | plan, analyze, PRD, architecture | เธงเธฒเธเนเธเธ, เธงเธดเนเธเธฃเธฒเธฐเธซเน | Plan Agent | HIGH | |
| AI/Prompt | prompt, AI, chatbot, system prompt | prompt, AI, chatbot | Dev Agent + prompt-optimizer | HIGH | |
| Continue | continue, resume, go on | เธเธณเธเนเธญ, เธเนเธญ | Memory โ Last Agent | MEDIUM | |
| Complex Request | Multiple features, system, e-commerce, etc. | เธฃเธฐเธเธ + เธซเธฅเธฒเธข features | Plan Agent | MEDIUM | |
| Vague Request | help, fix it, make better (without context) | เธเนเธงเธขเธเนเธงเธข, เนเธเนเธเธต | Ask Clarification | LOW |
๐ฏ Confidence Scoring Algorithm
Illustrative heuristics only โ native agent-description matching makes the actual call (see /toh); do not compute or display confidence scores.
๐ฅ๏ธ Runtime Survey (2-step โ never guess the IDE)
Step 1 โ Identity (declared)
Your runtime identity is declared by the platform context file that loaded you (CLAUDE.md = Claude Code ยท .cursor/rules/*.mdc = Cursor ยท AGENTS.md = Codex or ZCode, whichever the **Runtime:** line inside it names ยท .agents/rules/toh-framework.md = Antigravity ยท GEMINI.md = Gemini CLI, legacy). Confirm capabilities from .toh/capabilities.json (written by the installer). No detection heuristics โ the identity is stated, not inferred.
Step 2 โ Runtime probe (only what install time cannot know)
Probe exactly: the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env flag, plus the Claude Code version gates for /goal and workflows. Nothing else.
Execution mode
Choose from the execution ladder in `orchestration-protocol` (Section B) โ the full decision table lives there, once. Summary only:
- Claude Code โ ladder: teams > subagents > sequential
- Cursor (2.4+) โ native subagents in
.cursor/agents/, one task at a time - Antigravity โ file-based subagents via
invoke_subagent, one task at a time - Codex / ZCode / Gemini (legacy) โ sequential TOH LOOP in-session
๐ Routing Decision Tree
๐ Clarification Patterns
When to Ask
| Situation | Example | Action | |
|---|---|---|---|
| No verb/action | "the login" | Ask: "What would you like to do with login?" | |
| No target | "make it work" | Ask: "Which page/component should I fix?" | |
| Multiple interpretations | "improve it" | Ask: "Design, performance, or features?" | |
| Missing context + no memory | "fix it" | Ask: "What's broken? Describe the issue." |
When NOT to Ask
| Situation | Example | Action | |
|---|---|---|---|
| Clear intent | "create login page" | Execute directly | |
| Memory provides context | "continue" + active task exists | Resume from memory | |
| Reasonable default exists | "add a button" | Add to current page context |
๐จ Skill Loading by Intent
| Detected Intent | Skills to Load | |
|---|---|---|
| New Project | vibe-orchestrator, design-craft, business-context, engineer-harness | |
| Create UI | ui-first-builder, design-craft, engineer-harness | |
| Add Logic | dev-engineer, error-handling, engineer-harness | |
| Fix Bug | debug-protocol, error-handling, engineer-harness | |
| Connect Backend | backend-engineer, integrations, engineer-harness | |
| Improve Design | design-craft, engineer-harness | |
| AI/Chatbot | prompt-optimizer, dev-engineer, engineer-harness | |
| Testing | test-engineer, error-handling, engineer-harness | |
| Planning | plan-orchestrator, business-context, engineer-harness |
Note: engineer-harness skill is ALWAYS loaded for proper output formatting and next-step suggestions.
๐พ Memory Integration
Pre-Routing Memory Check
Post-Execution Memory Save
๐ Examples
Example 1: High Confidence โ Direct
Example 2: Medium Confidence โ Plan First
Example 3: Low Confidence โ Ask
โ ๏ธ Critical Rules
- Memory ALWAYS first - Never route without checking context
- Confidence drives action - Trust the scoring system
- Plan Agent is your friend - When in doubt, route to Plan
- Survey, don't guess - Identity is declared; execution mode comes from orchestration-protocol's ladder
- engineer-harness always loaded - Every response needs 3 sections + next steps
Smart Routing Skill v1.0.0 - Intelligent Request Routing Engine
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/smart-routing/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 19
- Repository npm downloads, 7 days
- 2
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 2 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wasintoh/toh-framework/smart-routing)