threat-modeling
Skill22 starsChanged 5 months agoMITView on GitHub
Decide what a design must be true before code exists: naming assets and actors, locating trust boundaries, producing a written (asset, boundary, threat, control, owner) list, recording the assumptions the design rests on, and knowing when a change invalidates the model. Use when scaffolding a new feature, service, or endpoint, writing or reviewing a design doc, RFC, or ADR, or introducing a new trust boundary, integration, or data flow.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- robisson/build-like-amazon-agent-skillstheir own version, first seen Sep 23, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- timwukp/agent-skills-best-practicetheir own version, first seen Sep 16, 2026
- millerlai/threat-modeling-mastertheir own version, first seen Sep 15, 2026
Used with
Projects with it also use performance-profiling, dependency-audit and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
conorluddySkillperformance-profiling
Instruments integration and performance analysis workflows for iOS apps. Use when profiling CPU usage, memory allocation, network activity, or energy consumption. Covers Time Profiler, Allocations, Leaks, Network instruments, and performance optimization strategies.
Also in 3 projects that use this
fefogarciaSkilldependency-audit
Comprehensive dependency health auditing for JavaScript/TypeScript projects. Run npm audit, detect outdated packages, check for security advisories, and verify license compliance. Prioritises vulnerabilities by severity and provides actionable fix recommendations.
Also in 4 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 5 projects that use this
SentrySkillarchitecture-review
Staff-level codebase health review. Finds monolithic modules, silent failures, type safety gaps, test coverage holes, and LLM-friendliness issues.
Also in 4 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 5 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- briiirussell/cybersecurity-skills★ 410same name
- proflead/codex-skills-library★ 153same name
- hardw00t/ai-security-arsenal★ 104same name
- UnitOneAI/SecuritySkills★ 78same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mn-youssef/security-skills★ 47same name
- kumaran-is/claude-code-onboarding★ 36same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- ShulkwiSEC/bb-huge★ 22same name
- awarexone/AXguard★ 18same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dist/AGENTS.mdAGENTS.md
- dist/CLAUDE.mdCLAUDE.md
- dist/copilot-instructions.mdCopilot instructions
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- api-securitySkill
- auth-securitySkill
- cicd-securitySkill
- container-securitySkill
- cors-securitySkill
- crypto-misuseSkill
- database-securitySkill
- deserialization-securitySkill
- dynamic-verificationSkill
- electron-securitySkill
- error-handling-securitySkill
- file-upload-securitySkill
- frontend-securitySkill
- graphql-securitySkill
- iac-securitySkill
- iam-best-practicesSkill
- llm-app-securitySkill
- logging-securitySkill
- ml-securitySkill
- mobile-securitySkill
- protocol-securitySkill
- saas-securitySkill
- secret-detectionSkill
- secure-code-reviewSkill
- security-regression-testsSkill
- serverless-securitySkill
- ssrf-preventionSkill
- supply-chain-securitySkill
- template-injectionSkill
- websocket-securitySkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Every later row references one of each, which is what makes the list finite.
- Distinctive: line 48
Write down the assumptions the design depends on: this gateway is the only ingress, this queue's producers are authenticated, this field is …
- Distinctive: line 60
Put each control at the component that owns the asset, behind any gateway rather than instead of it.
- Distinctive: line 76
Treat anything the client controls as a control — hidden fields, disabled buttons, client-side role checks, an unverified token, a price in …
- Distinctive: line 78
All of it is advisory. This is the design-level statement of a rule several code skills enforce, and it belongs here because it is usually …
- Distinctive: line 90
Add an external integration, dependency, or webhook without deciding three things in writing: who may call it, what it is trusted to …
- Distinctive: line 94
Leave a sensitive datum with no sanctioned home.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Threat Modeling
Rules (for AI agents)
ALWAYS
- Produce a written list, not an impression. One row per finding, in the design
doc, the RFC, or the PR description:
(asset, boundary, threat, control, owner)— what is worth taking, where it crosses, what could go wrong there, what stops it, and which component enforces it. A model that exists only in the reasoning that produced the code cannot be reviewed, disagreed with, or checked later. - Name the assets and the actors first: data, funds, credentials, keys and compute on one side; users, tenants, services, admins and the attacker on the other. Every later row references one of each, which is what makes the list finite.
- Locate the trust boundaries — internet to application, tenant to shared store, service to service, user input to an interpreter, model output to anything that acts on it. A boundary is where data arrives from a party you do not control, and it is the unit the rest of the model is organised around.
- At each boundary, ask the six STRIDE questions and write down only the answers that matter: can the caller be spoofed (is there authentication), can the data be tampered with in flight, will there be a record if someone repudiates the action, what is disclosed if this crossing leaks, what happens under denial of service, and does anything here allow elevation of privilege. A category with no answer is not a gap; a category nobody asked about is.
- Write down the assumptions the design depends on: this gateway is the only ingress, this queue's producers are authenticated, this field is already validated upstream, this CDN strips that header. Assumptions are the part of a threat model that later becomes false without anyone noticing, and an unwritten one cannot be rechecked.
- Rank the rows and say which ones block the design. A model that treats every threat as equally urgent gets implemented in whatever order the work happens to arrive, which means the ranking gets made anyway, by accident.
- Design controls to fail closed: on error, missing configuration, a timeout, or an unhandled case, the secure outcome is denial. This is a design property because the alternative is usually invisible in the code — an exception that skips a check reads exactly like an exception that skips a log line.
- Put each control at the component that owns the asset, behind any gateway rather than instead of it. The owning service authenticates and authorizes even when a perimeter also does, because perimeters get bypassed, reconfigured, and eventually routed around by the next service that needs direct access.
- Re-run the model when its inputs change — a new actor, a new boundary, a new data flow for an existing asset, a component moving between trust zones, or an assumption you wrote down turning out to be false. A model is a statement about a design, so it expires when the design moves.
- Route each control to the skill that owns it, and record that in the row's
owner.auth-securityowns who the caller is and what they may touch,api-securitythe endpoint's own controls,database-securityhow tenant isolation is actually enforced,iam-best-practicesthe privileges a workload runs with, andllm-app-securitywhat a model's output is allowed to reach. This skill decides which controls the design requires; those skills say what the control is.
NEVER
- Treat anything the client controls as a control — hidden fields, disabled buttons, client-side role checks, an unverified token, a price in the request body. All of it is advisory. This is the design-level statement of a rule several code skills enforce, and it belongs here because it is usually decided before any code is written.
- Design a component that is trusted because of where it sits. "Internal service",
private subnet, VPN, IP allowlist: those describe reachability, and reachability is
not authentication.
api-securityowns the endpoint-level rule; the design-level version is that a trust boundary drawn around a network segment has no enforcement behind it. - Invent a bespoke authentication, session, or access-control primitive when a vetted
one exists. Design in the standard building block — OIDC for identity, mTLS or
SPIFFE for workload identity, a policy engine for authorization decisions.
crypto-misuseowns the equivalent rule for cryptographic primitives. - Add an external integration, dependency, or webhook without deciding three things in writing: who may call it, what it is trusted to assert, and what happens when the counterparty is compromised or impersonated. The third is the one that gets skipped, and it is the one that determines blast radius.
- Leave a sensitive datum with no sanctioned home. For each one, name where it lives and, by implication, where it must not appear — logs, error payloads, client bundles, URL parameters, analytics. An undecided lifecycle is how a credential ends up in four places, none of them chosen.
- Ship a design whose security analysis is "we will add auth later". Retrofitting a trust boundary onto a built feature means changing the data model, and that is the point at which it does not happen.
KNOWN FALSE POSITIVES
- A genuinely public, read-only surface — marketing site, public docs, a public catalog — legitimately has no authentication. The model's job is to confirm it holds nothing sensitive and grants nothing, not to add auth to it.
- Network controls layered on top of service-level authentication are good design. The finding is network position as the sole control, never its presence.
- mTLS or SPIFFE workload identity is authentication — a cryptographic caller identity, not a network location — so a service-to-service call over it is not relying on network position.
- A design that reuses an existing, documented boundary without changing it inherits that boundary's model. The trigger is a new or moved boundary; a fifth endpoint behind the same authenticated, tenant-scoped surface as the other four is not a new model.
Context (for humans)
The output is the point. Threat modeling done as a discussion produces agreement that evaporates; done as a written list it produces something an implementer can work against and a reviewer can disagree with. That is why the first rule is about the artifact rather than about the analysis — the analysis is worthless if it does not land anywhere.
For AI-assisted development the failure mode is specific and worth naming: models produce clean, working, well-tested code that implements an insecure design. Tenant data commingled in one table behind an application-enforced filter. Authorization checked at a gateway that the service also exposes directly. A credential whose lifecycle nobody decided. None of these is a bad line of code, so nothing that reads lines will find them — they are only visible at the altitude where someone asks what the system is supposed to guarantee.
The assumptions register is the part most often skipped and the part that ages worst. Designs are usually secure given something: that a gateway is the only way in, that a producer is authenticated, that a field was validated upstream. Those statements are true when written and silently become false — a second ingress is added, a queue gets a new producer — and nobody rechecks a claim that was never written down.
References
references/design-level-failures.md— worked examples of designs that scanners cannot flag, a filled-in(asset, boundary, threat, control, owner)list for one realistic feature, and the division of labour with the code-level skills- OWASP Threat Modeling Cheat Sheet.
- Microsoft STRIDE threat model.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

