Skip to content
Agent Orchestration
Skill

/main-router

Intelligent skill router that analyzes user requests and automatically dispatches to the most appropriate skill(s) or zen-mcp tools. Routes to zen-chat for Q&A, zen-thinkdeep for deep problem investigation, codex-code-reviewer for code quality, simple-gemini for standard

BOOST
From plugin
claude-code-zen-mcp-skill-work
1186 skills1 command
Install
$ npx -y skills add VCnoC/Claude-Code-Zen-mcp-Skill-Work --skill main-router --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/main-router

Context preview

The summary Claude sees to decide when to auto-load this skill.

Intelligent skill router that analyzes user requests and automatically dispatches to the most appropriate skill(s) or zen-mcp tools. Routes to zen-chat for Q&A, zen-thinkdeep for deep problem investigation, codex-code-reviewer for code quality, simple-gemini for standard

SKILL.md

main-router.SKILL.md
name: main-router
description: Intelligent skill router that analyzes user requests and automatically dispatches to the most appropriate skill(s) or zen-mcp tools. Routes to zen-chat for Q&A, zen-thinkdeep for deep problem investigation, codex-code-reviewer for code quality, simple-gemini for standard docs/tests, deep-gemini for deep analysis, or plan-down for planning. Use this skill proactively to interpret all user requests and determine the optimal execution path.

Main Router - Intelligent Skill Routing Scheduler

Overview

This skill serves as the **central intelligence hub** that analyzes user requests and automatically routes them to the most appropriate skill(s) for execution. It acts as a smart dispatcher, understanding user intent and orchestrating the right tools for the job.

**Core Capabilities:**

  • Standards-based routing (follows CLAUDE.md)
  • Intent analysis and classification
  • Skill matching and selection
  • Multi-skill orchestration (sequential or parallel)
  • Conflict resolution and disambiguation
  • Automatic routing without user intervention
  • Full automation mode support (router makes decisions autonomously)

**Division of Responsibilities:**

  • **Main Router**: Analyzes request → Reads standards → Determines skill(s) → Invokes skill(s) → Coordinates execution
  • **Specialized Skills**: Execute their specific tasks when invoked by router

**Standards Compliance:**

  • **MUST read** global and project CLAUDE.md before routing
  • Apply standards hierarchy: Global CLAUDE.md > Project CLAUDE.md
  • All routing decisions must align with documented rules and workflows

**Active Task Monitoring (CRITICAL - Router Must Not Be Lazy):**

Main Router MUST actively monitor the entire task lifecycle and proactively invoke appropriate skills at each stage. **Do NOT skip skill invocations to save time** - proper skill usage ensures quality and compliance.

**Mandatory Workflow Rules:**

1. **Planning Phase:**

  • When user requests "make a plan" / "generate plan.md" / "plan tasks"
  • **MUST use plan-down skill** (not Main Claude direct planning)
  • Rationale: plan-down provides multi-model validation and structured decomposition

2. **Code Generation → Quality Check Cycle:**

  • After Main Claude completes ANY code generation/modification
  • **MUST invoke codex-code-reviewer** to validate quality
  • Rationale: Ensures 5-dimension quality check (quality, security, performance, architecture, docs)

3. **Test Code Generation Workflow:**

  • When Main Claude needs test code
  • Step 1: **MUST invoke simple-gemini** to generate test files
  • Step 2: **MUST invoke codex-code-reviewer** to validate generated tests
  • Step 3: Return validated tests to Main Claude for execution
  • Rationale: Ensures test quality before execution

4. **Documentation Generation:**

  • Standard docs (README, PROJECTWIKI, CHANGELOG) → **simple-gemini**
  • Deep analysis docs (architecture, performance) → **deep-gemini**
  • Rationale: Specialized skills produce higher quality, standards-compliant docs

5. **Continuous Monitoring:**

  • Router monitors task progress throughout execution
  • Proactively suggests skill invocations when opportunities arise
  • Example: "Just finished code, should I use codex to check quality?"

**Anti-Pattern - Router Being Lazy (FORBIDDEN):**

 BAD: Main Claude generates code → Main Claude self-reviews → Done
 GOOD: Main Claude generates code → Router invokes codex-code-reviewer → Done

 BAD: Main Claude writes plan.md directly
 GOOD: Router invokes plan-down skill → plan.md generated with validation

 BAD: Main Claude generates tests → Run immediately
 GOOD: Router invokes simple-gemini → codex validates → Main Claude runs

When to Use This Skill

**Use this skill PROACTIVELY for ALL user requests** to determine the best execution path.

**Typical User Requests:**

  • "Explain what is..." (→ zen-chat)
  • "Deep analysis of problem..." (→ zen-thinkdeep)
  • "Help me check code" (→ codex-code-reviewer)
  • "Generate README documentation" (→ simple-gemini)
  • "Deep performance analysis of this code" (→ deep-gemini)
  • "Make development plan" (→ plan-down)
  • "Write test files" (→ simple-gemini)
  • "Generate architecture analysis document" (→ deep-gemini)
  • Any task-related request or Q&A

**Router's Decision Process:**

User Request → Read Standards (CLAUDE.md) → Intent Analysis → Skill Matching → Auto/Manual Decision → Execution

**Operation Modes:**

1. **Interactive Mode (Default):**

  • Router asks user for clarification when ambiguous
  • User makes final decisions on skill selection
  • Router provides recommendations with rationale

2. **Full Automation Mode (automation_mode - READ FROM SSOT):**

automation_mode definition and constraints: See CLAUDE.md「📚 共享概念速查」

**This skill's role** (Router Layer - Sole Source):

  • Judge and set automation_mode at task start (detect keywords: "full automation", "automatic process", etc.)
  • Set status: automation_mode = true/false
  • Transmit to downstream: `[AUTOMATION_MODE: true/false]`
  • Monitor throughout lifecycle, enforce mandatory skill invocations (plan-down/codex/simple-gemini)

Available Skills Registry

0. zen-chat (Direct Tool)

**Purpose:** General Q&A and collaborative thinking partner

**Triggers:**

  • "Explain..."
  • "What is..."
  • "How to understand..."
  • "Help me analyze..." (non-technical deep analysis)
  • General questions, brainstorming, explanations

**Use Cases:**

  • Answer conceptual questions
  • Explain programming concepts
  • Brainstorming ideas
  • Quick clarifications
  • Thoughtful explanations

**Key Features:**

  • Fast, direct responses
  • No file operations needed
  • Conversation-based
  • Supports multi-turn discussions

**Tool:** `mcp__zen__chat` (direct invocation, not a packaged skill)

---

0.5. zen-thinkdeep (Direct Tool)

**Purpose:** Multi-stage investigation and reasoning for complex problem analysis

**Triggers:**

  • "Deep analysis of problem..."
  • "Inv
Read more
Ships withclaude-code-zen-mcp-skill-work

🚀 一个为 AI 编程智能体设计的、开箱即用的规则体系与技能包。 本项目不仅仅是工具的集合,更是一套标准化的工作流程和质量保障机制。它通过智能路由、多阶段工作流和自动化代码审查,赋能 AI 智能体以更高效、更可靠的方式完成复杂的编程任务。

Get the whole plugin