agentsclimarketplace

Mixture of experts

Skill marco-souza/skills/.agents/skills/mixture-of-experts

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.From its SKILL.md

Install
npx -y skills add marco-souza/skills --skill mixture-of-experts

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.9 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

Mixture of Experts (MoE)

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.

When to Use

  • Architecture or design decisions
  • Complex code reviews
  • Security audits
  • Performance optimization
  • Debugging tricky issues
  • Evaluating trade-offs

Expert Specializations

Core Experts

ExpertFocusSystem Prompt
architectDesign patterns, coupling, cohesion, long-term maintainability"You are a software architect. Focus on design patterns, separation of concerns, and long-term maintainability."
securityVulnerabilities, injection risks, auth flaws, data exposure"You are a security engineer. Focus on vulnerabilities, injection risks, authentication, and data exposure."
performanceAlgorithmic complexity, resource usage, bottlenecks"You are a performance engineer. Focus on time/space complexity, resource usage, and optimization opportunities."
maintainerReadability, documentation, testing, onboarding cost"You are a senior maintainer. Focus on code readability, documentation, testing coverage, and onboarding new developers."
minimalistSimplicity, YAGNI, removing unnecessary complexity"You are a minimalist engineer. Focus on simplifying, removing unnecessary code, and YAGNI violations."

Domain Experts

ExpertFocus
api-designerREST/GraphQL conventions, versioning, backward compatibility
data-modelerSchema design, normalization, query patterns, migrations
dx-specialistDeveloper experience, tooling, error messages, debugging
ops-engineerDeployment, monitoring, observability, rollback strategies

Scripts

This skill provides helper scripts in .agents/scripts/ for automating the MoE workflow:

ScriptPurpose
moe-spawn.shSpawn expert agents in parallel
moe-wait.shWait for all experts to complete
moe-aggregate.shCombine results and run aggregator
moe-cleanup.shKill sessions and remove temp files
moe-code-review.shComplete code review workflow

Workflow

1. Define the Problem

Create a clear, specific prompt that all experts will analyze:

PROBLEM="Review the authentication flow in src/auth/ for issues and improvements"
TASK_ID=$(date +%s)

2. Spawn Experts in Parallel

Use moe-spawn.sh to spawn experts:

source .agents/scripts/moe-spawn.sh
spawn_moe_experts "architect security performance maintainer"

3. Wait for All Experts

Use moe-wait.sh to wait for completion:

source .agents/scripts/moe-wait.sh
wait_moe_experts "architect security performance maintainer"

4. Aggregate Results

Use moe-aggregate.sh to combine insights:

source .agents/scripts/moe-aggregate.sh
aggregate_moe_results "architect security performance maintainer"

5. Cleanup

Use moe-cleanup.sh to remove sessions and temp files:

source .agents/scripts/moe-cleanup.sh
cleanup_moe "architect security performance maintainer"

Complete Example: Code Review

Use the moe-code-review.sh script for a complete review workflow:

# Run MoE code review on a specific file
./.agents/scripts/moe-code-review.sh src/auth/login.ts

The script will:

  1. Read the file content
  2. Spawn architect, security, performance, and maintainer experts
  3. Wait for all experts to complete
  4. Synthesize results into actionable recommendations
  5. Clean up sessions and temp files

Advanced: Weighted Aggregation

For weighted aggregation, modify the aggregator prompt in moe-aggregate.sh:

# 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."

Best Practices

  • Choose 3-5 experts — Too few misses angles, too many adds noise
  • Make prompts specific — Generic prompts yield generic answers
  • Include file content — Don't make experts hunt for context
  • Define clear aggregation strategy — Consensus-based, weighted, or hierarchical
  • Cache expert outputs — Save to files for inspection if aggregation fails
  • Set timeouts — Kill hung experts after 5 minutes

Common Patterns

ScenarioExpert Mix
API Designarchitect, api-designer, security, dx-specialist
Database Schemadata-modeler, performance, architect
Frontend Componentmaintainer, minimalist, performance, dx-specialist
DevOps Pipelineops-engineer, security, maintainer
Full Featurearchitect, security, performance, maintainer, minimalist

Limitations

  • Expert outputs may conflict (aggregator must resolve)
  • Token cost scales linearly with expert count
  • No cross-expert communication during analysis
  • Synthesis quality depends on aggregator prompt quality

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,782. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.