# Sh threat model

> Sh threat model is an open-source agent skill for security. Builds a STRIDE threat model of a codebase or design doc with trust boundaries and risks. It is available on Claude Code.

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

## About

This skill guides an agent through threat modeling a codebase, a design document or a specific change. It has the agent identify actors, assets, data flows and trust boundaries, note the controls present at each boundary, and rank STRIDE threats by risk. The output includes a data flow diagram and a hunt plan that a later security review can follow.

The skill is orchestrated as a short pipeline: a mapping step (reusing a recent map when one exists) followed by a modelling step run by a dedicated subagent. It supports a diff mode that models only what changed since a given git ref, and a design mode that works from Markdown, text, ADR or RFC documents without scanning code. It is static analysis only and avoids live testing.

It expects a target folder or a design document and a git repository for diff mode. It depends on companion skills from the same plugin, and writes its run files, including a JSON threat model, under a local security-harness directory in the target.

## When your agent uses it

> Threat-model a codebase, a design document, or a change: actors, assets, data flows, trust boundaries with the controls at each, STRIDE threats ranked by risk, a data flow diagram, and a hunt plan for a security review. Use when the user asks for a threat model, trust boundaries, a data flow diagram, STRIDE, an attack surface or architecture risk review, or 'what could go wrong' with a system or design. Usually invoked via the indra skill.

## What it can access

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

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-threat-model)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-threat-model)

## Features

- **STRIDE threat ranking:** Lists threats across the STRIDE categories and orders them by assessed risk.
- **Trust boundary mapping:** Identifies trust boundaries and the controls in place at each one.
- **Data flow diagram:** Produces a diagram of how data moves between actors, assets and components.
- **Design document review:** Models threats from Markdown, text, ADR or RFC design documents without scanning code.
- **Diff-based modelling:** Limits the model to changes since a chosen git branch, tag or commit.
- **Security review hunt plan:** Generates a plan of open threats for a follow-up security review to investigate.

## Good for

- Threat model my service before we launch it
- Map trust boundaries and data flows in this codebase
- Run STRIDE on this architecture design document
- Assess what changed in this branch since main from a security angle
- Ask what could go wrong with this system design

## Install

### Claude Code

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

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

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

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/sh-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/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-threat-model
```

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

### VS Code

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

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

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

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

## FAQ

### What inputs does Sh threat model need?

A target codebase folder (defaulting to the current directory) or one or more design documents, and optionally a git ref for diff mode.

### Does Sh threat model test the running system?

No. It performs static analysis of code and documents only, with no live testing.

### Where are the results written?

Into a run directory under a .security-harness folder in the target, including a JSON threat model and a Markdown version.

### Which tools does Sh threat model need installed?

No scanners are needed, since a threat model does not run security tools.

### How do I install Sh threat model in Claude Code?

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

### Does Sh 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 Sh 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 Sh threat model?

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

## Where this comes from

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

## Alternatives

- [Security threat model](https://ai-powered.com/skills/security-threat-model-mtarcure): Security threat model is an open-source agent skill for security.
- [Threat modeling](https://ai-powered.com/skills/threat-modeling): Threat modeling 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.
- [Threat model](https://ai-powered.com/skills/threat-model-ajyadav013): Threat model 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.
- [Security threat model](https://ai-powered.com/skills/security-threat-model): Security threat model is a free agent skill for security.
- [Tm7 threat model](https://ai-powered.com/skills/tm7-threat-model): Tm7 threat model is an open-source agent skill for security.
- [Security model](https://ai-powered.com/skills/security-model): Security model is an open-source agent skill for security.

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