threat-model

Generates repository-scoped security threat models covering trust boundaries, attack surfaces, and severity calibration.

Updated May 4, 2026
One-click install
npx skills add https://github.com/antstanley/skills --skill threat-model-antstanley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threat-model
Source: https://github.com/antstanley/skills/tree/main/plugins/security/skills/threat-model
Command: npx skills add https://github.com/antstanley/skills --skill threat-model-antstanley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Security scans need a consistent, repository-wide threat model to ground vulnerability discovery, but teams often lack one or reuse stale, diff-scoped assumptions. This Skill creates or reuses a cached repository-scoped threat model so every scan pass reasons from the same trust boundaries and attacker stories. ## Core Features & Use Cases - Threat Model Generation: Produces a structured Markdown threat model with overview, trust boundaries, attack surfaces, mitigations, and severity calibration from Critical to Low. - Cache Reuse and Versioning: Reuses an existing threat model only when its Repository and Version lines match the current target, otherwise regenerates it. - Independent Pass Mode: Generates fresh, isolated threat models for multi-pass deep security scans without touching the shared cache. - Use Case: During a deep security scan of a web application repository, invoke this Skill to produce a threat model identifying attacker-controlled inputs, authn/authz boundaries, and which vulnerability classes matter most before any findings are reported. ## Quick Start Ask the AI to generate a repository-scoped threat model for the current repository using the security threat-model skill.

Frequently Asked Questions about threat-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a threat model for a repository?

Invoke the threat-model skill during a security scan or ask for one explicitly. It inspects the repository, identifies trust boundaries and attacker-controlled inputs, and writes a structured Markdown threat model to the repository-scoped artifact path.

What sections does a generated threat model contain?

The output contains four sections: Overview; Threat Model, Trust Boundaries, and Assumptions; Attack Surface, Mitigations, and Attacker Stories; and Severity Calibration with Critical, High, Medium, and Low examples grounded in repository files.

Can I provide my own threat model instead of generating one?

Yes. A user-provided threat model or sufficiently specific AGENTS.md or SECURITY.md guidance is treated as authoritative. Its body is preserved unchanged and only the required Repository and Version cache footer is appended.

When is a cached threat model reused?

The cached model is reused only when its final Repository and Version lines match the current target's identity and revision or snapshot digest. Otherwise a fresh model is generated and persisted.

What is independent pass mode in threat modeling?

Independent pass mode generates a fresh threat model written only to a caller-specified path, never reading or updating the shared cache. Deep security scans use it to keep each discovery pass independent.

When should I not use the threat-model skill?

Do not use it as the primary trigger for full PR, commit, branch, patch, or repository scans. It runs within a scan's threat-modeling phase or when explicitly invoked, and it must not produce findings about the current diff.