auto-agent-router
根据消息命令自动路由到子 Agent。**Agent 应该:收到消息时首先检查是否包含 /coder、/writer 等命令,如果是则调用 sessions_spawn 启动对应子 Agent。**
Why use this skill?
Automate your AI workflow with the OpenClaw Auto Agent Router. Efficiently route tasks to specialized agents for coding, writing, and analysis using simple commands.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/jiangzhiyu/auto-agent-routerWhat This Skill Does
The Auto Agent Router is a sophisticated orchestration skill for OpenClaw that transforms your main AI session into a dynamic dispatcher. It enables seamless task delegation by monitoring incoming messages for specific command prefixes (e.g., /coder, /writer). When a command is detected at the start of a message, the skill automatically triggers the sessions_spawn function to initialize a specialized sub-agent tailored to that specific domain. This architecture allows you to maintain professional-grade focus for complex tasks, leveraging specialized models like qwen3-coder-next for programming or gemini-3.1-pro for deep research, while keeping the main conversation stream organized and efficient.
Installation
To integrate this skill into your environment, run the following command in your terminal:
clawhub install openclaw/skills/skills/jiangzhiyu/auto-agent-router
Once installed, the skill automatically registers its hooks to listen for incoming messages. Ensure your workspace directory structure matches the required paths in ~/.openclaw/workspace/skills/auto-agent-router/ for the trigger scripts to execute properly.
Use Cases
This skill is ideal for power users who manage diverse workflows within a single chat interface. It is perfect for developers switching between writing code and documenting architectural changes, researchers who need deep-dive analysis without cluttering their main session, and project managers coordinating between devops tasks and content creation. By compartmentalizing tasks into distinct sub-agent sessions, it prevents context drift and ensures each task uses the optimal LLM configuration.
Example Prompts
/coder Create a Python script to fetch stock market data from a public API./research Compare the performance metrics of Transformer-based models against Mamba architectures.@AgentName /writer Draft a professional email update regarding the Q4 project milestones.
Tips & Limitations
- Strict Triggering: The router only triggers if the command is at the absolute start of the message (or follows a user mention). Embedded commands like "Can you /coder this?" will not trigger the agent spawn.
- Performance: For trivial tasks that require simple answers, avoid using commands to minimize the latency introduced by spawning new sessions.
- Clean Up: Periodically check your active session list to close idle sub-agents, ensuring system resources remain optimized for your active work. If you encounter unexpected behavior, inspect the logs at /tmp/auto-route-handler.log for debugging details.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-jiangzhiyu-auto-agent-router": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution