Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Solve complex problems by spawning multiple specialized expert agents that analyze from different angles, then synthesize their insights. Use for architecture decisions, code reviews, complex debugging, or when you need comprehensive analysis.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -2% | 0% |
Spawn multiple specialized experts in parallel, each analyzing from a unique angle. Aggregate their insights into a comprehensive, multi-dimensional answer.
> Foundation: This skill builds on spawn-subagents for the underlying > tmux/pi subagent mechanics. Read spawn-subagents for the core patterns > before using MoE.
| Expert | Focus | System Prompt | |--------|-------|---------------| | architect | Design patterns, coupling, cohesion, long-term maintainability | "You are a software architect. Focus on design patterns, separation of concerns, and long-term maintainability." | | security | Vulnerabilities, injection risks, auth flaws, data exposure | "You are a security engineer. Focus on vulnerabilities, injection risks, authentication, and data exposure." | | performance | Algorithmic complexity, resource usage, bottlenecks | "You are a performance engineer. Focus on time/space complexity, resource usage, and optimization opportunities." | | maintainer | Readability, documentation, testing, onboarding cost | "You are a senior maintainer. Focus on code readability, documentation, testing coverage, and onboarding new developers." | | minimalist | Simplicity, YAGNI, removing unnecessary complexity | "You are a minimalist engineer. Focus on simplifying, removing unnecessary code, and YAGNI violations." |
| Expert | Focus | |--------|-------| | api-designer | REST/GraphQL conventions, versioning, backward compatibility | | data-modeler | Schema design, normalization, query patterns, migrations | | dx-specialist | Developer experience, tooling, error messages, debugging | | ops-engineer | Deployment, monitoring, observability, rollback strategies |
This skill provides helper scripts in .agents/scripts/ for automating the MoE workflow:
| Script | Purpose | |--------|---------| | moe-spawn.sh | Spawn expert agents in parallel | | moe-wait.sh | Wait for all experts to complete | | moe-aggregate.sh | Combine results and run aggregator | | moe-cleanup.sh | Kill sessions and remove temp files | | moe-code-review.sh | Complete code review workflow |
Create a clear, specific prompt that all experts will analyze:
bashPROBLEM="Review the authentication flow in src/auth/ for issues and improvements" TASK_ID=$(date +%s)
Use moe-spawn.sh to spawn experts:
bashsource .agents/scripts/moe-spawn.sh spawn_moe_experts "architect security performance maintainer"
Use moe-wait.sh to wait for completion:
bashsource .agents/scripts/moe-wait.sh wait_moe_experts "architect security performance maintainer"
Use moe-aggregate.sh to combine insights:
bashsource .agents/scripts/moe-aggregate.sh aggregate_moe_results "architect security performance maintainer"
Use moe-cleanup.sh to remove sessions and temp files:
bashsource .agents/scripts/moe-cleanup.sh cleanup_moe "architect security performance maintainer"
Use the moe-code-review.sh script for a complete review workflow:
bash# Run MoE code review on a specific file ./.agents/scripts/moe-code-review.sh src/auth/login.ts
The script will:
For weighted aggregation, modify the aggregator prompt in moe-aggregate.sh:
bash# Define weights architect=3 security=3 performance=2 maintainer=2 # Build weighted prompt WEIGHTED_PROMPT="Synthesize with these expert weights:\n" for expert in $EXPERTS; do weight=$(eval echo \$$expert) WEIGHTED_PROMPT="$WEIGHTED_PROMPT\n- $expert (weight: $weight/10)" done WEIGHTED_PROMPT="$WEIGHTED_PROMPT\n\nHigher weight = more influence on final recommendation."
| Scenario | Expert Mix | |----------|------------| | API Design | architect, api-designer, security, dx-specialist | | Database Schema | data-modeler, performance, architect | | Frontend Component | maintainer, minimalist, performance, dx-specialist | | DevOps Pipeline | ops-engineer, security, maintainer | | Full Feature | architect, security, performance, maintainer, minimalist |
Other measured skills in the registry, with their headline benchmark lift.