security-threat-model
Skill4 starsChanged 7 months agoMITView on GitHub
Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppSec threat modeling. Do not trigger for general architecture summaries, code review, or non-security design work.
32 other projects use a version of this, 24 of them edited.
Adopted by
Most recently taken up by
- jgeofil/agent-skillsedited, first seen Nov 8, 2026
- informaticolorenzo/skill-maestra-publicedited, first seen Nov 8, 2026
- dotslashsimran/simcrafttheir own version, first seen Nov 8, 2026
- thesammykins/skillsedited, first seen Nov 1, 2026
- lecluse-net/galarisedited, first seen Oct 30, 2026
- hmjBill/skillstheir own version, first seen Oct 29, 2026
Used with
Projects with it also use hf-cli, scientific-critical-thinking and 7 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.
Hugging FaceSkillhf-cli
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing repositories, models, datasets, and Spaces on the Hugging Face Hub. Replaces now deprecated `huggingface-cli` command.
Also in 3 projects that use this
ZanderRussSkillscientific-critical-thinking
Evaluate research rigor. Assess methodology, experimental design, statistical validity, biases, confounding, evidence quality (GRADE, Cochrane ROB), for critical analysis of scientific claims.
Also in 3 projects that use this
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 5 projects that use this
Microsoft AzureSkillhumanizer
Tone enforcement patterns for external-facing community responses
Also in 4 projects that use this
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 3 projects that use this
MicrosoftSkillmcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Also in 4 projects that use this
Other versions32 projects use a version of this.
Word for word · 0
None found.
Edited · 24
- openai/skills★ 27k25% same
- deadlock-mod-manager/deadlock-mod-manager★ 58425% same
- waybarrios/opencode-power-pack★ 54718% same
- JetBrains/skills★ 38624% same
- fimoklei/pm-ai-playbook★ 4218% same
- z91772524-ai/pojia-next-mac★ 3925% same
- PracticalSwan/agent-skills★ 2217% same
- Adhamxon/claude-code-skills★ 225% same
- rmusser01/tldw-stuff★ 225% same
- AymanShams/codex-coding-os★ 115% same
14 more not listed
Wrote their own version · 8
- mtarcure/claude-vibe-squad★ 220same name
- dotslashsimran/simcraft★ 69same name
- ckorhonen/claude-skills★ 17same name
- fattain-naime/engineering-docs★ 6same name
- JAXTech-Labs/claude-code-template★ 2same name
- jimtin/production-ai★ 1same name
- jpoindexter/theft-kit★ 1same name
- hmjBill/skills★ 0same name
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-reviewSkill
- code-simplifierSkill
- comment-analyzerSkill
- conventions-improverSkill
- feature-devSkill
- frontend-designSkill
- frontend-layoutSkill
- gh-address-commentsSkill
- gh-fix-ciSkill
- mcp-server-devSkill
- review-toolkitSkill
- silent-failure-hunterSkill
- test-analyzerSkill
- type-design-analyzerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Evidence-grounded: every component, data flow, or control must be backed by at least one repo path and, where helpful, a symbol name, …
- Distinctive: line 20
No secrets in output: if you find tokens, keys, or passwords, redact them and describe their presence and location only.
- Distinctive: line 25
Concise for AppSec engineers: use precise terminology; include mitigations and residual risks.
- Distinctive: line 32
Ask the user (or infer and mark as assumptions):
- Distinctive: line 40
If the user provided a path argument, scope the model to that sub-path.
- Very specific: line 44
Use file search, grep -rI (skip binaries), or ripgrep rg (skips binaries by default) to locate security-relevant surfaces:
- Distinctive: line 75
Prefer multi-step attacker stories tied to entry points and trust boundaries.
- Distinctive: line 101
Before producing the final report:
- Distinctive: line 104
Ask 1–3 targeted questions to resolve missing context (deployment environment, scale, auth model, internet exposure, data sensitivity, …
- Distinctive: line 106
Wait for user feedback: If the user cannot answer, proceed with explicit assumptions and mark any conditional conclusions.
- Distinctive: line 116
Run a quality check before writing:
- Distinctive: line 118
All discovered entry points are covered.
- Very specific: line 126
Use flowchart TD or flowchart LR only.
- Very specific: line 128
Only --> arrows; edge labels limited to plain words via -->|label|.
- Distinctive: line 132
No file paths, URLs, or socket paths in node labels (put those in prose).
“Common” is measured: kept by at least 6 in 10 of the 29 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
Security Threat Model
Deliver an actionable AppSec-grade threat model specific to the repository or a project path. Anchor every architectural claim to evidence in the repo; keep assumptions explicit. Prioritize realistic attacker goals and concrete impacts over generic checklists.
Quality rules (apply throughout)
- Evidence-grounded: every component, data flow, or control must be backed by at least one repo path and, where helpful, a symbol name, config key, or short quoted snippet. Do not invent components.
- No secrets in output: if you find tokens, keys, or passwords, redact them and describe their presence and location only.
- Scope discipline: separate production/runtime behavior from CI/build/dev tooling and from tests/examples. Separate attacker-controlled inputs from operator-controlled and developer-controlled inputs.
- Concise for AppSec engineers: use precise terminology; include mitigations and residual risks; avoid restating large blocks of README/spec.
Workflow
1. Collect inputs
Ask the user (or infer and mark as assumptions):
- Intended usage and deployment model (server, CLI, library, worker)
- Internet exposure (public, internal, air-gapped)
- Authentication / authorization expectations
- Data sensitivity (PII, credentials, financial, public)
- Any explicitly out-of-scope paths
If the user provided a path argument, scope the model to that sub-path.
2. Explore the repo
Use file search, grep -rI (skip binaries), or ripgrep rg (skips binaries by
default) to locate security-relevant surfaces:
- Network listeners, routes, endpoints, RPC handlers, message consumers
- Auth, session/token handling, RBAC/ACL logic
- Parsing/deserialization (JSON/YAML/XML/protobuf), template rendering,
eval - File upload/read paths, archive extraction, image/document parsing
- Database, queue, and cache clients and query construction
- Secrets/config loading, environment variables, key management
- SSRF-capable HTTP clients, webhooks, URL fetchers
- Sandboxing, privilege boundaries, subprocess execution
- Logging/error handling paths
- CI/build pipelines, dependency management, artifact publishing
3. Build the system model
- List primary components and how they interact.
- Enumerate data flows and trust boundaries: for each boundary specify source → destination, data types crossing, channel/protocol, security guarantees (auth, TLS, origin checks, schema validation, rate limits).
- Produce a compact Mermaid flowchart (see diagram rules below).
4. Enumerate assets and attacker model
- List assets that drive risk: credentials, PII, integrity-critical state, availability-critical components, build artifacts.
- Describe realistic attacker capabilities based on exposure and intended usage.
- Explicitly note non-capabilities to avoid inflated severity.
5. Enumerate threats as abuse paths
- Prefer multi-step attacker stories tied to entry points and trust boundaries.
- Classify each threat: exfiltration, privilege escalation, integrity compromise, denial of service, supply-chain attack.
6. Prioritize with explicit reasoning
For each threat assign:
- Likelihood: low / medium / high (1–2 sentence justification)
- Impact: low / medium / high (1–2 sentence justification)
- Priority: critical / high / medium / low (likelihood × impact, adjusted for existing controls)
Risk priority guidance (illustrative):
- Critical: pre-auth RCE, auth bypass, cross-tenant access, sensitive data exfiltration, key or token theft, sandbox escape
- High: targeted DoS of critical components, partial data exposure, rate-limit bypass with measurable impact, privilege escalation with realistic prerequisites
- Medium: log/metrics poisoning affecting detection, partial info leaks with meaningful exposure
- Low: low-sensitivity info leaks, noisy DoS with easy mitigation, issues requiring unlikely preconditions
7. Validate assumptions with the user (required)
Before producing the final report:
- Summarize the 3–6 key assumptions that most affect scope or risk ranking.
- Ask 1–3 targeted questions to resolve missing context (deployment environment, scale, auth model, internet exposure, data sensitivity, multi-tenancy).
- Wait for user feedback. If the user cannot answer, proceed with explicit assumptions and mark any conditional conclusions.
8. Write the report
Produce valid Markdown following the required output format below. Write it to a
file named <repo-or-dir-name>-threat-model.md (use the basename of the repo
root, or the in-scope directory if asked to model a sub-path). Then summarize
the top findings to the user.
Run a quality check before writing:
- All discovered entry points are covered.
- Each trust boundary appears in at least one threat.
- Runtime vs CI/dev separation is maintained.
- User clarifications (or explicit non-responses) are reflected.
- Assumptions and open questions are explicit.
Mermaid diagram rules
Use flowchart TD or flowchart LR only. Rules:
- Only
-->arrows; edge labels limited to plain words via-->|label|. - Simple node IDs (letters/numbers/underscores only); quoted labels
(
A["Label"]); avoidA(Label)shape syntax. - No
titlelines orstyledirectives. - No file paths, URLs, or socket paths in node labels (put those in prose).
- Wrap in a fenced
mermaidblock.
Required output format
## Executive summary
One paragraph: top risk themes and highest-risk areas.
## Scope and assumptions
In-scope paths, out-of-scope items, explicit assumptions, open questions.
## System model
### Primary components
### Data flows and trust boundaries
Arrow-style bullets (e.g., Internet → API Server). For each boundary: data
types, channel/protocol, security guarantees, input validation.
#### Diagram
<mermaid flowchart>
## Assets and security objectives
Table: Asset | Why it matters | Security objective (C/I/A)
## Attacker model
### Capabilities
### Non-capabilities
## Entry points and attack surfaces
Table: Surface | How reached | Trust boundary | Notes | Evidence (repo path/symbol)
## Top abuse paths
5–10 numbered multi-step sequences: attacker goal → steps → impact.
## Threat model table
Columns: Threat ID | Threat source | Prerequisites | Threat action | Impact |
Impacted assets | Existing controls (evidence) | Gaps | Recommended mitigations |
Detection ideas | Likelihood | Impact severity | Priority
Rules: Threat IDs as TM-001, TM-002, …; Priority one of critical/high/medium/low.
## Criticality calibration
Define critical/high/medium/low for this repo's context. Include 2–3 examples
per level tailored to the repo's assets and exposure.
## Focus paths for security review
2–30 repo-relative paths with one-sentence reason each.
## Quality checklist
Short checklist confirming coverage of entry points, trust boundaries,
runtime/CI separation, user clarifications, and assumptions.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.

