# 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. Source: https://skillsagentes.com/skills/wshobson/agents/attack-tree-construction Repository: https://github.com/wshobson/agents Author: wshobson License: MIT Updated: hace 2 meses Context cost: 42 tok installed, 653 tok once triggered, 5.6k tok with every bundled file Bundle: 2 files, 22 KB Permissions requested: none declared ## Install ```bash npx -y skills add wshobson/agents --skill attack-tree-construction --agent claude-code ``` ## What it does - Construye árboles de ataque con nodos OR/AND y hojas para visualizar rutas de amenaza - Asigna atributos a cada ataque: coste, tiempo, habilidad requerida y probabilidad de detección - Referencia una plantilla completa en references/details.md con ejemplos detallados ## Use it when - Visualizar escenarios de ataque complejos - Identificar brechas de defensa y priorizarlas - Comunicar riesgos a stakeholders - Planificar pruebas de penetración o revisar arquitectura de seguridad ## What triggers it - "Ayúdame a construir un árbol de ataque para este sistema" - "Necesito mapear las rutas de ataque posibles a nuestra API" - "Quiero comunicar los riesgos de seguridad al equipo directivo" ## Files - SKILL.md — 3 KB - references/details.md — 19 KB ## SKILL.md Reproduced verbatim from wshobson/agents under MIT. This section is the upstream document and is in English. # 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 --- Skills Agentes — https://skillsagentes.com/skills/wshobson/agents/attack-tree-construction