2.5k
GitHub Stars
9
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill auto-agent-router- _meta.json290 B
- auto-route-handler.py7.0 KB
- auto-trigger.py3.6 KB
- config.json2.2 KB
- dingtalk-command.py11.1 KB
- logger.py2.7 KB
- message-handler.py3.0 KB
- router.py10.3 KB
- SKILL.md6.3 KB
Overview
This skill automatically routes incoming messages to specialized sub-agents based on command prefixes. It inspects message starts for commands like /coder, /writer, /analyze, and calls sessions_spawn to start the corresponding sub-agent. If no valid command is found at the message start, the main session handles the message.
How this skill works
On every received message the skill strips optional @mentions, then checks whether the message begins with a supported /command. If a matching command is detected it spawns the mapped sub-agent (sessions_spawn) and forwards the task content. If no command is present at the start, routing is skipped and the main session processes the message directly.
When to use it
- You want concurrent, specialized processing by dedicated sub-agents.
- Messages explicitly start with a routing command such as /coder or /writer.
- You need model-specific handling (e.g., a coder model for code tasks).
- You want each task isolated in its own Session for security or concurrency.
- You expect parallel execution by multiple sub-agents.
Best practices
- Require commands to appear at the start of the message for deterministic routing.
- Normalize and remove @mentions before command detection.
- Keep a concise mapping of commands to agents and models in config.json.
- Use /auto only when you accept automatic content-based routing.
- Log spawn events and results to support auditing and debugging.
Example use cases
- User sends: /coder Implement a function — spawns coder agent using a code-specialized model.
- User sends: @bot /writer Draft a blog post — mention is removed, writer agent is started.
- Analyst sends: /analyze Summarize dataset — analyst agent runs with analysis model.
- Team triggers: /devops Deploy service — devops agent executes operational steps.
- Fallback: simple question without command is handled by the main session without spawning a sub-agent.
FAQ
Commands must be at the message start (after optional @mention). Middle or trailing commands do not trigger routing.
How do I add a new command and agent?
Add a rule to the rules array in config.json mapping keywords to the agent and model, then reload the router configuration.
What does /auto do?
The /auto command tells the router to select the most appropriate agent based on content and configured rules rather than a fixed mapping.