threat-modeling
Skill1 starsChanged 6 months agoMITView on GitHub
Model threats before building - map assets, trust boundaries, and attack surfaces, walk STRIDE categories, and rank risks with concrete mitigations. Use when the user designs a new feature or system that handles sensitive data or auth, asks "how could this be abused", or wants a threat model or security design review before implementation.
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, performance-profiling 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
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
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
OpenAISkilltest-driven-development
Use when implementing any feature or bugfix, before writing implementation code
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 repository50 other files it gives its agents.
- accessibility-reviewSkill
- adr-authorSkill
- api-designSkill
- architecture-reviewSkill
- caching-strategySkill
- changelogSkill
- ci-cd-pipelineSkill
- codebase-explorationSkill
- code-reviewSkill
- code-style-guideSkill
- context-engineeringSkill
- conventional-commitsSkill
- cost-optimizationSkill
- database-migrationSkill
- data-privacy-reviewSkill
- debuggingSkill
- dependency-updateSkill
- deprecation-migrationSkill
- error-handlingSkill
- feature-flag-rolloutSkill
- filament-resource-designSkill
- flux-ui-patternsSkill
- git-workflowSkill
- i18n-reviewSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- inertia-patternsSkill
- laravel-ai-featuresSkill
- laravel-eloquent-performanceSkill
- laravel-queue-designSkill
- laravel-testingSkill
- livewire-component-designSkill
- llm-feature-designSkill
- observabilitySkill
- onboarding-docSkill
- performance-budgetSkill
- pr-descriptionSkill
- primevue-patternsSkill
- refactoringSkill
- release-checklistSkill
- resilience-patternsSkill
- runbook-authorSkill
- security-auditSkill
- spec-writingSkill
- task-breakdownSkill
- tech-debt-triageSkill
- test-writingSkill
- using-elyra-skillsSkill
- vue-component-patternsSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
1
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 22
Before spec-writing finalizes scope for a sensitive feature
- Distinctive: line 27
Trust boundaries are where it happens: Every place data crosses from less-trusted to more-trusted is a finding generator.
“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
Find the attacks on paper, before the code exists. A security-audit reviews what was built; a threat model shapes what gets built.
When to use
- Designing anything that touches auth, money, PII, file uploads, or external input
- "How could this be abused?" / "Is this design secure?"
- Adding a new integration, webhook, or API surface
- Before
spec-writingfinalizes scope for a sensitive feature
Principles
- Think like the attacker, list like an engineer. Creative in finding threats, systematic in recording them.
- Trust boundaries are where it happens. Every place data crosses from less-trusted to more-trusted is a finding generator.
- Rank ruthlessly. Ten mitigated critical threats beat a hundred documented trivial ones.
- Assume breach of the outer layer. "The WAF catches that" is not a mitigation; defense has depth or it doesn't.
Process
1. Scope and assets
- What are we protecting? (credentials, PII, money/credits, business data, availability, reputation)
- Who are the realistic attackers? (anonymous internet, authenticated user, malicious insider, compromised dependency)
2. Draw the data flow
Sketch components and the data moving between them (text diagram is fine):
[Browser] --creds--> [API] --query--> [DB]
|--webhook--> [3rd party]Mark every trust boundary: internet→app, app→db, app→third party, user→admin, tenant→tenant.
3. Walk STRIDE per boundary
| Category | Ask |
| Spoofing | Can someone pretend to be another user/service here? |
| Tampering | Can data be modified in transit or at rest? |
| Repudiation | Can an actor deny an action because we can't prove it? |
| Information disclosure | What leaks — errors, timing, IDs, logs, caches? |
| Denial of service | What's cheap for an attacker and expensive for us? |
| Elevation of privilege | Path from low-priv to high-priv? (IDOR, mass assignment, admin routes) |
Also walk the abuse cases: how would a legitimate user cheat? (free-tier laundering, scraping, referral fraud)
4. Rank
Score each threat simply: likelihood (L/M/H) × impact (L/M/H). Anything H×H or H×M gets a mitigation in the design; M×M gets a mitigation or an explicit accepted-risk note; the rest is documented.
5. Mitigate in the design
For each ranked threat, name the concrete control: authz check at X, signed URLs, rate limit per Y, idempotency keys, audit log of Z, input validation at the boundary. Each mitigation should be traceable into the spec/tasks.
6. Decide residual risk
What remains unmitigated, who accepted it, and what would trigger revisiting.
Output format
## Threat model: <feature/system>
**Assets:** …
**Attackers considered:** …
### Data flow & trust boundaries
<diagram>
### Threats
| # | Threat (STRIDE) | Boundary | L×I | Mitigation | Status |
|---|-----------------|----------|-----|------------|--------|
| 1 | … | … | H×M | … | in design / accepted |
### Accepted risks
- <risk>: accepted by <whom>, revisit when <trigger>
### Carry into spec
- [ ] <mitigation as requirement>Anti-patterns
- ❌ Threat modeling after the code is written (that's an audit, and rework is 10× pricier)
- ❌ Only modeling external attackers — insiders and compromised accounts are boundaries too
- ❌ "We use HTTPS" as the answer to everything
- ❌ A 60-row threat table with no ranking and no owner
- ❌ Mitigations that never become spec requirements or tasks — a model nobody builds from is theater
- ❌ Forgetting abuse cases: the attacker with valid credentials and creative incentives
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.

