Token导航 LogoToken导航

Agent Skill · 研究检索

tree-of-thoughts(思想之树)

tree-of-thoughts 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tree-of-thoughts 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为权限未标注;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 8,360。

总安装 16,558周安装 704GitHub Stars 公开资料未说明下载 5,801核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
2.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tree-of-thoughts(思想之树)
来源仓库:https://github.com/tobisamaa/tree-of-thoughts
安装命令:
openclaw skills install tree-of-thoughts
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install tree-of-thoughts

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

支持复杂问题的多路径推理,评估多个解决方案并选择最优路径。适用于困难决策、创意生成和策略优化等场景。通过分支探索和结果评估机制提升推理深度。tree-of-thoughts 属于研究检索类 Skill,可作为该场景下的辅助能力补充。需确认计算资源和执行时间限制是否满足任务需求。建议结合具体用例阅读原始文档了解实现细节。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install tree-of-thoughts;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

tree-of-thoughts 怎么安装?

在终端执行 openclaw skills install tree-of-thoughts。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tree-of-thoughts 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tree-of-thoughts 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

tree-of-thoughts 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

tree-of-thoughts 用的人多吗?

公开数据是累计安装 16,558 次,近一周安装 704 次,下载 5,801 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tree-of-thoughts 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tree-of-thoughts

思想之树 · 本页

16,558—权限未标注MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
tree-of-thoughts
version
2.0.0
description
Multi-path reasoning for complex problems. Explore multiple solution branches → Evaluate each → Select optimal path. Use for: difficult decisions, creative problems, ambiguous situations, optimization challenges.\
metadata
openclaw
emoji
🌳
os
["darwin", "linux", "win32"]

Tree of Thoughts (ToT) Reasoning (Enhanced v2.0.0)

v2.0.0 Enhancement: Parallel execution + intelligent caching (FoT pattern) Speed Improvement: 3-5x faster for complex problems Cache Benefit: 50-200x faster for similar cached problems

Advanced reasoning through systematic exploration of solution spaces.

What is Tree of Thoughts?

Traditional reasoning (Chain of Thought):

Problem → Step 1 → Step 2 → Step 3 → Solution
(Single linear path)

Tree of Thoughts:

                    Problem
                   /   |   \
              Path A Path B Path C
               /  \    |    /  \
            A1   A2   B1  C1   C2
             |    |    |   |    |
          [eval] [eval] ... [eval]
             \    |    |   /    /
              \   |    |  /    /
               Best Solution

Key differences:

  • Explores MULTIPLE paths
  • Evaluates EACH branch
  • Can BACKTRACK from dead ends
  • SELECTS optimal solution
  • More robust than linear thinking

When to Use ToT

Use ToT for:

  • Multiple possible solutions exist
  • Problem is ambiguous or complex
  • Need to compare approaches
  • High cost of failure
  • Creative/optimization problems
  • Uncertain which method works

Skip ToT for:

  • Simple, clear problems
  • Single obvious solution
  • Time-critical decisions
  • Routine operations
  • Well-known procedures

Parallel Execution + Caching (v2.0.0)

Performance Improvements

ScenarioBeforeAfterSpeedup
3-branch exploration3.0s1.0s3x
5-branch exploration5.0s1.2s4.2x
Deep tree (depth 4)8.0s2.0s4x
Similar cached problem5.0s0.025s200x

Parallel Tree Generation

async def parallel_tree_of_thoughts(problem, branches=5, depth=3):
    """
    Generate and evaluate thought tree in parallel.
    
    Benefits:
    - 3-5x faster than sequential
    - All branches generated simultaneously
    - Evaluation parallelized
    """
    # Step 1: Generate all initial thoughts in parallel
    initial_thoughts = await asyncio.gather(*[
        generate_thought_async(problem) for _ in range(branches)
    ])
    
    # Step 2: Evaluate all thoughts in parallel
    evaluations = await asyncio.gather(*[
        evaluate_thought_async(thought) for thought in initial_thoughts
    ])
    
    # Step 3: Select top thoughts for expansion
    top_thoughts = select_top_k(initial_thoughts, evaluations, k=3)
    
    # Step 4: Expand in parallel
    expanded = await asyncio.gather(*[
        expand_thought_async(thought, depth-1) for thought in top_thoughts
    ])
    
    return select_best_solution(expanded)

Intelligent Caching

def cached_tree_of_thoughts(problem, cache_ttl_hours=24):
    """
    ToT with semantic caching for similar problems.
    
    Cache hits when:
    - Same problem repeated (exact match)
    - Similar problem (>85% semantic similarity)
    - Related problem type (same domain)
    """
    cache_key = semantic_hash(problem)
    cached = cache_get(cache_key)
    
    if cached and semantic_similarity(problem, cached['problem']) > 0.85:
        return {
            "solution": cached['solution'],
            "from_cache": True,
            "cache_age": (now - cached['timestamp']).minutes
        }
    
    # Generate fresh solution
    result = parallel_tree_of_thoughts(problem)
    
    # Cache for future
    cache_set(cache_key, {
        'problem': problem,
        'solution': result,
        'timestamp': now()
    })
    
    return {**result, "from_cache": False}

CLI Flags

--parallel         Use parallel execution (default)
--cached           Enable caching (default)
--sequential       Disable parallel execution
--no-cache         Disable caching
--branches N       Set number of branches (default: 5)
--depth N          Set tree depth (default: 3)

ToT Process

Step 1: GENERATE Thoughts

Given problem, generate multiple initial approaches:
- Thought A: [Approach 1]
- Thought B: [Approach 2]
- Thought C: [Approach 3]

Step 2: EVALUATE Thoughts

For each thought, assess:
- Feasibility: Can this work?
- Quality: How good would result be?
- Cost: Time/resources needed?
- Risk: What could fail?

Step 3: EXPAND Promising Thoughts

Take best thoughts and expand:
- Thought A → A1, A2, A3
- Thought B → B1, B2
(Expand only promising branches)

Step 4: EVALUATE Branches

Evaluate each expanded branch:
- A1: [score/10]
- A2: [score/10]
- B1: [score/10]

Step 5: SEARCH for Solution

Strategies:
- BFS: Explore all branches breadth-first
- DFS: Dive deep into promising branches
- Best-First: Always expand highest-rated
- Beam Search: Keep top-K branches

Step 6: SELECT Optimal Path

Choose path with best expected outcome:
- Highest evaluation score
- Most feasible
- Best cost/benefit ratio

Thought Evaluation

Evaluation Criteria

Feasibility (0-10):

- 10: Definitely possible
- 7-9: Likely possible
- 4-6: Maybe possible
- 1-3: Unlikely to work
- 0: Impossible

Quality (0-10):

- 10: Perfect solution
- 7-9: Great solution
- 4-6: Adequate solution
- 1-3: Poor solution
- 0: Doesn't solve problem

Cost (0-10, inverse):

- 10: Negligible cost
- 7-9: Low cost
- 4-6: Moderate cost
- 1-3: High cost
- 0: Prohibitively expensive

Risk (0-10, inverse):

- 10: No risk
- 7-9: Low risk
- 4-6: Moderate risk
- 1-3: High risk
- 0: Certain failure

Scoring Formula

Score = (Feasibility * 0.3) + (Quality * 0.3) + (Cost * 0.2) + (Risk * 0.2)

Adjust weights based on priorities:

  • Quality-focused: Quality * 0.5
  • Speed-focused: Cost * 0.5
  • Safety-focused: Risk * 0.5

Search Strategies

Breadth-First Search (BFS)

Level 1: Explore all initial thoughts
Level 2: Expand all promising thoughts
Level 3: Continue breadth-wise
Good for: Comprehensive exploration

Depth-First Search (DFS)

Level 1: Pick most promising thought
Level 2: Dive deep into that branch
Level 3: Continue depth-wise
Good for: Quick deep solutions

Best-First Search

Always expand the highest-rated node
Use priority queue
Good for: Finding optimal quickly

Beam Search

Keep only top-K branches at each level
Prune low-rated branches early
Good for: Efficiency with quality

ToT Templates

Decision Problem

## Problem: [Decision to make]

### Initial Thoughts
1. **Option A**: [Description]
   - Feasibility: 8/10
   - Quality: 7/10
   - Cost: 9/10
   - Risk: 8/10
   - **Score**: 7.9/10

2. **Option B**: [Description]
   - Feasibility: 9/10
   - Quality: 6/10
   - Cost: 7/10
   - Risk: 6/10
   - **Score**: 7.1/10

3. **Option C**: [Description]
   - Feasibility: 6/10
   - Quality: 9/10
   - Cost: 5/10
   - Risk: 4/10
   - **Score**: 6.3/10

### Expansion (Top 2)
**Option A** → A1: [Refinement] (Score: 8.5/10)
**Option B** → B1: [Refinement] (Score: 7.8/10)

### Selected Path: A1
Reason: Highest score, good balance of feasibility and quality

Creative Problem

## Problem: [Creative challenge]

### Thought Branches
1. **Creative A**: [Idea]
   - Novelty: 9/10
   - Feasibility: 5/10
   - Impact: 8/10
   - **Score**: 7.4/10

2. **Creative B**: [Idea]
   - Novelty: 7/10
   - Feasibility: 8/10
   - Impact: 7/10
   - **Score**: 7.3/10

3. **Safe C**: [Conservative idea]
   - Novelty: 4/10
   - Feasibility: 9/10
   - Impact: 6/10
   - **Score**: 6.3/10

### Hybrid Approach: A + B
Combine novelty of A with feasibility of B
Score: 8.2/10

Integration Patterns

ToT + Task Decomposition

1. Use ToT to choose decomposition strategy
2. Compare different breakdown approaches
3. Select optimal decomposition

ToT + Error Recovery

1. When error occurs
2. Generate multiple recovery options via ToT
3. Evaluate each recovery path
4. Select best recovery strategy

ToT + Self-Reflection

1. After completing task
2. Reflect: Did I consider enough options?
3. Should I have used ToT?
4. Was my evaluation accurate?

Backtracking

When a path fails:

1. Mark branch as dead end
2. Record why it failed
3. Backtrack to decision point
4. Try next best alternative
5. Learn from failure

Example:

Path A → A1 → A1a [FAILED: X didn't work]
Backtrack to A
Path A → A2 → A2a [SUCCESS]

Pruning Strategies

Early pruning:

  • Score < 3/10: Drop immediately
  • Infeasible: Drop immediately
  • High risk + low quality: Drop

Continuous pruning:

  • After expansion, keep only top 50%
  • Remove redundant branches
  • Merge similar thoughts

Practical Examples

Example 1: Choose Architecture

## Problem: Design system architecture

### Thoughts
1. Monolith: Simple, fast to build, hard to scale
   Score: 6/10 (good for MVP, bad for scale)

2. Microservices: Scalable, complex, slow to build
   Score: 7/10 (good for scale, overkill now)

3. Modular Monolith: Balanced, medium complexity
   Score: 8/10 (best of both)

### Expansion
Modular Monolith →
  - M1: Start modular, split later (8.5/10)
  - M2: Full modules from start (7/10)

### Decision: M1
Start with modular monolith, design for future split

Example 2: Fix Performance Bug

## Problem: API too slow

### Thoughts
1. Cache everything: Fast, memory-heavy, stale data risk
   Score: 6/10

2. Optimize queries: Moderate speedup, accurate data
   Score: 8/10

3. Add indexes: Quick win, limited impact
   Score: 7/10

4. Rewrite in faster language: High impact, high cost
   Score: 5/10

### Expansion
Optimize + Indexes → Combined approach
Score: 9/10 (synergy)

### Decision: Optimize queries + Add strategic indexes

ToT Reasoning Log

Track ToT sessions in: memory/tot-sessions.md

## [Date] ToT Session: [Problem]

### Options Considered: [N]
### Paths Explored: [N]
### Depth: [N levels]
### Decision: [Chosen path]
### Rationale: [Why this won]
### Outcome: [Did it work?]
### Lesson: [What was learned]

Metrics

  • Average thoughts generated per problem
  • Search depth average
  • Backtrack rate
  • Decision quality (outcomes)
  • Time to decision
  • Solution diversity

Quick Actions

  • tot [problem] - Run ToT reasoning
  • compare [options] - Evaluate multiple options
  • decide [decision] - Make decision with ToT
  • branches - Show current ToT tree

Best Practices

  1. Generate many thoughts initially (5-10)
  2. Evaluate objectively (use criteria)
  3. Prune aggressively (don't explore poor options)
  4. Expand gradually (depth vs breadth balance)
  5. Backtrack when stuck (dead ends happen)
  6. Document reasoning (learn from decisions)
  7. Review outcomes (improve evaluation accuracy)

Remember: The best solution is rarely the first one you think of. Explore, evaluate, select.

Real Usage Example

Scenario: Choosing the best system improvement to implement

Problem

"What ONE improvement should I make to the OpenClaw system today?"

Initial Thoughts (Generated 5 options)

OptionDescriptionFeasibilityQualityCostRiskScore
AAuto-create log files97998.3
BAdd quick-action triggers48355.0
CAdd integration examples96897.6
DCreate error pattern detection79677.4
ECreate skill test runner69566.5

Scoring Formula

Score = (Feasibility × 0.3) + (Quality × 0.3) + (Cost × 0.2) + (Risk × 0.2)

Expansion (Top 2)

  • A → A1: Auto-create all log files AND error folder → Score: 8.5
  • D → D1: Simple regex-based error classifier → Score: 7.8

Decision: A1 (Auto-create log files)

Rationale: Highest score, lowest risk, immediate usability improvement

Outcome

Created:

  • memory/criticism-log.md
  • memory/tot-sessions.md
  • memory/errors/error-log.md

Lesson: Simple infrastructure improvements often beat complex features.

平台分布

OpenClaw

74.46%
按下载量换算4,319

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills