$npx -y skills add DNYoussef/context-cascade --skill agent-selector/*============================================================================*/ /* AGENT-SELECTOR SKILL :: VERILINGUA x VERIX EDITION */ /*============================================================================*/
| 1 | /*============================================================================*/ |
| 2 | /* AGENT-SELECTOR SKILL :: VERILINGUA x VERIX EDITION */ |
| 3 | /*============================================================================*/ |
| 4 | |
| 5 | --- |
| 6 | name: agent-selector |
| 7 | version: 2.1.0 |
| 8 | description: | |
| 9 | [assert|neutral] Intelligent agent selection from 203-agent registry using semantic matching and capability analysis [ground:given] [conf:0.95] [state:confirmed] |
| 10 | category: orchestration |
| 11 | tags: |
| 12 | - general |
| 13 | author: System |
| 14 | cognitive_frame: |
| 15 | primary: evidential |
| 16 | goal_analysis: |
| 17 | first_order: "Execute agent-selector workflow" |
| 18 | second_order: "Ensure quality and consistency" |
| 19 | third_order: "Enable systematic orchestration processes" |
| 20 | --- |
| 21 | |
| 22 | /*----------------------------------------------------------------------------*/ |
| 23 | /* S0 META-IDENTITY */ |
| 24 | /*----------------------------------------------------------------------------*/ |
| 25 | |
| 26 | [define|neutral] SKILL := { |
| 27 | name: "agent-selector", |
| 28 | category: "orchestration", |
| 29 | version: "2.1.0", |
| 30 | layer: L1 |
| 31 | } [ground:given] [conf:1.0] [state:confirmed] |
| 32 | |
| 33 | /*----------------------------------------------------------------------------*/ |
| 34 | /* S1 COGNITIVE FRAME */ |
| 35 | /*----------------------------------------------------------------------------*/ |
| 36 | |
| 37 | [define|neutral] COGNITIVE_FRAME := { |
| 38 | frame: "Evidential", |
| 39 | source: "Turkish", |
| 40 | force: "How do you know?" |
| 41 | } [ground:cognitive-science] [conf:0.92] [state:confirmed] |
| 42 | |
| 43 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 44 | Kaynak dogrulama modu etkin. |
| 45 | |
| 46 | /*----------------------------------------------------------------------------*/ |
| 47 | /* S2 TRIGGER CONDITIONS */ |
| 48 | /*----------------------------------------------------------------------------*/ |
| 49 | |
| 50 | [define|neutral] TRIGGER_POSITIVE := { |
| 51 | keywords: ["agent-selector", "orchestration", "workflow"], |
| 52 | context: "user needs agent-selector capability" |
| 53 | } [ground:given] [conf:1.0] [state:confirmed] |
| 54 | |
| 55 | /*----------------------------------------------------------------------------*/ |
| 56 | /* S3 CORE CONTENT */ |
| 57 | /*----------------------------------------------------------------------------*/ |
| 58 | |
| 59 | # Agent Selector Micro-Skill |
| 60 | |
| 61 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 62 | Kaynak dogrulama modu etkin. |
| 63 | |
| 64 | |
| 65 | |
| 66 | ## Phase 0: Expertise Loading |
| 67 | |
| 68 | Before selecting agents: |
| 69 | |
| 70 | 1. **Detect Domain**: Identify task domain from request |
| 71 | 2. **Check Expertise**: Look for `.claude/expertise/agent-selection.yaml` |
| 72 | 3. **Load Context**: If exists, load agent performance history and preferences |
| 73 | 4. **Apply Configuration**: Use expertise for optimal agent matching |
| 74 | |
| 75 | ## Purpose |
| 76 | |
| 77 | Intelligently selects the most appropriate specialized agent from the 203-agent registry based on: |
| 78 | - Task requirements and complexity |
| 79 | - Agent capabilities and specializations |
| 80 | - Domain expertise (category/subcategory) |
| 81 | - Tool and MCP requirements |
| 82 | - Phase alignment (planning, development, testing, etc.) |
| 83 | |
| 84 | **Critical for Phase 4 routing** to ensure Claude Code uses specialized agents instead of generic ones. |
| 85 | |
| 86 | ## When to Use |
| 87 | |
| 88 | - **Before any Task() invocation** in Phase 5 execution |
| 89 | - When planning multi-agent workflows and need optimal agent assignment |
| 90 | - When you're unsure which specialized agent to use for a task |
| 91 | - To validate that a generic agent name has a specialized alternative |
| 92 | |
| 93 | ## How It Works |
| 94 | |
| 95 | **4-Step Process:** |
| 96 | |
| 97 | 1. **Parse Task Requirements** |
| 98 | - Extract domain (backend, frontend, database, testing, etc.) |
| 99 | - Identify key capabilities needed (Express.js, PostgreSQL, TDD, etc.) |
| 100 | - Determine phase (planning, development, testing, deployment) |
| 101 | - Note tool/MCP requirements |
| 102 | |
| 103 | 2. **Semantic Search (Memory MCP)** |
| 104 | - Query Memory MCP with task description |
| 105 | - Get top 5-10 candidate agents ranked by similarity |
| 106 | - Filter by category/phase if known |
| 107 | |
| 108 | 3. **Capability Matching** |
| 109 | - Score each candidate agent based on: |
| 110 | - Exact capability matches (highest priority) |
| 111 | - Domain specialization (category/subcategory) |
| 112 | - Tool/MCP alignment |
| 113 | - Phase alignment |
| 114 | - Apply fallback rules if no perfect match |
| 115 | |
| 116 | 4. **Return Selection + Reasoning** |
| 117 | - Selected agent name |
| 118 | - Agent source (file path in registry) |
| 119 | - Capabilities that matched |
| 120 | - Alternatives considered |
| 121 | - Selection reasoning |
| 122 | |
| 123 | ## Usage |
| 124 | |
| 125 | ```javascript |
| 126 | // Skill invocation |
| 127 | Skill("agent-selector") |
| 128 | |
| 129 | // Agent will prompt you for: |
| 130 | // 1. Task description (what needs to be done) |
| 131 | // 2. Domain hint (optional: backend, frontend, testing, etc.) |
| 132 | // 3. Phase hint (optional: development, testing, deployment) |
| 133 | |
| 134 | // Output: |
| 135 | { |
| 136 | "selected_agent": "dev-backend-api", |
| 137 | "agent_source": "delivery/development/backend/dev-backend-api.md", |
| 138 | "agent_category": "delivery/development/backend", |
| 139 | "capabilities": ["Express.js", "REST APIs", "JWT", "OpenAPI"], |
| 140 | "selection_reasoning": "Specialized backend API agent with exact match for |