Attack Tree Construction skill for Claude
Build comprehensive attack trees to visualize threat paths.
When Claude uses it
Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Attack Tree Construction SKILL.md
The full skill file from wshobson/agents (MIT).
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
How to install Attack Tree Construction
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit wshobson/agents/plugins/security-scanning/skills/attack-tree-construction#main ~/.claude/skills/attack-tree-constructionCodex
npx degit wshobson/agents/plugins/security-scanning/skills/attack-tree-construction#main ~/.codex/skills/attack-tree-constructionClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the Attack Tree Construction skill do?
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
+How do I install Attack Tree Construction in Claude Code?
Copy the skill folder into ~/.claude/skills/attack-tree-construction, for example with "npx degit wshobson/agents/plugins/security-scanning/skills/attack-tree-construction#main ~/.claude/skills/attack-tree-construction". Claude Code loads it automatically and uses it when a task matches.
+Does Attack Tree Construction work with ChatGPT or Codex?
Yes. Attack Tree Construction uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/attack-tree-construction. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Attack Tree Construction free?
Attack Tree Construction is published on GitHub by wshobson under the MIT license, which allows free use.