# tree-of-thoughts

Runs a hard task through three parallel agents, a pruning vote and a synthesis pass. Useful when the right approach isn't obvious up front.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 1787
- Author: NeoLabHQ
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/tree-of-thoughts/SKILL.md
- Updated: 2026-08-26
- HTML: https://affpapa.org/en/nevibecode/skills/tree-of-thoughts

## What it does

The skill follows the Tree of Thoughts pattern. Three agents each propose six high-level approaches to the same task, three judges vote and keep the top three, then those get expanded into full solutions. Judging criteria come from a separate meta-judge that writes a rubric for the specific task instead of reusing a fixed one.

After that an adaptive strategy picks the next move. A clear winner gets polished, a split decision goes to a synthesizer, and a round where every solution scores poorly sends the work back to the expansion phase. Intermediate files land in `.specs/research` and `.specs/reports`, so create both directories with `mkdir -p .specs/research .specs/reports` before you start — otherwise the agents have nowhere to write proposals and reports.

The skill pays off on tasks where several paths are worth exploring before committing to code. On small edits the eight phases just add overhead.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NeoLabHQ/context-engineering-kit tree-of-thoughts
```

2. **Manually: put the files in place**
- File: `.github/skills/tree-of-thoughts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NeoLabHQ/context-engineering-kit --path skills/tree-of-thoughts
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -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/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/tree-of-thoughts/SKILL.md

## When to use it
- pick an architecture when several designs look viable
- drop weak ideas before anyone builds them
- score solutions against criteria written for the task
- merge the good parts of several partial solutions
- restart expansion when every candidate fails

## Example prompts
- Run this through tree-of-thoughts: I need to choose a session storage design
- Use the tree-of-thoughts skill to explore approaches for refactoring the payments module
- Run tree-of-thoughts on the API design and keep the top three options

## Similar
- [define-opportunity-tree](https://affpapa.org/en/nevibecode/skills/define-opportunity-tree.md) — skill · 774 installs
- [attack-tree-construction](https://affpapa.org/en/nevibecode/skills/attack-tree-construction.md) — skill · 17309 installs
- [tree-shaking](https://affpapa.org/en/nevibecode/skills/tree-shaking.md) — skill · 1400 installs
- [godot-animation-tree-mastery](https://affpapa.org/en/nevibecode/skills/godot-animation-tree-mastery.md) — skill · 412 installs
- [critical-thinking-logical-reasoning](https://affpapa.org/en/nevibecode/skills/critical-thinking-logical-reasoning.md) — skill · 2400 installs
- [consciousness-council](https://affpapa.org/en/nevibecode/skills/consciousness-council.md) — skill · 1900 installs

From the same set: [neolabhq/context-engineering-kit](https://affpapa.org/en/nevibecode/by/neolabhq/context-engineering-kit.md) — 64 cards

---
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
