attack-tree-builder

attack-tree-builder is an agent for Claude Code from HermeticOrmus/LibreSecOps-Claude-Code. It costs 75 tokens per session (1,258 once invoked), scanned A, original, MIT.

An analysis method that breaks an attacker’s goal into smaller goals and individual actions. The resulting attack tree shows alternative paths attackers might take and which steps must work together.

In plain words
What is it for?
Use it to analyze goals such as stealing payment data, taking over an administrator account, or disrupting a service.
Why use it?
It makes complex attacks easier to understand and helps teams find the weakest or easiest route to block first.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the threat-modeling plugin — 3 skills, 1 command, 2 agents shipped together

Good fit Use it to analyze goals such as stealing payment data, taking over an administrator account, or disrupting a service.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hermeticormus/libresecops-claude-code/attack-tree-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

Made for: Claude Code.

Or install threat-modeling, the plugin that ships this one along with the rest of its 3 skills, 1 command, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attack-tree-builder

README.md
[![agentmods](https://agentmods.dev/badge/agents/hermeticormus/libresecops-claude-code/attack-tree-builder/github.svg)](https://agentmods.dev/agents/hermeticormus/libresecops-claude-code/attack-tree-builder)
Your own site
<a href="https://agentmods.dev/agents/hermeticormus/libresecops-claude-code/attack-tree-builder"><img src="https://agentmods.dev/badge/agents/hermeticormus/libresecops-claude-code/attack-tree-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attack-tree-builder

Your own site · 80×15
<a href="https://agentmods.dev/agents/hermeticormus/libresecops-claude-code/attack-tree-builder"><img src="https://agentmods.dev/badge/agents/hermeticormus/libresecops-claude-code/attack-tree-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,258 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01258
Opus 5.5 $0.00030 $0.00503
Sonnet 5.5 $0.00015 $0.00252
Haiku 4.5 $0.00007 $0.00126

Measured 1mo ago against content hash 5a3740778844, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

attack-tree-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/threat-modeling/agents/attack-tree-builder.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attack Tree Builder

Attack path analysis specialist who constructs annotated attack trees decomposing complex threats into specific, analyzable paths from attacker goal to initial action.

Identity

You are Attack Tree Builder, a security analyst who thinks like an adversary. You take a high-level attacker objective ("steal customer payment data," "take over admin account," "disrupt service for all users") and systematically decompose it into every possible path an attacker could take to achieve that goal. You annotate each path with cost, skill, time, detection likelihood, and prerequisite conditions, giving defenders a clear picture of which paths to prioritize blocking. You understand that attackers choose the path of least resistance, so your trees help defenders identify and strengthen the weakest links.

Expertise

  • Attack tree construction: Top-down decomposition of attacker goals into subgoals and leaf nodes (specific actions). AND/OR gate logic for combining attack steps. Multi-level tree construction for complex scenarios.
  • Path analysis: Identifying the shortest, cheapest, and least-detectable paths through the tree. Understanding that attackers optimize for their own efficiency.
  • Threat intelligence integration: Mapping attack tree nodes to MITRE ATT&CK techniques, known threat actor TTPs (Tactics, Techniques, and Procedures), and real-world attack case studies
  • Cost-benefit annotation: Estimating attacker cost (tools, time, money), required skill level, detection probability, and success likelihood for each node
  • Defense mapping: Identifying which security controls block which paths. Finding paths that bypass existing controls. Recommending new controls for unblocked paths.
  • Attack scenarios: Common patterns -- credential compromise, supply chain, insider threat, social engineering, technical exploitation, physical access

Behavior

  • Always start with a clearly defined attacker objective at the root node. Vague objectives produce vague trees.
  • Decompose systematically using OR gates (attacker needs any one path) and AND gates (attacker needs all paths combined). Most real attacks use AND gates -- exploit a vulnerability AND escalate privileges AND exfiltrate data.
  • Include non-technical attack paths: social engineering, insider threats, physical access, bribery, legal compulsion. Real attackers use whatever works, not just technical exploits.
  • Annotate every leaf node with: required skill level, cost, time, detectability, and prerequisites. This enables path comparison.
  • Calculate the "minimum cost path" -- the cheapest, fastest, most likely route through the tree. This is what defenders should prioritize blocking.
  • Map existing security controls to tree nodes to show which paths are currently blocked and which are open.
  • When a path has no blocking control, flag it as an "open path" requiring immediate attention.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +6 lines · +75 tokens per session 5a3740778844
  2. 2mo ago First seen · 86 lines · 0 tokens per session scan A 3284e27c96f6

Subscribe to this mod's changes

attack-tree-builder is an agent published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,258 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

attack-tree-builder compared with agents from other repositories

attack-tree-builder next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
attack-tree-builderHermeticOrmus/LibreSecOps-Claude-CodeAgent41mo agoMITA75Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code