Skip to content

Attack Tree Construction

Lets the agent map attack paths into structured attack trees to reveal defense gaps and priorities.

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

This skill teaches the agent a structured method for threat modeling: it breaks a security goal an attacker might pursue into sub-goals and concrete attack steps, arranged as a tree. Each step can be labelled OR (any path works) or AND (all steps required) and annotated with cost, time, required skill and likelihood of detection. The result is a visual map that helps teams see where defenses are weak and what to fix first, and explain risks to non-technical stakeholders. It is a planning and communication aid; it does not scan systems or test anything itself.

Great for

  • Security engineers planning threat models or prioritising defensive investments
  • Penetration testers organising attack scenarios before an engagement
  • Architects reviewing a system design for weak points
  • Teams who need to explain security risks to managers or non-specialists

Skip it if

  • Hands-on vulnerability scanning or exploitation, since the skill only structures analysis and does not run tools (it would not find real bugs in your system)
  • Situations needing verified facts about current threats, because the skill contains no live threat data and its advice is generic
  • Producing detailed real-world attack instructions for a specific target, which could be misused; keep trees at the level needed for defence

Try asking

  • “Build an attack tree for an attacker trying to steal customer payment data from our web app”
  • “Map the attack paths to gain admin access on our internal API and mark which ones need insider access”
  • “Turn these threat notes into an attack tree with cost, skill and detection ratings for the risk review”
  • “Show me the defense gaps in this attack tree and suggest which mitigations to prioritise”
Step-by-step guide: how to use Attack Tree ConstructionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    attack-tree-construction.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip attack-tree-construction.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip attack-tree-construction.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent a concrete goal, system description and stakeholder audience so the tree stays relevant and not generic.
  • Ask for the reference templates in references/details.md when you want worked examples to adapt.
  • Review the output with domain experts; the skill itself stresses that trees need validation and regular updates.

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.