Threat Model skill
Build a THREAT_MODEL.md by interviewing the owner or reading the code and past CVEs.
Official Anthropicby AnthropicChecked November 18, 2026
Install Threat Model free
Leave your email and the install steps open right here: one prompt to paste into your AI tool. Works for all 151 skills.
Part of Anthropic's defending code reference harness, a public toolkit for finding and fixing vulnerabilities with Claude. It writes a THREAT_MODEL.md, a map of what an attacker would go after, either by interviewing the system's owner with four questions or by reading the code, its git history and past CVEs, and it ends with the top 5 threats by likelihood times impact.
Who is Threat Model for?
- Security engineers
- Tech leads
- CTOs
What's inside Threat Model
Threat Model is a 156-line SKILL.md that routes to two mode guides, plus an output schema and a README. Bootstrap mode saves progress through a Python helper in the harness's shared _lib folder, so a copy of this folder alone lacks it.
When it switches on
It switches on when you ask to threat model a codebase, map its attack surface or ask what to worry about in it; you can also type /threat-model with a mode and a folder.
What the instructions cover
- A litmus test: if fixing one line removes an entry, it was a bug, not a threat; bugs only raise likelihood
- Interview mode: four questions with the system's owner, ending with a check of the result
- Bootstrap mode in five stages, including a STRIDE gap check (a standard list of six attack types)
- An eight-section THREAT_MODEL.md, from system context to recommended fixes
- A closing list of the top 5 threats by likelihood times impact
What it needs
- Python 3 and the harness's .claude/skills/_lib/checkpoint.py for bootstrap runs
- A local copy of the code, and the owner in the chat for interview mode
| File | What it is |
|---|---|
SKILL.md | 156 lines: safety preamble, mode routing and output rules |
bootstrap.md | 420 lines: the five-stage code-first method with checkpoints |
interview.md | 203 lines: the four-question owner interview |
schema.md | 189 lines: required sections and impact and likelihood scoring |
Watch out: It only reads code, never building or running the target; asked to prove a threat with an exploit, it points to the harness's vuln-pipeline instead.
How to use Threat Model: which prompts work?
Threat model this codebaseInterview me to threat model our [payments service]What should we be worried about in this repo?How do you install Threat Model?
Skills follow the open Agent Skills standard, so this one is not tied to one company. Pick the AI tool you use. Not sure? The first tab covers most of them in one step. New to this? Our guide on how to install Claude skills walks through it, and Anthropic's plugin guide covers the Claude app.
Install this skill for me so it works in every project: run `npx skills add https://github.com/anthropics/defending-code-reference-harness/tree/main/.claude/skills/threat-model -g -y` in my terminal. If Node.js is missing, tell me how to install it first. When it's done, confirm the skill is installed and tell me how to start using it.Or do it yourself:
One command installs the skill: it finds the AI tools on your computer and asks which ones should get it.
npx skills add https://github.com/anthropics/defending-code-reference-harness/tree/main/.claude/skills/threat-model -gYou need Node.js installed (free, from nodejs.org). The -g flag makes the skill available in every project.
Good to know: Start with /quickstart for a guided tour. The harness also includes scanning, triage, patching and verification skills.
Unlock the install steps
Free. Leave your email once to open the install steps for all 151 skills, and get the best new skills each month.
How did we check Threat Model?
On October 26, 2026 we read all 5 files in the skill's folder, starting with its 156-line SKILL.md. The section on what's inside comes from those files. Its license is Apache-2.0. Its files were last changed in July 2026. We have not run it on a test task yet.
Not a developer? You can still use Threat Model: you say in plain words what should work, Claude Code does the technical part and shows you what it checked. Working that way, from the first install to reading the result, is what our Claude Code course teaches (early access).
More skills worth a look
- Cloudflare Security AuditMulti-phase code security audits with independently verified findings
- NVIDIA SkillSpector Skill InspectorCheck whether a skill is safe before you install it, with NVIDIA's scanner
- Trail of Bits Semgrep ScanA planned, approved Semgrep scan with SARIF output, from the Trail of Bits team