threat-modeling

threat-modeling is a skill for Claude Code from sawrus/agent-guides. It costs 62 tokens per session (675 once invoked), scanned A, original, MIT.

A security-review skill that uses STRIDE, a framework for thinking through common threats, to examine system designs and APIs. It focuses on risks such as impersonation, data tampering, information leaks, and broken access control.

In plain words
What is it for?
Use it to identify assets and trust boundaries, assess API authorization problems such as IDOR, rank risks, and create threat matrices for security reviews.
Why use it?
It helps teams find security weaknesses before implementation or an audit, especially where users, services, and permissions cross trust boundaries.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to identify assets and trust boundaries, assess API authorization problems such as IDOR, rank risks, and create threat matrices for security reviews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/threat-modeling
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 sawrus/agent-guides --skill threat-modeling
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code.

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/sawrus/agent-guides/threat-modeling/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/threat-modeling)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/threat-modeling"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/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/sawrus/agent-guides/threat-modeling"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/threat-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 675 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00062 $0.00675
Opus 5 $0.00031 $0.00338
Sonnet 5 $0.00012 $0.00135
Haiku 4.5 $0.00006 $0.00068

Measured 7d ago against content hash 46a5b7c2bea9, 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 7d 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.

areas/software/security/skills/threat-modeling/SKILL.md · 63 lines

How it starts

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

Skill: Threat Modeling

Expertise: STRIDE framework, IDOR prevention, authorization boundary analysis, threat matrices for API and system security reviews.

When to load

When designing a new system, adding an integration, reviewing an architecture, or preparing for a security review.

STRIDE Framework

Threat Question Example
Spoofing Can an attacker impersonate a user/service? Forged JWT, SSRF to metadata service
Tampering Can data be modified in transit/at rest? SQL injection, cache poisoning
Repudiation Can users deny performing an action? Missing audit logs
Information Disclosure Can sensitive data be exposed? Error messages leaking stack traces
Denial of Service Can the service be made unavailable? No rate limiting on public endpoints
Elevation of Privilege Can a low-privilege user gain higher access? IDOR, broken object-level authorization

Threat Modeling Workflow

  1. Identify assets — list sensitive data, APIs, and trust boundaries in the system
  2. Apply STRIDE — walk through each threat category against every asset and boundary
  3. Score risks — rank by likelihood × impact (Critical / High / Medium / Low)
  4. Prioritize mitigations — address Critical/High first; document accepted risks for Medium/Low
  5. Validate — verify mitigations with code review, SAST/DAST scans, or penetration testing

IDOR — Most Common API Vulnerability

# ❌ Vulnerable
@app.get("/invoices/{invoice_id}")
def get_invoice(invoice_id: int, current_user: User = Depends(get_current_user)):
    return db.query(Invoice).filter(Invoice.id == invoice_id).first()

# ✅ Safe: always scope to authenticated user
@app.get("/invoices/{invoice_id}")
def get_invoice(invoice_id: int, current_user: User = Depends(get_current_user)):
    invoice = db.query(Invoice).filter(
        Invoice.id == invoice_id,
        Invoice.owner_id == current_user.id  # ← ownership check
    ).first()
    if not invoice:
        raise HTTPException(status_code=404)  # 404, not 403
    return invoice

Read the full file on GitHub · 63 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. 7d ago First seen · 63 lines · 62 tokens per session scan A 46a5b7c2bea9

Subscribe to this mod's changes

threat-modeling is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 10d ago), licensed MIT. It adds 62 tokens to every session and 675 once invoked, about $0.0003 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.