threat

threat is a command for Claude Code from studioKjm/ai-harness-template. It costs 22 tokens per session (1,516 once invoked), scanned A, original, MIT.

A set of commands for STRIDE threat modeling, a design-time method for finding security risks such as impersonation, data changes, and information leaks.

In plain words
What is it for?
Use it to create, review, approve, apply, list, and link threat models to project work. It can also scan for sensitive paths that lack a threat model.
Why use it?
It helps identify security problems before code is written, especially when a change involves sensitive data, public endpoints, or trust boundaries.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .harness/methodologies/threat-model-lite/scripts/tm.py \.

Part of the harness plugin — 44 commands, 11 agents shipped together

Good fit Use it to create, review, approve, apply, list, and link threat models to project work. It can also scan for sensitive paths that lack a threat model.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template
agentmods
npx agentmods add commands/studiokjm/ai-harness-template/threat

Made for: Claude Code.

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/threat.svg)](https://agentmods.dev/commands/studiokjm/ai-harness-template/threat)
Your own site
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/threat"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/threat.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,516 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.00022 $0.01516
Opus 5 $0.00011 $0.00758
Sonnet 5 $0.00004 $0.00303
Haiku 4.5 $0.00002 $0.00152

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

Security

Grade A, and why

threat 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.

methodologies/threat-model-lite/commands/threat.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/threat — STRIDE Threat Modeling

Assume the attacker has read your spec. Threat-model BEFORE you code, not after.

When to use

  • Story/feature touches sensitive entity (auth, payment, PII, admin)
  • New endpoint added (especially webhooks, public APIs)
  • Architecture change affects trust boundaries
  • Compliance requirement (PCI-DSS, GDPR, internal security policy)

Usage

/threat new <slug> --target-kind story|spike|feature|endpoint|module --target-ref REF
/threat list [--status draft|reviewed|approved|applied]
/threat show <model-id>
/threat add <model-id> --category S|T|R|I|D|E --threat "..." --mitigation "..." [...]
/threat review <model-id>          # draft → reviewed (validates STRIDE coverage)
/threat approve <model-id>         # reviewed → approved
/threat apply <model-id>           # approved → applied
/threat link <model-id> --to story-id|spike-id|adr-id
/threat scan [--path GLOB]         # find sensitive paths without threat model

STRIDE — what each letter means

Letter Category Example threats
S Spoofing Impersonation, credential stuffing, session hijack
T Tampering Data modification in transit/storage, parameter tampering
R Repudiation User denies action, missing audit log, untrusted timestamps
I Information Disclosure Data leak, verbose errors, side-channel, IDOR
D Denial of Service Flood, resource exhaustion, algorithmic complexity
E Elevation of Privilege Privilege escalation, IDOR with admin actions, path traversal

State machine

[draft] → [reviewed] → [approved] → [applied]
            ↓             ↓
         [draft]      [reviewed]    (rollback allowed)
State Meaning Move when
draft Analysis in progress All STRIDE categories addressed
reviewed STRIDE coverage validated Stakeholder approval
approved Ready to implement Mitigations shipped
applied Mitigations live (terminal)

Read the full file on GitHub · 152 lines

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 · 152 lines · 22 tokens per session scan A 3c771685dac8

Subscribe to this mod's changes

threat is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 1,516 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-30.