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.
.claude/skills/marco-souza-mixture-of-experts/SKILL.md| 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 |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 9,952 | 16,351 | +64% | 1 | 1 | 0% | 1,400 | 3,691 | +164% | 0 | 0 | — |
case-02 | fail→fail | 5,094 | 4,457 | -13% | 1 | 1 | 0% | 1,092 | 1,606 | +47% | 0 | 0 | — |
case-03 | fail→pass | 19,614 | 25,046 | +28% | 1 | 1 | 0% | 4,008 | 3,591 | -10% | 0 | 0 | — |
case-04 | fail→pass | 10,883 | 4,188 | -62% | 1 | 1 | 0% | 1,832 | 2,419 | +32% | 0 | 0 | — |
case-05 | fail→fail | 21,993 | 9,134 | -58% | 1 | 1 | 0% | 1,000 | 2,889 | +189% | 0 | 0 | — |
case-06 | pass→pass | 10,429 | 7,146 | -31% | 1 | 1 | 0% | 2,115 | 2,863 | +35% | 0 | 0 | — |
case-07 | pass→pass | 10,420 | 5,423 | -48% | 1 | 1 | 0% | 1,963 | 2,406 | +23% | 0 | 0 | — |
case-08 | pass→pass | 11,485 | 6,580 | -43% | 1 | 1 | 0% | 2,210 | 2,363 | +7% | 0 | 0 | — |
case-09 | fail→pass | 8,121 | 2,319 | -71% | 1 | 1 | 0% | 1,504 | 1,842 | +22% | 0 | 0 | — |
case-10 | fail→pass | 8,951 | 6,740 | -25% | 1 | 1 | 0% | 1,846 | 2,635 | +43% | 0 | 0 | — |
case-11 | fail→pass | 11,982 | 4,190 | -65% | 1 | 1 | 0% | 2,209 | 2,175 | -2% | 0 | 0 | — |
case-12 | pass→pass | 12,809 | 8,480 | -34% | 1 | 1 | 0% | 2,463 | 3,004 | +22% | 0 | 0 | — |
case-13 | fail→pass | 12,216 | 3,378 | -72% | 1 | 1 | 0% | 2,338 | 2,003 | -14% | 0 | 0 | — |
case-14 | fail→pass | 10,397 | 1,937 | -81% | 1 | 1 | 0% | 1,974 | 1,707 | -14% | 0 | 0 | — |
case-15 | pass→pass | 11,125 | 10,026 | -10% | 1 | 1 | 0% | 2,180 | 3,260 | +50% | 0 | 0 | — |
case-16 | pass→pass | 14,086 | 11,971 | -15% | 1 | 1 | 0% | 2,490 | 3,451 | +39% | 0 | 0 | — |
case-17 | pass→pass | 18,516 | 11,311 | -39% | 1 | 1 | 0% | 2,806 | 3,208 | +14% | 0 | 0 | — |
case-18 | pass→pass | 13,146 | 12,102 | -8% | 1 | 1 | 0% | 2,292 | 3,530 | +54% | 0 | 0 | — |
case-19 | pass→pass | 15,298 | 11,882 | -22% | 1 | 1 | 0% | 2,881 | 3,283 | +14% | 0 | 0 | — |
case-20 | pass→pass | 5,255 | 2,790 | -47% | 1 | 1 | 0% | 934 | 1,927 | +106% | 0 | 0 | — |
case-21 | fail→fail | 16,560 | 12,729 | -23% | 1 | 1 | 0% | 3,606 | 3,885 | +8% | 0 | 0 | — |
case-22 | fail→pass | 4,424 | 3,782 | -15% | 1 | 1 | 0% | 788 | 2,094 | +166% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.