Agent skill
create-threat-model
Perform STRIDE threat modeling for a system or component when the user asks to threat model, analyze security risks, or identify attack vectors
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/create-threat-model
SKILL.md
Create Threat Model
Overview
Generate a STRIDE-based threat model (Microsoft) for a system or component. Identifies trust boundaries from architecture docs, analyzes each boundary for Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege threats, and recommends mitigations for each identified threat.
Workflow
-
Read architecture context -- Scan
.chalk/docs/engineering/for architecture docs, API designs, data models, and infrastructure descriptions. Check.chalk/docs/product/for PRDs that describe the feature's intended behavior. You need to understand the system before modeling threats against it. -
Parse the target system -- Extract from
$ARGUMENTSthe system, service, or component to threat model. If unspecified, ask the user to name the scope -- threat modeling the entire system at once is too broad to be useful. -
Determine the next file number -- Read filenames in
.chalk/docs/engineering/to find the highest numbered file. The next number ishighest + 1. -
Identify trust boundaries -- Map the boundaries where data or control crosses between different trust levels: client/server, service/service, internal/external, user/admin, authenticated/unauthenticated. Each boundary is a potential attack surface.
-
Apply STRIDE at each boundary -- For each trust boundary, analyze:
- Spoofing: Can an attacker impersonate a legitimate entity?
- Tampering: Can data be modified in transit or at rest?
- Repudiation: Can a user deny performing an action without detection?
- Information Disclosure: Can sensitive data leak to unauthorized parties?
- Denial of Service: Can the system be made unavailable?
- Elevation of Privilege: Can a user gain unauthorized access levels?
-
Rate and prioritize -- For each threat, assess likelihood (low/medium/high) and impact (low/medium/high). Prioritize by risk = likelihood x impact.
-
Recommend mitigations -- For each threat rated medium or higher, provide a specific, actionable mitigation. Reference existing controls from the architecture docs where applicable.
-
Write the file -- Save to
.chalk/docs/engineering/<n>_threat_model_<system-slug>.md. -
Confirm -- Share the file path and highlight the top 3 highest-risk threats that need immediate attention.
Output
- File:
.chalk/docs/engineering/<n>_threat_model_<system-slug>.md - Format: Plain markdown with trust boundary diagram (text-based), STRIDE analysis table, and prioritized mitigations
- First line:
# Threat Model: <System Name>
Anti-patterns
- Boilerplate threats without system context -- "SQL injection is a risk" is generic. Tie every threat to a specific trust boundary and data flow in the actual system.
- No mitigations -- A list of threats without mitigations is an anxiety generator, not a security tool. Every medium+ threat needs an actionable mitigation.
- Scope too broad -- Threat modeling "the application" produces shallow results. Scope to a specific component, service, or data flow for actionable depth.
- Missing trust boundaries -- If you only analyze the client-server boundary, you miss service-to-service, database access, third-party integrations, and admin interfaces. Map all boundaries.
- One-time artifact -- Note that threat models should be updated when the architecture changes. Flag sections that are most likely to become stale.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?