threat-model

threat-model is a skill for Claude Code from evgenii-studitskikh/Claude-Code-SaaS-Studio. It costs 48 tokens per session (974 once invoked), scanned A, original, MIT.

A lightweight STRIDE security threat model for a multi-tenant SaaS application. STRIDE is a checklist of threats involving identity, tampering, denial of service, data disclosure, privilege changes, and denial of actions.

In plain words
What is it for?
Use it to analyse a Next.js and Supabase SaaS with authentication, tenant data, billing, secrets, Stripe webhooks, public routes, and administrative areas.
Why use it?
It surfaces valuable data, trust boundaries, and attack entry points before security code is written. The result can guide a later security audit.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; names the AskUserQuestion tool.

Good fit Use it to analyse a Next.js and Supabase SaaS with authentication, tenant data, billing, secrets, Stripe webhooks, public routes, and administrative areas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evgenii-studitskikh/claude-code-saas-studio/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.

Any agent
npx skills add evgenii-studitskikh/Claude-Code-SaaS-Studio --skill threat-model
Clone the repo
git clone --depth 1 https://github.com/evgenii-studitskikh/Claude-Code-SaaS-Studio

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model/github.svg)](https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model)
Your own site
<a href="https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model"><img src="https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model/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-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model"><img src="https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/threat-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 974 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.00048 $0.00974
Opus 5 $0.00024 $0.00487
Sonnet 5 $0.00010 $0.00195
Haiku 4.5 $0.00005 $0.00097

Measured 8d ago against content hash 1a34c175bcb7, 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.

.claude/skills/threat-model/SKILL.md · 29 lines

How it starts

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

Systematically surface what could go wrong before a line of security code is written. Working from the PRD and architecture doc, the skill enumerates valuable assets (user data, tenant data, billing records, secrets) and every surface where an attacker could interact with the system (public routes, the auth boundary, Stripe webhook endpoints, admin surfaces), then applies a STRIDE-lite analysis to name the most important threat and a concrete mitigation for each category in the context of a multi-tenant Next.js + Supabase + Stripe SaaS. The result is a structured threat model doc that the /security-audit skill can use to verify whether the mitigations are actually implemented. Non-autonomous: drafts are presented before writing; the user approves before the file is saved.

Phases

  1. Load context — read docs/specs/prd.md and docs/specs/architecture.md. If either file is missing, stop: direct the user to /write-prd or /design-architecture as appropriate before proceeding.
  2. Enumerate assets & entry points — identify and list: (a) data assets (per-tenant user records, tenant configuration, billing/subscription data, session tokens, service secrets); (b) entry points and trust boundaries (unauthenticated public routes, the authentication boundary and session layer, API route handlers and server actions, Stripe webhook endpoints, admin/internal surfaces, third-party OAuth callbacks). Present the list to the user for any additions or corrections before continuing.
  3. Threats (STRIDE-lite) — for each of the six categories, name the top threat in the context of this multi-tenant SaaS and state a specific mitigation. The examples below are guidance the agent adapts to the actual system; the agent must produce a real finding for every category:
    • Spoofing — e.g., session or OAuth token forgery. Example mitigations: verify the Supabase JWT server-side on every protected request; enforce short-lived sessions; add CSRF protection on all state-mutating routes.
    • Tampering — e.g., RLS bypass or unvalidated input reaching the database. Example mitigations: zod-validate all inputs at the boundary; never trust a client-supplied tenant id; derive authorization and tenant scope server-side.
    • Repudiation — e.g., a destructive tenant action (data delete, plan change) that leaves no trace. Example mitigations: append-only audit_events table capturing tenant_id, actor_id, action, and timestamp; ensure the table itself is not deletable by tenants.
    • Information disclosure — e.g., cross-tenant data leak via a missing tenant scope filter. Example mitigations: RLS on every table holding tenant data; explicit column selects instead of *; automated tests that verify cross-tenant isolation.
    • Denial of service — e.g., unauthenticated endpoint abuse or a webhook flood that starves the database. Example mitigations: rate-limit and paginate expensive or unauthenticated endpoints; verify the Stripe webhook signature before performing any work.
    • Elevation of privilege — e.g., insecure direct object reference or a missing membership check letting a user access another tenant's resources. Example mitigations: enforce server-side membership and role checks on every protected route; keep the Supabase service-role key server-only and never expose it to client code. Under full review, confirm each category's finding with the user; under lean, present all six and confirm once; under solo, write then summarize.
  4. Draft — fill .claude/templates/threat-model.md into docs/specs/threat-model.md with the assets list, entry-point/trust-boundary map, and the STRIDE-lite table. Present the draft and await explicit approval before writing the file.
  5. Next step — once the file is saved, point the user to /security-audit to verify that the stated mitigations are actually implemented in the codebase.

Read the full file on GitHub · 29 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 · 29 lines · 48 tokens per session scan A 1a34c175bcb7

Subscribe to this mod's changes

threat-model is a skill published in the GitHub repository evgenii-studitskikh/Claude-Code-SaaS-Studio (1 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 974 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-08-31.

Related

Other skills, from other repositories

create-modal

Create declarative modals using the modal library API. Covers modal types (confirm, input, select, form), sections (Text, Buttons, Input, Textarea, Checkbox, Select, List, Combo, When, Custom), rendering with OverlayModal, and keyboard/mouse handling. Use when adding modals or dialogs to the application.

marcus/sidecar · 71 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

openlore-brainstorm

Transform a feature idea into an annotated story using a Domain Sketch or Constrained Option Tree. Use when asked to brainstorm, explore, or shape a feature before implementation.

clay-good/OpenLore · 40 tokens

ap-juror

L4 terminal leaf - G7 SIGN-OFF. One independent sign-off panel seat that saw none of the intermediate work. Binary PASS/FAIL on opened evidence; default-FAIL. A FAIL naming a P0/P1 blocker is NOT arbitrable into PASS.

Spielewoy/autoprompt-skill · 58 tokens

gemigo-cli

Use when the user wants to publish an already-built static website or front-end app through GemiGo, such as a Vite/React/Vue static build, plain HTML/CSS/JS page, landing page, demo, docs site, or small browser app, and get a hosted public URL.

Peiiii/nextclaw · 65 tokens

agenticx-query-data-source

Use when the user asks about verifiable quantitative facts (stock prices, financial indicators, macro data, company registry, academic metrics, legal statutes) that must come from a live data source rather than training memory.

DemonDamon/AgenticX · 49 tokens