attack-tree-construction – Security skill for AI agents
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Install the attack-tree-construction skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/attack-tree-construction-a7034.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /attack-tree-construction – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/attack-tree-construction-a7034.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $attack-tree-construction – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/attack-tree-construction-a7034.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /attack-tree-construction – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/attack-tree-construction-a7034.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /attack-tree-construction – then describe the task you want done.
SKILL.md content
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
Related skills
- cache-attack – Poison CDN cache or deceive when X-Cache header is detected.
- aso – When the user wants to audit or optimize an App Store or Google Play listing. Also use…
- cms-detection – Identify CMS, frameworks, and server technology stacks on live hosts.
- ai-security – Use when assessing AI/ML systems for prompt injection, jailbreak vulnerabilities, model…
- cors-credential-wordpress – Exploit WP CORS credential reflection for data theft.
- aims-audit – /compliance-os:aims-audit [scope] — ISO/IEC 42001 AIMS internal-audit 6-question forcing…
- agenttrace-session-audit – Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency…
- agy-auto – Configure agy-auto PreToolUse security gate to run Antigravity CLI (agy) unattended with…