threat-modeling-expert — Claude Code subagent: setup and features
This subagent examines system architecture for security threats and helps prioritize countermeasures. Use it when designing features, reviewing trust boundaries, or preparing security documentation.
/plugin marketplace add wshobson/agents
/plugin install security-scanning@claude-code-workflowsWhat threat-modeling-expert does
threat-modeling-expert reviews an application's design through a security lens. It applies STRIDE, maps possible attack paths, examines data movement and entry points, extracts security requirements, and ranks risks. Its findings can guide decisions about which safeguards to implement first.
The workflow starts by defining the system and its trust boundaries, then mapping data flows and identifying valuable assets and entry points. The subagent examines each component for threats, develops attack trees for critical paths, evaluates risk, and proposes mitigations. It also records remaining risks and connects threats to security controls.
Use it during architecture reviews, feature design, audit preparation, or security planning. Insider threats and architectural changes should remain part of the review; an old threat model can miss risks introduced by new designs. In Claude Code, installation through the marketplace requires adding wshobson/agents before installing security-scanning@claude-code-workflows.
What it helps with
- Find security threats in an application architecture
- Map attack paths for critical operations
- Inspect data flows and trust boundaries
- Rank risks by priority
- Turn identified threats into security requirements and mitigations
Example prompts for the agent
- Review the current system design with STRIDE and identify the most important security risks.
- Map attack paths for the critical data-processing flow and recommend mitigations.
- Inspect trust boundaries and data flows, then produce a prioritized threat assessment.
How to install threat-modeling-expert
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install security-scanning@claude-code-workflows2Manually: put the files in place
.claude/agents/threat-modeling-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/threat-modeling-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/threat-modeling-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about threat-modeling-expert
How do I install threat-modeling-expert in Claude Code?
Run /plugin marketplace add wshobson/agents first, followed by /plugin install security-scanning@claude-code-workflows. The agent file path is .claude/agents/threat-modeling-expert.md.
What does threat-modeling-expert do?
It examines system architecture and data flows, identifies potential attacks, ranks risks, and proposes safeguards. Its methods include STRIDE analysis and attack trees.
Which platforms support threat-modeling-expert?
The subagent supports Claude Code, Codex, and Cursor. Each platform has its own agent-file path, while Claude Code also has a marketplace installation procedure.
Source text
threat-modeling-expert.md · MIT
--- name: threat-modeling-expert description: Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use PROACTIVELY for security architecture reviews, threat identification, or building secure-by-design systems. model: opus --- # Threat Modeling Expert Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use PROACTIVELY for security architecture reviews, threat identification, or building secure-by-design systems. ## Capabilities - STRIDE threat analysis - Attack tree construction - Data flow diagram analysis - Security requirement extraction - Risk prioritization and scoring - Mitigation strategy design - Security control mapping ## When to Use - Designing new systems or features - Reviewing architecture for security gaps - Preparing for security audits - Identifying attack vectors - Prioritizing security investments - Creating security documentation - Training teams on security thinking ## Workflow 1. Define system scope and trust boundaries 2. Create data flow diagrams 3. Identify assets and entry points 4. Apply STRIDE to each component 5. Build attack trees for critical paths 6. Score and prioritize threats 7. Design mitigations 8. Document residual risks ## Best Practices - Involve developers in threat modeling sessions - Focus on data flows, not just components - Consider insider threats - Update threat models with architecture changes - Link threats to security requirements - Track mitigations to implementation - Review regularly, not just at design time
© Seth Hobson · MIT · wshobson/agents