threat-model

threat-model is a command for Claude Code from CrashBytes/claude-role-skills. It costs 10 tokens per session (502 once invoked), scanned A, original, Apache-2.0.

A security analysis of a system, feature, or code path using STRIDE, a checklist of common attack types. It maps data flows, entry points, storage, outside services, and trust boundaries before reviewing threats.

In plain words
What is it for?
Use it to analyze an application or feature, trace authentication and authorization, review service integrations, and score identified threats with DREAD.
Why use it?
It exposes ways attackers might impersonate users, change data, leak information, take a service offline, or gain unauthorized access.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the role-based-skills plugin — 7 skills, 15 commands shipped together

Good fit Use it to analyze an application or feature, trace authentication and authorization, review service integrations, and score identified threats with DREAD.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/crashbytes/claude-role-skills/threat-model
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/CrashBytes/claude-role-skills

Made for: Claude Code.

Or install role-based-skills, the plugin that ships this one along with the rest of its 7 skills, 15 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threat-model

README.md
[![agentmods](https://agentmods.dev/badge/commands/crashbytes/claude-role-skills/threat-model.svg)](https://agentmods.dev/commands/crashbytes/claude-role-skills/threat-model)
Your own site
<a href="https://agentmods.dev/commands/crashbytes/claude-role-skills/threat-model"><img src="https://agentmods.dev/badge/commands/crashbytes/claude-role-skills/threat-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.00502
Opus 5 $0.00005 $0.00251
Sonnet 5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 8d ago against content hash 18a98468278e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

threat-model scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/threat-model.md · 58 lines

What it actually says

Threat Model

Run a STRIDE threat analysis on a system, feature, or code path.

Arguments

Target to analyze: $ARGUMENTS

Workflow

  1. Define the scope

    • If a file path is provided, read it and trace its data flows
    • If a system/feature name is provided, search the codebase for related files
    • Identify: entry points, data stores, external services, trust boundaries
  2. Map the data flow

    • Identify all data inputs and outputs
    • Trace authentication and authorization paths
    • Map external service integrations
    • Identify trust boundary crossings
  3. Apply STRIDE to each component

    For each component in the data flow, analyze:

    • Spoofing: Can an attacker impersonate a user or service?
    • Tampering: Can data be modified in transit or at rest?
    • Repudiation: Can actions be performed without audit trails?
    • Information Disclosure: Can sensitive data leak?
    • Denial of Service: Can the service be made unavailable?
    • Elevation of Privilege: Can an attacker gain unauthorized access?
  4. Score with DREAD For each identified threat:

    • Damage potential (1-10)
    • Reproducibility (1-10)
    • Exploitability (1-10)
    • Affected users (1-10)
    • Discoverability (1-10)
    • Overall = average of all five
  5. Generate remediation plan

    • Prioritize by DREAD score (Critical >7, High 5-7, Medium 3-5, Low <3)
    • Map each threat to OWASP Top 10 category where applicable
    • Provide specific code-level fix recommendations
    • Identify quick wins vs architectural changes
  6. Output

    • Threat matrix table (Component × STRIDE categories)
    • Top threats ranked by DREAD score
    • Remediation plan with priority and effort estimates
    • Residual risk summary
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 58 lines · 10 tokens per session scan A 18a98468278e

Subscribe to this mod's changes

threat-model is a command published in the GitHub repository CrashBytes/claude-role-skills (6 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 10 tokens to every session and 502 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.