Skip to main content
skill Claude Code CX Codex Cursor

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.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install security-scanning@claude-code-workflows
Open on GitHub

What 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-workflows

This installs the whole security-scanning plugin with all its skills

2Skills CLI (Vercel)

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

3Manually: put the files in place

~/.claude/skills/attack-tree-construction/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/attack-tree-construction/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

unlazy Leonxlnx This skill sets testable completion gates, breaks complex work into stages, and rechecks evidence before the agent reports completion. Claude Code CX Codex Cursor +1 9,400installs google-cloud-storage-basics official google This skill helps an agent manage Google Cloud Storage buckets and objects, from file transfers and access control to storage policies. Claude Code Gemini CLI CX Codex 5,516installs google-cloud-global-frontend-configuration official google This skill guides design and deployment of a Google Cloud global external Application Load Balancer. Use it for CDN, WAF, and Service Extensions setup. Claude Code Gemini CLI CX Codex 5,300installs firebase-security-rules-auditor Google LLC Audits Firebase rules for data leaks, privilege escalation, and validation gaps. Use it when reviewing Firestore or Cloud Storage access. Claude Code CX Codex Cursor +1 138,200installs cloud-sync thedotmack Syncs your claude-mem database with cmem.ai Pro cloud storage. Checks sync status, manages the connection, and uploads observation narratives to the server. Claude Code CX Codex Cursor +1 2,100installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor