attack-tree-construction — Claude Code skill: install
Builds attack trees to map threat paths, spot defense gaps, and explain security risks. Useful for penetration test planning and architecture reviews.
/plugin marketplace add wshobson/agents
/plugin install security-scanning@claude-code-workflowsWhat attack-tree-construction does
This skill breaks an attacker’s goal into sub-goals and atomic steps. OR nodes represent alternative paths, while AND nodes require every child condition. Leaf nodes capture individual attack steps, which can carry cost, time, required skill, and detection likelihood attributes.
The skill includes construction guidance, worked examples, and a template reference at references/details.md. It also prompts you to consider insider threats, dependencies, mitigations, and changes in the threat landscape. Install it when you need structured threat modeling or a security review; it is more detail than a simple vulnerability list needs.
What it helps with
- map a complex attack scenario
- identify gaps in defensive controls
- compare alternative paths to a root goal
- plan penetration testing work
- explain security risks to stakeholders
Example prompts for the agent
- Build an attack tree for the goal “gain access to the admin panel” and add attributes to each leaf.
- Analyze a service compromise scenario with OR and AND nodes, dependencies, and mitigations.
- Prepare an attack tree for a security architecture review using templates from `references/details.md`.
How to install attack-tree-construction
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install security-scanning@claude-code-workflowsThis installs the whole security-scanning plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill attack-tree-construction -a claude-code3Manually: put the files in place
~/.claude/skills/attack-tree-construction/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/attack-tree-construction/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill attack-tree-construction -a codex2Manually: put the files in place
.agents/skills/attack-tree-construction/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill attack-tree-construction -a cursor2Manually: put the files in place
.cursor/skills/attack-tree-construction/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents attack-tree-construction2Manually: put the files in place
.github/skills/attack-tree-construction/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/security-scanning/skills/attack-tree-constructionManually: put the files in place
.devin/skills/attack-tree-construction/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about attack-tree-construction
How do I install attack-tree-construction in Claude Code?
Run npx skills add wshobson/agents --skill attack-tree-construction -a claude-code. The skill file is placed at ~/.claude/skills/attack-tree-construction/SKILL.md.
What does attack-tree-construction do?
It turns an attacker’s root goal into sub-goals and atomic attack steps. The tree makes alternative paths, dependencies, and defensive priorities easier to review.
Which attributes can I add to attack steps?
The skill uses Cost, Time, Skill, and Detection. These describe required resources, execution duration, expertise, and likelihood of detection.
Source text
SKILL.md · MIT
---
name: attack-tree-construction
description: Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
---
# 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
| Type | Symbol | Description |
| -------- | --------- | ----------------------- |
| **OR** | Oval | Any child achieves goal |
| **AND** | Rectangle | All children required |
| **Leaf** | Box | Atomic attack step |
### 3. Attack Attributes
| Attribute | Description | Values |
| ------------- | ----------------------- | ------------------ |
| **Cost** | Resources needed | $, $$, $$$ |
| **Time** | Duration to execute | Hours, Days, Weeks |
| **Skill** | Expertise required | Low, Medium, High |
| **Detection** | Likelihood of detection | Low, 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
© Seth Hobson · MIT · wshobson/agents