# Threat model

> Threat model is an open-source agent skill for security. Builds a structured security threat model for features before code is written. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ajyadav013/claude-kit/tree/main/skills/threat-model
- **Repository:** https://github.com/ajyadav013/claude-kit
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** threat-model
- **Collection:** https://github.com/ajyadav013/claude-kit
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through designing a threat model for security-sensitive changes such as authentication, payments, file uploads, multi-tenant boundaries and AI features. The agent identifies assets, entry points and trust boundaries, then works through STRIDE categories to list threats, rate severity, and pair each credible threat with a mitigation and a test that proves it.

For features that call a language model, the workflow adds a pass over LLM-specific risks such as prompt injection, insecure output handling, sensitive data disclosure, model denial of service and excessive agent permissions. It also describes an offensive red-teaming step that runs multi-turn adversarial attempts against the deployed feature and tracks an attack success rate over time.

The skill is meant for design time and refers to companion skills for building and verifying the code. It expects a feature description, the data involved and the actors who interact with it. The output is a short threat-model document with assets, entry points, a STRIDE table and residual risks.

## When your agent uses it

> Structured threat model for security-relevant features (auth, payments, file upload, multi-tenant, LLM/AI). Enumerate assets, STRIDE threats, mitigations. Do NOT use to write code (use security-and-hardening).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/threat-model)
- [License: MIT](https://github.com/ajyadav013/claude-kit/tree/HEAD/skills/threat-model)

## Features

- **Asset and boundary mapping:** Identifies what is worth protecting, where entry points sit, and which actors are untrusted.
- **STRIDE threat walkthrough:** Checks each entry point against spoofing, tampering, repudiation, disclosure, denial of service and privilege escalation.
- **Severity and mitigation pairing:** Scores credible threats by likelihood and impact and links each to a mitigation and a test.
- **LLM threat checklist:** Covers prompt injection, unsafe output handling, PII exposure, model cost abuse and excessive tool agency.
- **Adversarial red-teaming guidance:** Describes multi-turn attack strategies and scoring by attack success rate for AI features.
- **Escalation stop conditions:** Defines when to halt a design that has unmitigated critical threats or unclear secret handling.

## Good for

- Create a threat model before adding user authentication
- Review file upload design for tampering and disclosure risks
- Assess risks of a new RAG chatbot before implementation
- Plan security controls for a payments integration
- Identify multi-tenant isolation threats in a new data export feature

## Install

### Claude Code

This skill ships in the `claude-kit` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ajyadav013/claude-kit
/plugin install claude-kit@claude-kit
```

Or copy only this skill to `~/.claude/skills/threat-model`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/threat-model &&
cp -R "$tmp/skills/threat-model" ~/.claude/skills/threat-model &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/threat-model` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/threat-model` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/threat-model &&
cp -R "$tmp/skills/threat-model" ~/.agents/skills/threat-model &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/threat-model` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/threat-model` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/threat-model &&
cp -R "$tmp/skills/threat-model" ~/.cursor/skills/threat-model &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/threat-model` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ajyadav013/claude-kit.git --path skills/threat-model
```

Or copy the folder to `~/.gemini/skills/threat-model` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/threat-model`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/threat-model &&
cp -R "$tmp/skills/threat-model" ~/.copilot/skills/threat-model &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/threat-model` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ajyadav013/claude-kit.git
```

Then copy `claude-kit/skills/threat-model` into your agent's skills folder as `threat-model`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Threat model be used?

For new or changed auth, sessions, secrets, payments, file upload, data export, webhooks, multi-tenant boundaries, or any LLM or AI feature, before the code is written.

### Does Threat model write code?

No. The frontmatter says not to use it to write code; that work is directed to the security-and-hardening skill.

### What does Threat model need as input?

The feature or spec, the data it touches, and the actors involved such as anonymous users, authenticated users, admins or services.

### What is the expected output?

A short threat-model document covering assets, entry points and trust boundaries, a STRIDE table with severity, mitigation and test, and residual risks.

### How do I install Threat model in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/threat-model to use it in all your projects, or to .claude/skills/threat-model in one project. Or install the claude-kit plugin, which includes it: /plugin marketplace add ajyadav013/claude-kit, then /plugin install claude-kit@claude-kit.

### Does Threat model run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Threat model?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Threat model?

The closest alternatives to Threat model are Threat modeling, Security threat model, Sh threat model, Security and hardening and Threat model analyst.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Threat modeling](https://ai-powered.com/skills/threat-modeling): Threat modeling is an open-source agent skill for security.
- [Security threat model](https://ai-powered.com/skills/security-threat-model-mtarcure): Security threat model is an open-source agent skill for security.
- [Sh threat model](https://ai-powered.com/skills/sh-threat-model): Sh threat model is an open-source agent skill for security.
- [Security and hardening](https://ai-powered.com/skills/security-and-hardening): Security and hardening is an open-source agent skill for security.
- [Threat model analyst](https://ai-powered.com/skills/threat-model-analyst): Threat model analyst is an open-source agent skill for security.
- [Security reasoning](https://ai-powered.com/skills/security-reasoning): Security reasoning is an open-source agent skill for security.
- [Agentic safety audit](https://ai-powered.com/skills/agentic-safety-audit): Agentic safety audit is an open-source agent skill for security.
- [Security threat model](https://ai-powered.com/skills/security-threat-model): Security threat model is a free agent skill for security.

---
Source: https://ai-powered.com/skills/threat-model-ajyadav013
