Agent skill · security · aiskillstore
attack-tree-construction
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Why this skill is useful
Provides a structured attack tree model with specific attributes and calculations that enhance security analysis capabilities.
What it needs
About 7k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
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 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 Template 1: Attack Tree Data Model Template 2: Attack Tree Builder Template 3: Mermaid Diagram Generator Template 4: Attack Path Analysis `python from typing import Set, Tuple class AttackPathAnalyzer: """Analyze attack paths and coverage.""" def init(self, tree: AttackTree): self.tree = tree def getallpaths(self) -> List[List[AttackNode]]: """Get all possible attack paths.""" paths = [] self.collectpaths(self.tree.root, [], paths) return paths def collectpaths( self, node: AttackNode, currentpath: List[AttackNode], allpaths: List[List[AttackNode]] ) -> None: """Recursively collect all paths.""" currentpath = currentpath + [node] if node.nodetype == NodeType.LEAF: allpaths.append(currentpath) return if not node.children: allpaths.append(currentpath) return if node.nodetype == NodeType.OR: # Each child is a separate path for child in node.children: self.collectpaths(child, currentpath, allpaths) else: # AND # Must combine all children childpaths = [] for child in node.children: childsubpaths = [] self.collectpaths(child, [], childsubpaths) childpaths.append(childsubpaths) # Combine paths from all AND children combined = self.combineandpaths(childpaths) for combo in combined: allpaths.append(currentpath + combo) de …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/attack-tree-construction--123ab2