Threat modeling

From kumaran-is/claude-code-onboarding · View interactive version

Threat modeling is an AI agent skill from the GitHub repository kumaran-is/claude-code-onboarding. Threat modeling skill for STRIDE analysis, attack tree construction, and security requirement extraction. Use when designing new features, reviewing architecture, conducting threat modeling sessions, creating security documentation, or training teams on security thinking. Triggers: threat model, STR

How to use this skill

Skill file

Iron Law: NO ARCHITECTURE REVIEW WITHOUT THREAT MODELING FIRST

Every new feature, service, or architectural change requires a threat model before implementation begins.

When to Use

Process

  1. Load methodology — Read references/stride-methodology.md for STRIDE matrix, DFD element mapping, risk scoring, and output template
  2. Load control library — Read references/threat-mitigation-mapping.md for control categories, the 16-control lookup table, and coverage scoring
  3. Model the system — Identify assets, trust boundaries, DFD elements, and interactions
  4. Run STRIDE — Apply per-element and per-interaction analysis using the methodology reference
  5. Map mitigations — Select controls from the library; verify defense-in-depth across layers
  6. Score and report — Calculate risk = impact × likelihood, document residual risks

References

| File | Content | Load When |

|------|---------|-----------|

| references/stride-methodology.md | STRIDE matrix, DFD mapping, risk scoring formula, output template | STRIDE analysis, DFD mapping, risk scoring |

| references/threat-mitigation-mapping.md | Control library (16 controls), coverage scoring, budget prioritization | Selecting security controls, budget prioritization |

Error Handling

If architecture documents are missing, reconstruct system topology from the codebase using Grep/Glob.

If a component lacks context for threat analysis, flag it explicitly rather than guessing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.