Analyzes user questions and automatically dispatches optimal agents/skills/plugins
/plugin marketplace add Primadetaautomation/claude-dev-toolkit/plugin install claude-dev-toolkit@primadata-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdexamples/routing-scenarios.mdrouting-matrix.jsonscripts/analyze-intent.jsThe Intelligent Router is an automatic orchestration system that analyzes user questions and intelligently selects the optimal combination of:
Design Philosophy: B - Medium Router
Smart Auto-Detect triggers on:
Skips on:
User Question
ā
Intent Detection (analyze-intent.js)
ā
Match Against Routing Matrix
ā
Calculate Match Scores
ā
Identify Domains & Complexity
Collect ALL Matched Routes
ā
Primary Route = Highest Score
ā
Gather:
- Skills from all matches
- Plugins from all matches
- Docs from all matches
- Tools from primary route
- Optional agents from secondary matches
Auto-Load:
ā
Skills (via skill-loader.js)
ā
Docs (loaded into context)
ā
Plugins (activated)
Auto-Dispatch:
ā
Primary Agent (Task tool)
Suggest:
š” Optional Agents (you choose to dispatch)
š” Additional tools
š” Memory check (episodic-memory)
Display Formatted Analysis:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
šÆ INTELLIGENT ROUTER ANALYSIS
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š Detected Intent: [...]
š Complexity: [SIMPLE|MEDIUM|HIGH|COMPLEX]
šÆ Domains: [...]
ā
AUTO-LOADED SKILLS: [...]
ā
AUTO-DISPATCHED: [agent] ā [reason]
š” OPTIONAL DISPATCH: [suggestions]
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
The router uses routing-matrix.json with 20+ predefined routes:
Router automatically determines complexity:
Router uses 3 levels for skills:
Default: Router loads Level 1 for all matched skills Escalation: Request Level 2/3 if needed
User: "Fix deze error in login.ts"
Router Analysis:
Intent: Bug fixing
Complexity: SIMPLE
Domains: debugging, backend
Auto-Loaded:
- systematic-debugging skill
- testing-fundamentals skill
Auto-Dispatched:
- senior-fullstack-developer
Optional:
- qa-testing-engineer (regression tests)
User: "Maak een login systeem met registratie"
Router Analysis:
Intent: User authentication
Complexity: HIGH
Domains: security, backend, frontend
Auto-Loaded:
- security-essentials skill
- backend-development-patterns skill
- testing-fundamentals skill
Auto-Dispatched:
- backend-specialist (primary)
Optional:
- security-specialist (OWASP review)
- frontend-specialist (login UI)
- qa-testing-engineer (security tests)
Docs Loaded:
- docs/security.md
- docs/backend.md
User: "Bouw een dashboard met gebruikers, data visualisatie en export"
Router Analysis:
Intent: Multi-domain feature
Complexity: COMPLEX
Domains: frontend, backend, data, ux
Auto-Loaded:
- backend-development-patterns skill
- testing-fundamentals skill
- brainstorming skill
Auto-Dispatched:
- master-orchestrator
Sub-agents (parallel):
- backend-specialist (API)
- frontend-specialist (Dashboard UI)
- data-engineer (Data pipeline)
- ux-design-expert (Charts/UX)
- qa-testing-engineer (Test strategy)
User: "Optimaliseer deze SQL query die te langzaam is"
Router Analysis:
Intent: Database optimization
Complexity: MEDIUM
Domains: data-engineering, backend
Auto-Loaded:
- backend-development-patterns skill
Auto-Dispatched:
- data-engineer
Tools Activated:
- sql-universal-expert
Optional:
- senior-fullstack-developer (code refactor)
Docs Loaded:
- docs/backend.md
Router activates automatically when:
No manual activation needed!
Test router analysis before dispatching:
# Analyze a question
node .claude/skills/intelligent-router/scripts/analyze-intent.js analyze "Maak een API"
# Get JSON output
node .claude/skills/intelligent-router/scripts/analyze-intent.js analyze "Fix bug" --json
Router integrates via .claude/hooks/pre-prompt.sh (optional):
#!/bin/bash
# Activate intelligent-router for every question
# Router internally checks if it should activate
Edit routing-matrix.json to:
Edit auto_detect_config in routing-matrix.json:
{
"min_word_count": 5,
"action_verbs": ["maak", "bouw", "fix", ...],
"skip_keywords": ["wat is", "hoe werkt", ...],
"always_check_memory": true
}
Adjust in complexity_thresholds:
{
"simple": {
"max_words": 10,
"max_domains": 1,
"auto_dispatch": true
},
...
}
User Question
ā
[Should Activate?]
āā No ā Normal response (skip router)
āā Yes ā Continue
ā
[Find Matches]
ā
[No Matches?]
āā Yes ā Normal response
āā No ā Continue
ā
[Analyze Complexity]
ā
[Simple/Medium/High] ā Auto-dispatch primary agent
[Complex] ā Dispatch master-orchestrator
ā
[Display Analysis]
ā
[Execute Dispatch]
# Check question meets criteria
node scripts/analyze-intent.js analyze "your question"
# If "activate: false", question too simple
# Solution: Add more context or action verbs
# Check routing matrix matches
cat routing-matrix.json | grep -A 5 "your_keyword"
# Update triggers if needed
# Verify skills exist
node ../skill-loader.js list
# Check skill names in routing-matrix.json match
Track router effectiveness:
Store in: .claude-memory/router-metrics.md
Planned features:
routing-matrix.jsonscripts/analyze-intent.jsexamples/routing-scenarios.mdexamples/test-cases.mdVersion: 1.0.0 Author: CLAUDE Framework Team License: MIT Compatibility: Claude Code 1.0+, Claude 3.5 Sonnet+
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.