Skip to main content
skill CX Codex

tree-of-thoughts — Claude Code skill: branch out before you build

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a claude-code
Open on GitHub

What tree-of-thoughts 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.

What it helps with

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

  • 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

How to install tree-of-thoughts

1Skills CLI (Vercel)

npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a claude-code

2Manually: put the files in place

~/.claude/skills/tree-of-thoughts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tree-of-thoughts/

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

Questions about tree-of-thoughts

How do I install tree-of-thoughts in Claude?

Run npx skills add NeoLabHQ/context-engineering-kit --skill tree-of-thoughts -a claude-code. The skill lands at ~/.claude/skills/tree-of-thoughts/SKILL.md.

What does tree-of-thoughts do?

It splits a task into eight phases: proposing approaches, pruning, expanding solutions, judging and synthesizing. A meta-judge writes the evaluation criteria for the task at hand.

What do I need before running it?

The .specs/research and .specs/reports directories, where proposals, judge reports and the selection are written. Create them with mkdir -p .specs/research .specs/reports.

Similar skills

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

From the same set64

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor