threat-modeling
Skill4 starsChanged 4 months agoMITView on GitHub
Works out what could go wrong in a system's design before it is built — who would attack it, how, and which defences are worth having. Use this whenever the user is designing a system that handles sensitive data, money, or authentication, asks what the security risks are, mentions threat modeling or STRIDE, or is starting a feature with a meaningful attack surface. This is design-time and systematic; for finding vulnerabilities in code that exists, use security-analysis.
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 supply-chain-security, architecture-review and 3 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.
MicrosoftSkillsupply-chain-security
Activate when reviewing or modifying dependency resolution, lockfile schema, package downloaders, signature/integrity checks, file integration cleanup, or anything that could expose APM to dependency confusion, typosquatting, malicious packages, or token leakage.
Also in 3 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
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
Microsoft AzureSkillskill-authoring
Write Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices". DO NOT USE FOR: general documentation. INVOKES: vally CLI.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
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
- ShieldNet-360/secure-vibe★ 22same name
- ShulkwiSEC/bb-huge★ 22same 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 repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-designSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- data-modelingSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- deployment-strategiesSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- browser-testingSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-analysisSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Keep it to one diagram someone can hold in their head.
- Distinctive: line 32
Done when: every trust boundary in the design is marked.
- Distinctive: line 66
Done when: every element has been walked against all six.
“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
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:
- What are we building?
- What can go wrong?
- What are we going to do about it?
- 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? |
The prompt list matters because it surfaces the categories you do not naturally think about — repudiation and DoS are consistently the ones teams skip.
Done when: every element has been walked against all six.
4. Prioritise by reachability and impact
You cannot mitigate everything. Rank by:
- Who can reach it: anonymous internet > authenticated user > admin > physical access
- What it gets them: full compromise > other users' data > their own data > information
- How hard: a single request > a chained multi-step attack > requires an insider
Then decide, explicitly, for each: mitigate, accept, transfer, or eliminate. Accepting a risk is a legitimate decision when written down with a reason. Silently not addressing it is not the same thing, and the difference matters at the review afterwards.
Done when: each threat has a named decision, including the accepted ones.
5. Prefer structural mitigations
Rank the fixes by how hard they are to get wrong later:
- Eliminate — do not store the data, do not build the feature. Nothing beats not having it
- Structural — a permission boundary, a separate credential, a network segment. Holds even when someone writes a bug
- Code-level — validation, encoding, authorization checks. Effective and easy to omit on a new path
- Detective — logging, alerting. Does not prevent, but bounds the damage
A control that depends on every future developer remembering it will eventually fail. Push protections down to where the platform enforces them.
Done when: the important threats have structural, not procedural, mitigations.
6. Write it down briefly, and revisit it
A page or two: the diagram, the boundaries, the ranked threats, the decisions.
Revisit when the design changes materially — a new integration, a new data type, a new user role. A threat model from before the third-party integration does not cover it.
Done when: the document is short enough that it will be read again.
Report
Give the diagram, the top threats with their decisions, and — separately — the accepted risks with their reasoning. That accepted list is the most valuable output: it is the record of what you knowingly chose, which is what distinguishes a considered design from an oversight.
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.

