threat-modeling

threat-modeling is a skill for Claude Code, Codex from OKHP3/skillz. It costs 99 tokens per session (1,164 once invoked), scanned A, original, MIT.

A method for finding security problems in a system’s design before the system is built. STRIDE is a checklist covering threats such as pretending to be someone else, changing data, and exposing information.

In plain words
What is it for?
It is for mapping components and data flows, identifying attackers and what they want, analysing threats, and choosing practical defences for systems handling sensitive data, money, or authentication.
Why use it?
It catches missing defences and risky trust boundaries before they become expensive code changes. The result is a short set of security decisions rather than an unused risk list.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for mapping components and data flows, identifying attackers and what they want, analysing threats, and choosing practical defences for systems handling sensitive data, money, or authentication.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/threat-modeling
View source ↗ OKHP3/skillz
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.

Any agent
npx skills add OKHP3/skillz --skill threat-modeling
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

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-modeling

README.md
[![agentmods](https://agentmods.dev/badge/skills/okhp3/skillz/threat-modeling/github.svg)](https://agentmods.dev/skills/okhp3/skillz/threat-modeling)
Your own site
<a href="https://agentmods.dev/skills/okhp3/skillz/threat-modeling"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/threat-modeling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threat-modeling

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/threat-modeling"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/threat-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,164 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.00099 $0.01164
Opus 5 $0.00049 $0.00582
Sonnet 5 $0.00020 $0.00233
Haiku 4.5 $0.00010 $0.00116

Measured 6d ago against content hash c5055b21e564, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

threat-modeling 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 6d 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.

community/threat-modeling/SKILL.md · 112 lines

How it starts

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

Threat modeling

Threat modeling asks what could go wrong here while the answer is still cheap to act on. Code review finds the bug you wrote; threat modeling finds the defence you never designed.

Four questions structure the whole exercise:

  1. What are we building?
  2. What can go wrong?
  3. What are we going to do about it?
  4. Did we do a good enough job?

The output is a short list of decisions, not a risk register nobody reads.

1. Draw the system and mark the trust boundaries

You cannot reason about attacks without knowing where untrusted things meet trusted things.

Sketch: the components, the data flows between them, the datastores, and — most importantly — the trust boundaries those flows cross. A boundary is anywhere the level of trust changes: internet to your edge, your service to a third party, one tenant's data to another's, user to admin.

Keep it to one diagram someone can hold in their head. See diagramming.

Done when: every trust boundary in the design is marked.

2. Name the attackers and what they want

Generic "hackers" produces generic mitigations. Be specific about who and why:

  • An anonymous internet user: the largest population, lowest capability
  • A legitimate user acting maliciously: has valid credentials. Most under-modelled, and the source of most real access-control failures
  • A compromised account: a real user whose credentials were stolen
  • A malicious or compromised insider: has infrastructure access
  • A compromised dependency: code you did not write, running with your privileges

For each, what would they want here? Data, money, disruption, access to something else? An attacker with no motive for your system is not worth designing against.

Done when: each attacker has a stated capability and objective.

3. Walk each element with a prompt list

Systematic beats creative. Use STRIDE against each component and flow:

Threat Ask
S Spoofing Can someone pretend to be another user or service?
T Tampering Can data be modified in transit or at rest?
R Repudiation Could someone deny an action, and could you prove otherwise?
I Information disclosure Can data leak to someone who should not see it?
D Denial of service Can someone make it unavailable, cheaply?
E Elevation of privilege Can someone gain rights they should not have?

Read the full file on GitHub · 112 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. 6d ago First seen · 112 lines · 99 tokens per session scan A c5055b21e564

Subscribe to this mod's changes

threat-modeling is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 99 tokens to every session and 1,164 once invoked, about $0.0005 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-09-03.