Skip to content
Back to skills

Tree Of Thoughts

ASecurity

Multi-path reasoning with evaluation and backtracking - 74% success on complex tasks

  • 229 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 6, 2026
code-qualitygonodetestingdebugging

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add Miosa-osa/canopy --skill tree-of-thoughts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tree Of Thoughts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tree Of Thoughts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/miosa-osa-tree-of-thoughts/badge)](https://www.skillsdirectory.com/skills/miosa-osa-tree-of-thoughts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tree-of-thoughts
description: "Multi-path reasoning with evaluation and backtracking - 74% success on complex tasks"
trigger: "complex reasoning, planning, multi-step problems"
priority: 2
dynamic: false
created: "2026-01-26"
---

# Tree of Thoughts (ToT) Pattern

Multi-path reasoning that explores, evaluates, and backtracks. Achieved **74% success rate** on Game of 24 vs 4% with standard CoT.

## Activation

Triggers on:
- Problems requiring non-trivial planning
- Decision trees with multiple valid paths
- Complex debugging with multiple hypotheses
- Creative tasks with evaluation criteria

## Process

### Phase 1: Decompose
Break problem into intermediate steps that can be evaluated independently.

### Phase 2: Generate (Branch)
At each step, generate 3 candidate "thoughts" (reasoning paths):

```
STEP N:
├─ Thought A: [approach 1]
├─ Thought B: [approach 2]
└─ Thought C: [approach 3]
```

### Phase 3: Evaluate
Score each thought (0-10) on:
- Progress toward goal
- Feasibility
- Reversibility if wrong

### Phase 4: Search Strategy
- **BFS**: Explore all branches at depth N before N+1 (shallow trees)
- **DFS**: Follow promising paths deeper (deep trees)
- **Beam Search**: Keep top-K paths at each level

### Phase 5: Backtrack
If path scores drop below threshold (5/10), backtrack to last good node.

## Zero-Shot ToT Prompt

Use this simple prompt for ToT without explicit tree construction:

```
"Imagine three different experts are answering this question.
All experts will write down 1 step of their thinking, then share it with the group.
Then all experts will go on to the next step.
If any expert realizes they're wrong at any point, they leave.
Continue until consensus."
```

## Integration

- Works with @architect for system design decisions
- Pairs with @debugger for multi-hypothesis testing
- Feed final path to learning engine for pattern storage

---

*Based on Princeton/DeepMind research - arXiv:2305.10601*

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…