threat-modeling-expert — Claude Code skill: STRIDE and attack trees
A skill that walks a system through threat modeling: STRIDE per component, attack trees, risk scoring and security requirements.
npx claude-code-templates@latest --skill security/threat-modeling-expertWhat threat-modeling-expert does
The skill runs a fixed sequence. It starts with scope and trust boundaries, then data flow diagrams, assets and entry points. Each component gets STRIDE applied to it, critical paths get attack trees, and the findings are scored and ranked. Mitigations and residual risks come last.
Seven areas are covered: STRIDE analysis, attack tree construction, data flow diagram review, security requirement extraction, risk prioritization, mitigation design and mapping threats to controls. Use it when designing a new system, reviewing architecture before an audit, or when a team needs to see where its security requirements actually come from.
The author is explicit about the limits. Without scope or authorization for a security review, the skill is the wrong tool. It does not produce legal or compliance certification, and it is not a replacement for automated scanning when no human review is wanted. Two practical cautions: threat models should not hold sensitive details without access controls, and they need updating whenever the architecture changes.
What it helps with
- map threats in a new system before writing code
- find security gaps in an architecture ahead of an audit
- build an attack tree for a critical path
- derive security requirements from a system description
- rank the risks that came out of a review
Example prompts for the agent
- Run STRIDE over this payment service architecture and mark the trust boundaries
- Build an attack tree for the OAuth login flow
- Pull security requirements out of this data flow diagram
How to install threat-modeling-expert
1claude-code-templates
npx claude-code-templates@latest --skill security/threat-modeling-expert2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill threat-modeling-expert -a claude-code3Manually: put the files in place
~/.claude/skills/threat-modeling-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threat-modeling-expert/
Manually: put the files in place
.agents/skills/threat-modeling-expert/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/threat-modeling-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates threat-modeling-expert2Manually: put the files in place
.github/skills/threat-modeling-expert/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/security/threat-modeling-expertManually: put the files in place
.devin/skills/threat-modeling-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about threat-modeling-expert
How do I install threat-modeling-expert in Claude Code?
Use the templates command: npx claude-code-templates@latest --skill security/threat-modeling-expert. Or add it with npx skills add davila7/claude-code-templates --skill threat-modeling-expert -a claude-code. The skill file lands at ~/.claude/skills/threat-modeling-expert/SKILL.md.
What does threat-modeling-expert do?
It applies STRIDE to each component, builds attack trees for critical paths, reviews data flow diagrams and scores the resulting risks. It also extracts security requirements and proposes mitigations.
When should I not use this skill?
When you have no authorization for a security review, when you need legal or compliance certification, or when automated scanning without human review is enough.