| name | cowork-router |
| description | Meta-router for dynamic skill routing. Use when: cowork, skill management, router generation, Skills.toml, plugin configuration |
CoWork Router
Meta-router that guides dynamic generation of project-specific skill routers
Purpose
This is a meta-skill that:
- Explains how the cowork dynamic routing system works
- Guides AI to generate project-specific routers via
cowork config router
- Provides the routing architecture pattern for all skill plugins
This skill does NOT hardcode specific plugins - it describes the system for dynamically discovering and routing to installed plugins.
Dynamic Router Generation
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Skills.toml (User Config) โ
โ [skills.install] โ
โ rust-skills = "user/rust-skills" โ
โ dora-skills = { path = "/local/dora-skills", plugin = true } โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ cowork config install โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Skills.lock (Generated) โ
โ - Tracks installed plugins, versions, paths โ
โ - Records extracted trigger keywords โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ cowork config router โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ .claude/skills/cowork-router/SKILL.md (Dynamic) โ
โ - Auto-generated from installed plugins โ
โ - Merged trigger keywords from all plugins โ
โ - Domain detection table based on actual installations โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
How It Works
1. Plugin Discovery
Each plugin contains skills with SKILL.md files. The frontmatter description field contains trigger keywords:
---
name: rust-router
description: "Triggers on: E0xxx, ownership, borrow, lifetime, async, trait"
---
2. Keyword Extraction
cowork config router scans all installed plugins and extracts:
- Trigger keywords from each skill's description
- Router skill names (e.g.,
rust-router, dora-router)
- Skill counts per plugin
3. Unified Router Generation
Generates a project-specific cowork-router that:
- Combines all trigger keywords into one description
- Creates a domain detection table
- Maps keywords โ plugin routers
CLI Commands
cowork config init
cowork config add rust-skills ZhangHanDong/rust-skills --plugin
cowork config add dora-dev /path/to/dora-skills --dev --plugin
cowork config install
cowork config router
cowork config router --hooks
Generated Router Structure
The dynamically generated router will contain:
---
name: cowork-router
description: "Triggers on: [merged keywords from all plugins]"
---
## Domain Detection
| Domain | Keywords | Route To |
|--------|----------|----------|
| [plugin-1] | [extracted keywords] | [plugin-1-router] |
| [plugin-2] | [extracted keywords] | [plugin-2-router] |
| ... | ... | ... |
Routing Architecture Pattern
All plugin routers should follow this pattern:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ cowork-router (Meta) โ
โ Unified entry - Domain detection โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ plugin-router โ โ plugin-router โ โ plugin-router โ
โ (Domain A) โ โ (Domain B) โ โ (Domain C) โ
โโโโโโโโโฌโโโโโโโโ โโโโโโโโโฌโโโโโโโโ โโโโโโโโโฌโโโโโโโโ
โ โ โ
โผ โผ โผ
plugin-skills plugin-skills plugin-skills
Cross-Domain Routing
When a question spans multiple domains:
- Detect all matching domains from keywords
- Load primary domain router (most specific match)
- Cross-reference other domains as needed
- Combine context for comprehensive answer
Example: "Dora node ไธญ E0382 ้่ฏฏ"
- Primary:
dora-router (dataflow context)
- Cross-ref:
rust-skills:m01-ownership (ownership mechanics)
Configuration Files
| File | Location | Purpose |
|---|
Skills.toml | .cowork/Skills.toml | User configuration |
Skills.lock | .cowork/Skills.lock | Installed state (auto-generated) |
cowork-router | .claude/skills/cowork-router/ | Dynamic router (auto-generated) |
hooks.json | .claude/skills/cowork-router/ | Auto-trigger hooks (optional) |
When to Regenerate Router
Run cowork config router after:
- Adding new plugin dependencies
- Removing plugins
- Updating plugin versions
- Modifying trigger priority in Skills.toml
Trigger Priority Configuration
In Skills.toml:
[triggers]
priority = ["dora-router", "rust-router", "makepad-router"]
[triggers.overrides]
"async" = "rust-router"
"widget" = "makepad-router"
Higher priority routers win when keywords conflict.