Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

decision-trees决策树

Agent Skill

decision-trees 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

131,030

周安装

5,571

GitHub Stars

13

下载量

45,905
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install decision-trees

简介

用于跨所有领域的复杂决策的决策树分析。当用户需要评估具有不确定结果的多个选项、评估风险/回报场景或系统地构建选择时使用。适用于商业、投资、个人决策、运营、职业选择、产品策略以及任何需要结构化评估的情况。触发器包括决策树、我应该、如果、评估选项、比较替代方案、风险分析。

SKILL.md

name
decision-trees
description
Decision tree analysis for complex decision-making across all domains. Use when user needs to evaluate multiple options with uncertain outcomes, assess risk/reward scenarios, or structure choices systematically. Applicable to business, investment, personal decisions, operations, career choices, product strategy, and any situation requiring structured evaluation. Triggers include decision tree, should I, what if, evaluate options, compare alternatives, risk analysis.

Decision Trees — Structured Decision-Making

Decision tree analysis: a visual tool for making decisions with probabilities and expected value.

When to Use

Good for:

  • Business decisions (investments, hiring, product launches)
  • Personal choices (career, relocation, purchases)
  • Trading & investing (position sizing, entry/exit)
  • Operational decisions (expansion, outsourcing)
  • Any situation with measurable consequences

Not suitable for:

  • Decisions with true uncertainty (black swans)
  • Fast tactical choices
  • Purely emotional/ethical questions

Method

Decision tree = tree-like structure where:

  • Decision nodes (squares) — your actions
  • Chance nodes (circles) — random events
  • End nodes (triangles) — final outcomes

Process:

  1. Define options — all possible actions
  2. Define outcomes — what can happen after each action
  3. Estimate probabilities — how likely is each outcome (0-100%)
  4. Estimate values — utility/reward for each outcome (money, points, utility units)
  5. Calculate EV — expected value = Σ (probability × value)
  6. Choose — option with highest EV

Formula

EV = Σ (probability_i × value_i)

Example:

  • Outcome A: 70% probability, +$100 → 0.7 × 100 = $70
  • Outcome B: 30% probability, -$50 → 0.3 × (-50) = -$15
  • EV = $70 + (-$15) = $55

Classic Example (from Wikipedia)

Decision: Go to party or stay home?

Estimates:

  • Party: +9 utility (fun)
  • Home: +3 utility (comfort)
  • Carrying jacket unnecessarily: -2 utility
  • Being cold: -10 utility
  • Probability cold: 70%
  • Probability warm: 30%

Tree:

Decision
├─ Go to party
│  ├─ Take jacket
│  │  ├─ Cold (70%) → 9 utility (party)
│  │  └─ Warm (30%) → 9 - 2 = 7 utility (carried unnecessarily)
│  │  EV = 0.7 × 9 + 0.3 × 7 = 8.4
│  └─ Don't take jacket
│     ├─ Cold (70%) → 9 - 10 = -1 utility (froze)
│     └─ Warm (30%) → 9 utility (perfect)
│     EV = 0.7 × (-1) + 0.3 × 9 = 2.0
└─ Stay home
   └─ EV = 3.0 (always)

Conclusion: Go and take jacket (EV = 8.4) > stay home (EV = 3.0) > go without jacket (EV = 2.0)

Business Example

Decision: Launch new product?

Estimates:

  • Success probability: 40%
  • Failure probability: 60%
  • Profit if success: $500K
  • Loss if failure: $200K
  • Don't launch: $0

Tree:

Launch product
├─ Success (40%) → +$500K
└─ Failure (60%) → -$200K

EV = (0.4 × 500K) + (0.6 × -200K) = 200K - 120K = +$80K

Don't launch
└─ EV = $0

Conclusion: Launch (EV = +$80K) is better than not launching ($0).

Trading Example

Decision: Enter position or wait?

Estimates:

  • Probability of rise: 60%
  • Probability of fall: 40%
  • Position size: $1000
  • Target: +10% ($100 profit)
  • Stop-loss: -5% ($50 loss)

Tree:

Enter position
├─ Rise (60%) → +$100
└─ Fall (40%) → -$50

EV = (0.6 × 100) + (0.4 × -50) = 60 - 20 = +$40

Wait
└─ No position → $0

EV = $0

Conclusion: Entering position has positive EV (+$40), better than waiting ($0).

Method Limitations

⚠️ Critical points:

  1. Subjective estimates — probabilities often "finger in the air"
  2. Doesn't account for risk appetite — ignores psychology (loss aversion)
  3. Simplified model — reality is more complex
  4. Unstable — small data changes can drastically alter the tree
  5. May be inaccurate — other methods exist that are more precise (random forests)

But: The method is valuable for structuring thinking, even if numbers are approximate.

User Workflow

1. Structuring

Ask:

  • What are the action options?
  • What are possible outcomes?
  • What are values/utility for each outcome?
  • How do we measure value? (money, utility units, happiness points)

2. Probability Estimation

Help estimate through:

  • Historical data (if available)
  • Comparable situations
  • Expert judgment (user experience)
  • Subjective assessment (if no data)

3. Visualization

Draw tree in markdown:

Decision
├─ Option A
│  ├─ Outcome A1 (X%) → Value Y
│  └─ Outcome A2 (Z%) → Value W
└─ Option B
   └─ Outcome B1 (100%) → Value V

4. EV Calculation

For each option:

EV_A = (X% × Y) + (Z% × W)
EV_B = V

5. Recommendation

Option with highest EV = best choice (rationally).

But add context:

  • Risk tolerance (can user handle worst case)
  • Time horizon (when is result needed)
  • Other factors (reputational risk, emotions, ethics)

Application Examples by Domain

Trading & Investing

Position Sizing:

  • Options: 5%, 10%, 20% of capital
  • Outcomes: Profit/loss with different probabilities
  • Value: Absolute profit in $

Entry Timing:

  • Options: Enter now, wait for -5%, wait for -10%
  • Outcomes: Price goes up/down
  • Value: Opportunity cost vs better entry price

Business Strategy

Product Launch:

  • Options: Launch / don't launch
  • Outcomes: Success / failure
  • Value: Revenue, market share, costs

Hiring Decision:

  • Options: Hire candidate A / candidate B / don't hire
  • Outcomes: Successful onboarding / quit after X months
  • Value: Productivity, costs, opportunity cost

Personal Decisions

Career Change:

  • Options: Stay / change job / start business
  • Outcomes: Success / failure in new role
  • Value: Salary, satisfaction, growth, risk

Real Estate:

  • Options: Buy house A / house B / continue renting
  • Outcomes: Price increase / decrease / personal situation changes
  • Value: Net worth, monthly costs, quality of life

Operations

Capacity Planning:

  • Options: Expand production / outsource / status quo
  • Outcomes: Demand increases / decreases
  • Value: Profit, utilization, fixed costs

Vendor Selection:

  • Options: Vendor A / Vendor B / in-house
  • Outcomes: Quality, reliability, failures
  • Value: Total cost of ownership

Calculator Script

Use scripts/decision_tree.py for automated EV calculations:

python3 scripts/decision_tree.py --interactive

Or via JSON:

python3 scripts/decision_tree.py --json tree.json

JSON format:

{
  "decision": "Launch product?",
  "options": [
    {
      "name": "Launch",
      "outcomes": [
        {"name": "Success", "probability": 0.4, "value": 500000},
        {"name": "Failure", "probability": 0.6, "value": -200000}
      ]
    },
    {
      "name": "Don't launch",
      "outcomes": [
        {"name": "Status quo", "probability": 1.0, "value": 0}
      ]
    }
  ]
}

Output:

📊 Decision Tree Analysis

Decision: Launch product?

Option 1: Launch
  └─ EV = $80,000.00
     ├─ Success (40.0%) → +$500,000.00
     └─ Failure (60.0%) → -$200,000.00

Option 2: Don't launch
  └─ EV = $0.00
     └─ Status quo (100.0%) → $0.00

✅ Recommendation: Launch (EV: $80,000.00)

Final Checklist

Before giving recommendation, ensure:

  • ✅ All options covered
  • ✅ Probabilities sum to 100% for each branch
  • ✅ Values are realistic (not fantasies)
  • ✅ Worst case scenario is clear to user
  • ✅ Risk/reward ratio is explicit
  • ✅ Method limitations mentioned
  • ✅ Qualitative context added (not just EV)

Method Advantages

Simple — people understand trees intuitively ✅ Visual — clear structure ✅ Works with little data — can use expert estimates ✅ White box — transparent logic ✅ Worst/best case — extreme scenarios visible ✅ Multiple decision-makers — can account for different interests

Method Disadvantages

Unstable — small data changes → large tree changes ❌ Inaccurate — often more precise methods exist ❌ Subjective — probability estimates "from the head" ❌ Complex — becomes unwieldy with many outcomes ❌ Doesn't account for risk preference — assumes risk neutrality

Important

The method is valuable for structuring thinking, but numbers are often taken from thin air.

What matters more is the process — forcing yourself to think through all branches and explicitly evaluate consequences.

Don't sell the decision as "scientifically proven" — it's just a framework for conscious choice.

Further Reading

  • Decision trees in operations research
  • Influence diagrams (more compact for complex decisions)
  • Utility functions (accounting for risk aversion)
  • Monte Carlo simulation (for greater accuracy)
  • Real options analysis (for strategic decisions)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.12%
按下载量换算45,042

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills