threat-modeling
Skill11 starsChanged 3 months agoApache-2.0View on GitHub
Systematic threat modeling skill for applications, APIs, and systems using STRIDE, PASTA, Attack Trees, DREAD, LINDDUN, and OCTAVE. Use when assessing security architecture, creating data flow diagrams (Mermaid), enumerating threats from OpenAPI specs or architecture docs, building attack trees, mapping threats to NIST/CIS/OWASP ASVS controls, or producing a threat model report. Triggers on requests to threat model, analyze attack surface, create a DFD, apply STRIDE, or design security mitigations.
- Installs packages
45 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
- bepaldes/heimdall-agenttheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- SWEStash/swe-workflow-skillstheir own version, first seen Nov 8, 2026
- nledford/engineering-review-boardtheir own version, first seen Nov 3, 2026
Used with
Projects with it also use prompt-injection, threat-hunting 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.
wgpsecSkillprompt-injection
AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回)时使用。覆盖间接注入、工具链劫持、RAG 投毒、数据外泄等技术。OWASP LLM Top 10 #1 漏洞类别
Also in 4 projects that use this
allanninalSkillthreat-hunting
Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.
Also in 3 projects that use this
narlyseorgSkillsecure-code-review
Use when reviewing source code for security vulnerabilities, performing static analysis of a codebase, auditing code for injection flaws, authentication issues, cryptographic weaknesses, insecure deserialization, SSRF, path traversal, memory safety bugs, hardcoded secrets, or misconfigurations. Use when the user asks to find security bugs in code, assess code quality from a security perspective, or review pull requests for security implications. Use when performing dependency audits, secrets scanning, or configuration review of application source.
Also in 3 projects that use this
jefflesterSkillapi-security
API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.
Also in 3 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 5 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 7 projects that use this
Other versions45 projects use a version of this.
Word for word · 1
- EvilFreelancer/secas★ 11100% same
Edited · 1
- hardw00t/ai-security-arsenal★ 10199% same
Wrote their own version · 43
- briiirussell/cybersecurity-skills★ 489same name
- fr33d3m0n/skill-threat-modeling★ 347same name
- proflead/codex-skills-library★ 153same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mn-youssef/security-skills★ 47same name
- kumaran-is/claude-code-onboarding★ 35same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- ulises-jeremias/agent-toolkit★ 19same name
- Indium-AI-Labs/indium-agentkit★ 18same name
- awarexone/AXguard★ 17same name
33 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.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyzing-binariesSkill
- analyzing-malwareSkill
- analyzing-memory-imagesSkill
- analyzing-network-trafficSkill
- analyzing-phishing-emailsSkill
- attacking-active-directorySkill
- attacking-wireless-networksSkill
- auditing-code-for-vulnerabilitiesSkill
- auditing-mcp-serversSkill
- auditing-supply-chainSkill
- container-securitySkill
- cracking-passwordsSkill
- engineering-detectionsSkill
- enumerating-network-servicesSkill
- escalating-linux-privilegesSkill
- escalating-windows-privilegesSkill
- establishing-persistenceSkill
- exploiting-cloud-platformsSkill
- hardening-cloud-postureSkill
- hunting-threatsSkill
- hunting-web-backdoorsSkill
- iac-securitySkill
- investigating-aws-incidentsSkill
- investigating-azure-incidentsSkill
- investigating-gcp-incidentsSkill
- investigating-m365-entraSkill
- investigating-windows-endpointsSkill
- maintaining-engagement-stateSkill
- managing-vulnerabilitiesSkill
- mapping-attack-techniquesSkill
- orchestrating-vulnerability-researchSkill
- performing-reconnaissanceSkill
- performing-social-engineeringSkill
- producing-threat-intelligenceSkill
- recognizing-deceptionSkill
- reporting-security-findingsSkill
- responding-to-incidentsSkill
- reviewing-cryptographySkill
- securing-ai-systemsSkill
- testing-apisSkill
- testing-ics-ot-protocolsSkill
- testing-mobile-applicationsSkill
- testing-web-applicationsSkill
- transferring-filesSkill
- triaging-security-alertsSkill
- vetting-agent-extensionsSkill
- writing-sigma-rulesSkill
- writing-yara-rulesSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 39 edited versions we read keep these.
4
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
- Distinctive: line 34
Compliance gap analysis: only (no threat enumeration) → use a compliance skill.
- Distinctive: line 93
Always define a merger agent that deduplicates findings (same threat surfaced by multiple sub-agents) and reconciles inconsistent risk …
- Distinctive: line 117
Diagrams in → Mermaid out: when given an architecture-diagram image, re-emit as Mermaid before analysis (catches ambiguity.
- Distinctive: line 118
DFDs out → Mermaid: default rendering format. Inline-renders in most chat surfaces.
- Very specific: line 125
All threats conform to schemas/finding.json.
“Common” is measured: kept by at least 6 in 10 of the 39 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
Adversarial design-time analysis: enumerate threats against a system and specify mitigations. This skill routes to methodology files, workflow runbooks, example libraries, and control-catalog references. Extended adversarial reasoning is the core value — spend thinking budget on threat enumeration.
When to Use
- New system or major architecture change needs security review.
- An OpenAPI / AsyncAPI spec exists and you want automatic STRIDE-per-interaction.
- Architecture docs or diagrams need threat analysis.
- A specific high-impact threat requires attack-tree deep dive.
- Privacy / personal-data handling needs threat analysis (LINDDUN).
- Mitigations need mapping to NIST CSF / NIST 800-53 / CIS / OWASP ASVS.
- Producing a threat model report for stakeholders / auditors.
- Prioritizing existing threat lists by risk score.
Trigger Phrases
- "threat model this application / service / API"
- "identify threats using STRIDE / PASTA / LINDDUN"
- "create a data flow diagram / DFD"
- "analyze the attack surface"
- "build an attack tree for X"
- "map these threats to NIST / ASVS / CIS controls"
When NOT to Use This Skill
- Runtime API testing / exploitation of a live endpoint → use
testing-apis(this skill identifies threats;testing-apisconfirms exploitability). - Code-level vulnerability discovery in a repo (SAST/DAST/SCA) → use
auditing-code-for-vulnerabilities. - Container image CVE scanning → use
container-security. - Cloud posture misconfigurations → use
iac-security/ cloud-security skill. - Incident response on an active intrusion → this is design-time; use IR playbooks instead.
- Compliance gap analysis only (no threat enumeration) → use a compliance skill; thread results back here for design changes.
Decision Tree
1. Have an OpenAPI / AsyncAPI spec?
→ workflows/stride_from_openapi.md (highest-leverage entry point)
2. Have architecture docs or diagrams (or diagram images)?
→ workflows/stride_from_arch_docs.md
(if diagrams only, first workflows/dfd_creation.md)
3. Need a DFD from scratch?
→ workflows/dfd_creation.md (emit Mermaid)
4. Already have a high-level threat; need deep path analysis?
→ workflows/attack_tree_from_threat.md
5. Have threats; need mitigations + catalog mappings?
→ workflows/threat_to_mitigation.md
6. Privacy-specific modeling?
→ methodology/linddun.md
7. Enterprise-wide risk?
→ methodology/octave.md
8. Unsure which methodology?
→ references/framework_comparison.mdParallelism Hints
Parallelizable:
- STRIDE-per-element: one sub-agent per element across an entire DFD.
- STRIDE-per-category: one sub-agent per STRIDE letter (S, T, R, I, D, E) across the whole system.
- Attack-tree sub-branches: each first-level OR branch is independent.
- Trust-boundary deep dives: one sub-agent per boundary.
- OpenAPI operation analysis: batch operations across sub-agents (e.g., by tag).
- Control-catalog mapping: per finding.
Sequential (do not parallelize):
- DFD construction → threat enumeration (you need the DFD first).
- Threat enumeration → prioritization (need the full list to rank).
- Mitigation design → residual-risk assessment.
- Top-threat selection → attack-tree construction.
Sub-Agent Delegation
Recommended patterns:
| Pattern | Sub-agents | When |
| Per STRIDE category | 6 (S, T, R, I, D, E) | Comprehensive enumeration on a whole system — each sub-agent focuses adversarial reasoning on one category across all elements. |
| Per trust boundary | 1 per boundary | Deep dive on multi-zone systems; each sub-agent owns cross-boundary threats for their boundary. |
| Per subsystem | 1 per service / component | Microservice architectures — each sub-agent threat-models its service, then a merge step deduplicates. |
| Per attack-tree branch | 1 per first-level OR child | Parallel tree expansion. |
| Per OpenAPI tag group | 1 per tag | Large specs — shard operations by tag. |
Always define a merger agent that deduplicates findings (same threat surfaced by multiple sub-agents) and reconciles inconsistent risk scores.
Reasoning Budget
Extended thinking is the whole point of this skill. Threat identification is an adversarial creativity task — models consistently miss threats when run without extended thinking.
Extended thinking ON for:
- Initial threat enumeration (per-element and per-interaction)
- Trust-boundary crossing analysis
- Attack-tree branch generation (step 2 of
workflows/attack_tree_from_threat.md) - Leaf annotation — accurate probability/cost estimation
- Finding novel abuse cases the documentation doesn't mention
- Deciding when the architecture is ambiguous vs attestable
Extended thinking OFF for:
- Formatting findings into
schemas/finding.json - Emitting Mermaid from a known DFD structure
- Looking up control IDs (
references/control_catalogs.mdis deterministic) - Report assembly from template
Budget guidance: allocate ~70% of extended-thinking tokens to enumeration, ~20% to attack-tree depth, ~10% to prioritization / control-gap analysis.
Multimodal Hooks
- Diagrams in → Mermaid out: when given an architecture-diagram image, re-emit as Mermaid before analysis (catches ambiguity; produces re-usable artefact).
- DFDs out → Mermaid: default rendering format. Inline-renders in most chat surfaces.
- Complex diagrams (deployment views, many components): use PlantUML (
@startuml) or Graphviz DOT. - Attack trees: Graphviz or Mermaid
flowchart TD. - Template gallery: see
examples/mermaid_dfd_templates.mdfor ready-to-adapt diagrams.
Structured Output
All threats conform to schemas/finding.json. Key fields:
threat_id,title,descriptionstride_category(array of six enum values)element(name, type, technology)trust_boundaryattack_vector,attacker_profilelikelihood,impact,risk_scoredread_score(object with D/R/E/A/D + average)cwe,capec,mitre_attackmitigations(array with control/type/status)control_mappings(array mapping to NIST/CIS/ASVS/ISO/PCI)residual_risk,status
Emit as JSONL for bulk findings; emit in the report template for human review.
Workflow Index
| Workflow | Purpose |
| workflows/dfd_creation.md | Build Level-0/Level-1 DFD as Mermaid; identify trust boundaries. |
| workflows/stride_from_openapi.md | Key workflow. OpenAPI/AsyncAPI spec → STRIDE-per-interaction table. |
| workflows/stride_from_arch_docs.md | Architecture docs (+ optional diagram images) → full threat model. |
| workflows/attack_tree_from_threat.md | High-level threat → concrete attack tree, cheapest-path analysis. |
| workflows/threat_to_mitigation.md | Findings → mitigations + NIST/CIS/ASVS control IDs. |
Methodology Index
| File | When |
| methodology/stride.md | Default. Per-element and per-interaction. |
| methodology/pasta.md | Regulated / business-aligned; 7 stages. |
| methodology/attack_trees.md | Single-goal deep dive; AND/OR decomposition. |
| methodology/dread.md | Quick scoring; includes critiques and alternatives. |
| methodology/linddun.md | Privacy-focused (GDPR/CCPA/HIPAA). |
| methodology/octave.md | Enterprise-wide, asset-driven. |
References Index
| File | Contents |
| references/control_catalogs.md | NIST CSF 2.0, 800-53 Rev 5, CIS v8, OWASP ASVS v5, ISO 27001, PCI DSS v4. |
| references/trust_boundary_patterns.md | 12 common boundary patterns + weaknesses. |
| references/framework_comparison.md | Pick-your-methodology decision matrix. |
Examples Index
| File | Contents |
| examples/mermaid_dfd_templates.md | 6+ ready-to-adapt DFD templates. |
| examples/stride_threat_library.md | Pre-built threats per STRIDE × element type. |
| examples/attack_tree_banking.md | Fully worked attack tree: unauthorized money transfer. |
| examples/bounty_patterns_2024_2026.md | STRIDE-per-element addendum digesting 38 post-2023 public bug-bounty patterns. |
Templates Index
| File | Contents |
| templates/threat_model_report.md | Full report skeleton. |
| templates/stride_table.md | STRIDE-per-element and per-interaction tables. |
Tools
| Tool | Purpose | Install |
| OWASP Threat Dragon | DFD + STRIDE auto-suggestion | npm install -g owasp-threat-dragon |
| Microsoft Threat Modeling Tool | Windows-native STRIDE + DFD | Download from MS |
| Threagile | Threat modeling as code (YAML) | Docker image threagile/threagile |
| draw.io / diagrams.net | Manual DFD editing | Web app or desktop |
Mermaid CLI (mmdc) | Render Mermaid to SVG/PNG | npm install -g @mermaid-js/mermaid-cli |
| Graphviz | Attack trees, DOT rendering | apt install graphviz / brew install graphviz |
| PlantUML | Complex diagrams | apt install plantuml |
Last Validated
2026-04. Reference catalogs: NIST CSF 2.0, NIST 800-53 Rev 5, CIS Controls v8, OWASP ASVS v5, PCI DSS v4.0, ISO/IEC 27001:2022.
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.

