threat-model

threat-model is a skill for Claude Code, Codex from fmind/dot. It costs 46 tokens per session (1,009 once invoked), scanned A, original, MIT.

A structured security-planning method that maps assets, attackers, entry points, data flows, trust boundaries, abuse cases, and protections.

In plain words
What is it for?
Use it when designing or changing authentication, APIs, integrations, AI agents, sensitive-data systems, or publicly exposed services.
Why use it?
It exposes realistic ways a system could be misused that automated scanners may not detect, especially around users, permissions, sensitive data, and external services.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fmind/dot/threat-model
Any agent
npx skills add fmind/dot --skill threat-model
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/threat-model.svg)](https://agentmods.dev/skills/fmind/dot/threat-model)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/threat-model"><img src="https://agentmods.dev/badge/skills/fmind/dot/threat-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.01009
Opus 5 $0.00023 $0.00504
Sonnet 5 $0.00009 $0.00202
Haiku 4.5 $0.00005 $0.00101

Measured yesterday against content hash 1670b29428d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

skills/threat-model/SKILL.md · 42 lines

How it starts

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

Threat Model

Identify the few plausible abuse paths that should change the design, plan, or verification strategy; secure runs the scanners and incident-response handles a live breach.

Workflow

  1. Scope the model: Name the system, environment, change, users, out-of-scope components, and the decisions this model must inform.
  2. Inventory assets: Credentials, identities, permissions, personal or proprietary data, money, availability, integrity, model context, audit evidence, and deployment authority.
  3. Map actors and entry points: Normal users, administrators, service accounts, maintainers, dependencies, insiders, compromised clients, automated agents, and external providers.
  4. Draw data and control flows: Trace creation, validation, authorization, storage, transformation, retrieval, logging, deletion, and external transfer; mark every trust, tenant, process, network, provider, and human-approval boundary.
  5. State invariants: Define what must always hold, such as tenant isolation, origin authentication, least privilege, idempotency, approval before mutation, or secrets never reaching logs.
  6. Generate abuse cases: At each boundary walk STRIDE (spoofing, tampering, repudiation, disclosure, denial of service, elevation) plus resource or spend exhaustion, context poisoning, and insecure defaults.
  7. Trace concrete paths: Connect attacker capability → entry point → missing or failed control → asset impact; discard category-only concerns with no plausible path.
  8. Assess controls: Record prevention, detection, response, and recovery controls and how each is verified; challenge silent failures, magic values, over-flexible algorithms, stringly typed permissions, and dangerous zero values.
  9. Rank risk: Weigh impact, exploitability, exposure, detectability, confidence, and reversibility; promote high-impact unknowns to verification tasks, not confirmed vulnerabilities.
  10. Feed delivery: Add required controls, tests, telemetry, rollout gates, incident actions, and residual-risk owners to the spec or implementation plan.
  11. Report: Scope and architecture summary; assets, actors, entry points, and trust boundaries; a data-flow or sequence diagram when it clarifies; security invariants; ranked abuse cases with concrete paths; existing and required controls; verification plan; residual risks, assumptions, and owner decisions.

Read the full file on GitHub · 42 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. yesterday First seen · 42 lines · 46 tokens per session scan A 1670b29428d6

Subscribe to this mod's changes

threat-model is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,009 once invoked, about $0.0002 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.