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

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

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-construction

Codex

npx degit wshobson/agents/plugins/security-scanning/skills/attack-tree-construction#main ~/.codex/skills/attack-tree-construction

Claude.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.

Related security skills

  1. Security Review

    Official

    Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit…

    getsentry/skills★ 1.2k
  2. Audit

    a user-authored audit skill

    pbakaus/impeccable★ 112k
  3. Semgrep

    Official

    Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every…

    trailofbits/skills★ 8.3k
  4. Auth Implementation Patterns

    Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access…

    wshobson/agents★ 43k
  5. Sast Configuration

    Configure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code.

    wshobson/agents★ 43k
  6. Security Requirement Extraction

    Derive security requirements from threat models and business context.

    wshobson/agents★ 43k
  7. Signed Audit Trails Recipe

    Step-by-step cookbook for setting up cryptographically signed audit trails on Claude Code tool calls.

    wshobson/agents★ 43k
  8. Solidity Security

    Master smart contract security best practices to prevent common vulnerabilities and implement secure Solidity patterns.

    wshobson/agents★ 43k
  9. Stride Analysis Patterns

    Apply STRIDE methodology to systematically identify threats. Use when analyzing system security, conducting threat modeling sessions, or…

    wshobson/agents★ 43k

See all security skills →

More skills from wshobson

  1. Avoid Ai Writing

    Audit and rewrite prose so it stops reading as machine-generated.

    wshobson/agents★ 43k
  2. Backtesting Frameworks

    Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs.

    wshobson/agents★ 43k

All skills by wshobson →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.