New to Claude Skills? Learn how to install them →

wshobson on GitHub

Attack Tree Construction

Free

Visualize and analyze attack paths systematically.

by wshobson38.7k stars on wshobson/agents
1 views
Updated Jul 18, 2026
Get this skill

Free · Opens the source repo

What Attack Tree Construction does

The Attack Tree Construction skill provides a structured approach to visualizing and analyzing potential attack paths in security scenarios. By utilizing a tree-like structure, users can break down complex attack scenarios into manageable components, making it easier to identify vulnerabilities and defense priorities. Each attack tree starts with a root goal, which branches into sub-goals and ultimately leads to atomic attack steps, or leaves. This hierarchical representation aids in understanding how various attack vectors interconnect and contribute to achieving the overall objective.

This skill is particularly useful for security professionals engaged in threat modeling, penetration testing, and security architecture reviews. It allows users to systematically assess risks by mapping out potential threats and their corresponding attributes, such as cost, time, skill level, and detection likelihood. By defining these attributes, security teams can prioritize their defensive strategies and allocate resources more effectively.

Additionally, the skill emphasizes best practices for constructing attack trees, including the importance of being exhaustive in identifying attack vectors and regularly updating the trees to reflect the evolving threat landscape. It also encourages validation from experts, ensuring that the constructed trees are realistic and comprehensive. For those looking for concrete templates and examples, the skill provides a library of resources in the accompanying details file, making it easier to get started with attack tree construction.

Overall, this skill is an essential tool for professionals aiming to enhance their security posture by visualizing threats and communicating risks clearly to stakeholders.

When to use it

Use this skill when you need to map out attack scenarios, identify defense gaps, or communicate security risks effectively.

When not to use it

This skill may not be suitable for users looking for automated threat detection or real-time monitoring solutions.

What you can build with it

Mapping Attack Scenarios

Use the attack tree to visualize complex attack scenarios, breaking them down into manageable components for better analysis.

Identifying Defense Gaps

Utilize the skill to pinpoint vulnerabilities in your security architecture by analyzing the paths attackers might take.

Communicating Risks to Stakeholders

Employ the attack tree as a visual tool to effectively communicate security risks and priorities to stakeholders.

How to install Attack Tree Construction

View source

1. Install with the skills CLI

npx skills add wshobson/agents/attack-tree-construction --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by wshobson

Attack Tree Construction

Systematic attack path visualization and analysis.

When to Use This Skill

  • Visualizing complex attack scenarios
  • Identifying defense gaps and priorities
  • Communicating risks to stakeholders
  • Planning defensive investments
  • Penetration test planning
  • Security architecture review

Core Concepts

1. Attack Tree Structure

                    [Root Goal]
                         |
            ┌────────────┴────────────┐
            │                         │
       [Sub-goal 1]              [Sub-goal 2]
       (OR node)                 (AND node)
            │                         │
      ┌─────┴─────┐             ┌─────┴─────┐
      │           │             │           │
   [Attack]   [Attack]      [Attack]   [Attack]
    (leaf)     (leaf)        (leaf)     (leaf)

2. Node Types

TypeSymbolDescription
OROvalAny child achieves goal
ANDRectangleAll children required
LeafBoxAtomic attack step

3. Attack Attributes

AttributeDescriptionValues
CostResources needed$, $$, $$$
TimeDuration to executeHours, Days, Weeks
SkillExpertise requiredLow, Medium, High
DetectionLikelihood of detectionLow, Medium, High

Templates and detailed worked examples

Full template library lives in references/details.md. Read that file when you need concrete templates for this skill.

Best Practices

Do's

  • Start with clear goals - Define what attacker wants
  • Be exhaustive - Consider all attack vectors
  • Attribute attacks - Cost, skill, and detection
  • Update regularly - New threats emerge
  • Validate with experts - Red team review

Don'ts

  • Don't oversimplify - Real attacks are complex
  • Don't ignore dependencies - AND nodes matter
  • Don't forget insider threats - Not all attackers are external
  • Don't skip mitigations - Trees are for defense planning
  • Don't make it static - Threat landscape evolves

Frequently asked questions about Attack Tree Construction

Similar skills