Skip to main content
skill CX Codex

ensemble-solving — Claude Code skill: what it does, how to install

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

Apache-2.0 218 installs ★ 697 updated 2026-07-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a claude-code
Open on GitHub

What ensemble-solving 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.

What it helps with

  • 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 for the agent

  • 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

How to install ensemble-solving

1Skills CLI (Vercel)

npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a claude-code

2Manually: put the files in place

~/.claude/skills/ensemble-solving/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ensemble-solving/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ensemble-solving

How to install ensemble-solving in Claude Code?

Run npx skills add mhattingpete/claude-skills-marketplace --skill ensemble-solving -a claude-code. The skill file will be stored in ~/.claude/skills/ensemble-solving/SKILL.md.

What does ensemble-solving do?

It coordinates three subagents to build alternative solutions in parallel, grades them against weighted benchmarks, and returns the top implementation along with trade-offs.

How much extra token overhead does it create?

Generating three distinct variations and executing the evaluation orchestrator uses roughly 4x the tokens of a single attempt.

Source text

SKILL.md · Apache-2.0
---
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 |
|----------|-------|
| Simplicity | Minimal code, maximum readability |
| Performance | Efficient, optimized |
| Extensibility | Clean abstractions, easy to extend |

**For Architecture (Approach Variation):**
| Approach | Focus |
|----------|-------|
| Top-down | Requirements → Interfaces → Implementation |
| Bottom-up | Primitives → Composition → Structure |
| Lateral | Analogies from other domains |

**For Creative (Persona Variation):**
| Approach | Focus |
|----------|-------|
| Expert | Technical precision, authoritative |
| Pragmatic | Ship-focused, practical |
| Innovative | Creative, unconventional |

## Evaluation Rubric

| Criterion | Base Weight | Description |
|-----------|-------------|-------------|
| Correctness | 30% | Solves the problem correctly |
| Completeness | 20% | Addresses all requirements |
| Quality | 20% | How well-crafted |
| Clarity | 15% | How understandable |
| Elegance | 15% | How simple/beautiful |

Weights adjust based on task type.

## Example

**User:** "What's the best way to implement a rate limiter?"

**Skill:**
1. Classifies as Code Generation
2. Invokes ensemble-orchestrator
3. Three approaches generated:
   - Simple: Token bucket with in-memory counter
   - Performance: Sliding window with atomic operations
   - Extensible: Strategy pattern with pluggable backends
4. Evaluation selects extensible approach (score 8.4)
5. Returns full implementation with explanation

**Output:**
```
## Selected Solution

[Full rate limiter implementation with strategy pattern]

## Why This Solution Won

The extensible approach scored highest (8.4) because it provides
a clean abstraction that works for both simple use cases and
complex distributed scenarios. The strategy pattern allows
swapping Redis/Memcached backends without code changes.

## Alternatives

- **Simple approach**: Best if you just need basic in-memory
  limiting and will never scale beyond one process.

- **Performance approach**: Best for high-throughput scenarios
  where every microsecond matters.
```

## Success Criteria

- 3 genuinely different solutions generated
- Clear evaluation rationale provided
- Winner selected with confidence
- Alternatives summarized with use cases
- User understands trade-offs

## Token Cost

~4x overhead vs single attempt. Worth it for:
- High-stakes architecture decisions
- Creative work where first attempt rarely optimal
- Learning scenarios where seeing alternatives is valuable
- Code that will be maintained long-term

## Integration

- **feature-planning**: Can ensemble architecture decisions
- **code-auditor**: Can ensemble analysis perspectives
- **plan-implementer**: Executes the winning approach

© mhattingpete · Apache-2.0 · mhattingpete/claude-skills-marketplace

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set15

The whole set →
timeline-creator timeline-creator turns a project's tasks and dates into an interactive HTML timeline with Gantt bars, phases and milestones. Handy when a plan has to live in one file. CX Codex +1 337installs code-refactor code-refactor is a Claude Code skill for bulk code changes across files: renaming variables and functions, replacing deprecated patterns, and updating API calls. It automatically selects a mode that saves up to 90% of tokens for 10+ files. CX Codex +1 304installs feature-planning The feature-planning skill turns feature requests and complex changes into ordered implementation plans with concrete tasks. Use it before coding when the scope needs structure. CX Codex +1 297installs code-execution The code-execution skill runs Python locally for bulk file work, code analysis, transformations, and Git tasks. It fits large or multi-step workflows. CX Codex +1 294installs conversation-analyzer conversation-analyzer analyzes your local Claude Code session logs to detect recurring errors, repetitive prompts, and workflow bottlenecks. CX Codex +1 249installs technical-doc-creator technical-doc-creator builds HTML documentation for APIs and systems with code samples, architecture diagrams, syntax highlighting, and workflow steps. CX Codex +1 221installs project-bootstrapper project-bootstrapper — a skill for Claude Code, Cursor, Codex and other platforms that scaffolds a new project or levels up an existing one: directories, linter configs, tests, Git hooks, CI/CD and documentation. CX Codex +1 212installs code-transfer A skill for precise code transfer between files using line-based positioning. Useful when you need to move a function to another file, extract a class into a separate module, or insert code at a specific line number. CX Codex +1 173installs

Project sponsors

Companies that keep this analytics open