Use when agent routing seems wrong, unexpected agents are selected, or you need to understand why a specific agent was chosen - provides detailed routing analysis and debugging. Shows keyword matches, confidence scores, and competing agents. Do NOT use for general agent questions or when routing is working correctly - just proceed with the selected agent.
/plugin marketplace add jrc1883/popkit-claude/plugin install popkit@popkit-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Debug and analyze agent routing decisions. Shows why specific agents are selected, what keywords triggered routing, and how confidence scores are calculated.
Announce at start: "I'm using the routing-debug skill to analyze agent routing."
/routing-debug "your prompt here" # Analyze routing for prompt
/routing-debug explain <agent> # Show agent's keywords
/routing-debug keywords # List all routing keywords
/routing-debug trace "prompt" # Detailed routing trace
/routing-debug compare "prompt" # Compare all agent scores
Routing Analysis for: "fix the authentication bug"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Selected Agent: bug-whisperer
Confidence: 0.85
Keyword Matches:
✓ "fix" → [bug-whisperer, code-reviewer] (+0.3)
✓ "bug" → [bug-whisperer] (+0.5)
✓ "authentication" → [security-auditor] (+0.2)
File Pattern Matches:
(none)
Error Pattern Matches:
(none)
Competing Agents:
1. bug-whisperer: 0.85 ⭐
2. security-auditor: 0.45
3. code-reviewer: 0.30
Decision Reason: "bug" keyword has highest weight for bug-whisperer
Agent Routing Keywords
━━━━━━━━━━━━━━━━━━━━━━━
bug-whisperer:
Keywords: bug, fix, debug, error, issue, crash, broken
File Patterns: *.error.*, *.debug.*
Error Patterns: TypeError, ReferenceError, SyntaxError
security-auditor:
Keywords: security, vulnerability, audit, safe, breach
File Patterns: *auth*, *secret*, *.env
Error Patterns: SecurityError, AuthenticationError
code-reviewer:
Keywords: review, quality, standards, refactor, best practices
File Patterns: *.ts, *.tsx, *.js
Error Patterns: (none)
...
Routing Trace: "optimize the database query performance"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Step 1: Keyword Extraction
Found: ["optimize", "database", "query", "performance"]
Step 2: Keyword Matching
"optimize" matches:
- performance-optimizer: weight 0.4
- query-optimizer: weight 0.3
"database" matches:
- query-optimizer: weight 0.5
- data-integrity: weight 0.2
"query" matches:
- query-optimizer: weight 0.6
"performance" matches:
- performance-optimizer: weight 0.5
- query-optimizer: weight 0.3
Step 3: Score Aggregation
query-optimizer: 0.3 + 0.5 + 0.6 + 0.3 = 1.7 → normalized 0.85
performance-optimizer: 0.4 + 0.5 = 0.9 → normalized 0.45
data-integrity: 0.2 → normalized 0.10
Step 4: Final Selection
Winner: query-optimizer (0.85)
Routing data comes from:
agents/config.json - Keywords, file patterns, error patterns.md files - Tool permissionshooks/agent-orchestrator.py - Runtime routing logicCalled by:
Reads from:
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 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 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.