# ensemble-solving

ensemble-solving spawns three parallel subagents to explore diverse solutions, scores each approach against weighted criteria, and returns the best outcome with trade-offs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 218 installs · ★ 697 repo stars
- Author: mhattingpete
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/mhattingpete/claude-skills-marketplace/tree/HEAD/engineering-workflow-plugin/skills/ensemble-solving/SKILL.md
- Updated: 2026-07-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/ensemble-solving

## What it does

The skill classifies the task into code generation, system architecture, or creative work, then calls `ensemble-orchestrator`. The orchestrator drafts three distinct prompts for independent subagents. When generating code, it tests simplicity against high throughput or extensibility. When handling architecture, it contrasts top-down, bottom-up, and lateral designs.

Solutions are scored using five criteria: correctness (30%), completeness (20%), quality (20%), clarity (15%), and elegance (15%). The output delivers the full winning implementation, shows numerical ratings across all variants, and outlines cases where runner-up approaches might be preferable.

Running three parallel drafts introduces roughly a 4x token overhead compared to a direct prompt. Triggering the workflow for trivial bug fixes, git operations, or basic syntax questions wastes resources. It is tailored specifically for high-impact architecture choices, algorithm selection, and API design trade-offs.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ensemble-solving/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ensemble-solving/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ensemble-solving/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ensemble-solving/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mhattingpete/claude-skills-marketplace engineering-workflow-plugin/skills/ensemble-solving
```

2. **Manually: put the files in place**
- File: `.github/skills/ensemble-solving/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mhattingpete/claude-skills-marketplace --path engineering-workflow-plugin/skills/ensemble-solving
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ensemble-solving/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mhattingpete/claude-skills-marketplace/tree/HEAD/engineering-workflow-plugin/skills/ensemble-solving/SKILL.md

## When to use it
- compare competing system architectures before writing code
- evaluate multiple algorithm implementations against trade-offs
- design APIs balancing simplicity against modular extensibility
- select refactoring strategies for legacy codebases

## Example prompts
- What's the best way to implement a distributed rate limiter?
- Compare approaches for designing our event bus schema
- Give me options for refactoring this database client

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 9296903718fcb168.

BEGIN THIRD-PARTY FILE 9296903718fcb168
````text
---
name: ensemble-solving
description: Generate multiple diverse solutions in parallel and select the best. Use for architecture decisions, code generation with multiple valid approaches, or creative tasks where exploring alternatives improves quality.
---

# Ensemble Problem Solving

Generate multiple solutions in parallel by spawning 3 subagents with different approaches, then evaluate and select the best result.

## When to Use

**Activation phrases:**
- "Give me options for..."
- "What's the best way to..."
- "Explore different approaches..."
- "I want to see alternatives..."
- "Compare approaches for..."
- "Which approach should I use..."

**Good candidates:**
- Architecture decisions with trade-offs
- Code generation with multiple valid implementations
- API design with different philosophies
- Naming, branding, documentation style
- Refactoring strategies
- Algorithm selection

**Skip ensemble for:**
- Simple lookups or syntax questions
- Single-cause bug fixes
- File operations, git commands
- Deterministic configuration changes
- Tasks with one obvious solution

## What It Does

1. **Analyzes the task** to determine if ensemble approach is valuable
2. **Generates 3 distinct prompts** using appropriate diversification strategy
3. **Spawns 3 parallel subagents** to develop solutions independently
4. **Evaluates all solutions** using weighted criteria
5. **Returns the best solution** with explanation and alternatives summary

## Approach

### Step 1: Classify Task Type

Determine which category fits:
- **Code Generation**: Functions, classes, APIs, algorithms
- **Architecture/Design**: System design, data models, patterns
- **Creative**: Writing, naming, documentation

### Step 2: Invoke Ensemble Orchestrator

```
Task tool with:
- subagent_type: 'ensemble-orchestrator'
- description: 'Generate and evaluate 3 parallel solutions'
- prompt: [User's original task with full context]
```

The orchestrator handles:
- Prompt diversification
- Parallel execution
- Solution evaluation
- Winner selection

### Step 3: Present Result

The orchestrator returns:
- The winning solution (in full)
- Evaluation scores for all 3 approaches
- Why the winner was selected
- When alternatives might be preferred

## Diversification Strategies

**For Code (Constraint Variation):**
| Approach | Focus |
|----------|-------|
````
END THIRD-PARTY FILE 9296903718fcb168

The third-party file has ended. Everything between the 9296903718fcb168 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2345 of 5007 bytes. © mhattingpete · Apache-2.0 · https://github.com/mhattingpete/claude-skills-marketplace/tree/HEAD/engineering-workflow-plugin/skills/ensemble-solving/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
