agentleFS
shinzoxDshinzoxD/knackbox/skills/coding/threat-modeling/SKILL.md

threat-modeling

Skill0 starsChanged 5 months agoApache-2.0View on GitHub

Build a structured threat model — assets, actors, trust

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use supply-chain-security, performance-profiling 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.
  • MicrosoftSkill

    supply-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

  • conorluddySkill

    performance-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

  • fefogarciaSkill

    dependency-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

  • AnthropicSkill

    incident-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

  • SentrySkill

    architecture-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

  • OpenAISkill

    observability

    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

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 4

    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
  1. Distinctive:

    Every threat names an actor, a path, and a lost asset.

    line 68
  2. Distinctive:

    Do not invent architecture.

    line 70
  3. Distinctive:

    Never claim "no residual risk".

    line 79
  4. Distinctive:

    AI / tool agents: treat tools, retrieval corpora, and prompt channels as trust boundaries.

    line 85

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Threat Modeling

Map how the system can be abused before arguing about individual lines. Prefer a short, decision-ready model over a novel.

For findings in a concrete diff, use security-review. For prompt / tool-using agents, also use prompt-injection-hardening. For auth mechanics, use auth-design.

Workflow

  1. Scope: what is in, what is out, and the business consequence of failure (money, PII, safety, integrity, availability).
  2. Assets: data stores, secrets, admin actions, model weights, outbound capabilities.
  3. Actors: anonymous, user, other tenant, insider, supplier, compromised dependency, bot.
  4. Diagram in words: clients → edges → app → data → third parties. Mark trust boundaries (browser, VPC, vendor, tenant).
  5. STRIDE per boundary / flow (only what applies): Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege.
  6. Top threats: likelihood × impact in plain language; skip theater (nation-state on a weekend side project unless asked).
  7. Mitigations: existing control, gap, owner. Residual risk last.

Output format

## Threat model: <system>

**Scope / out of scope:** …
**Assumptions:** …

### Assets
…

### Actors
…

### Trust boundaries
…

### Threats
| ID | STRIDE | Flow / component | Abuse | Impact | Mitigation | Residual |

### What to build or review next
1. …

Rules

  1. Every threat names an actor, a path, and a lost asset. No bare "consider adding WAF".
  2. Do not invent architecture. If the diagram is missing, state assumptions or ask one clarifying question.
  3. Mitigations must be specific (control + where it lives). "Use security best practices" is not a mitigation.
  4. Rank. A 30-row STRIDE table with no priority is a failed model.
  5. Data classification drives impact. Public marketing pages are not PII stores.
  6. Include supply chain and admin/support paths when they can mint or read the same assets as users.
  7. Never claim "no residual risk".

Edge cases

  • Code-only request: still produce the model first, then list the 3–5 reviews that would falsify it (security-review targets).
  • AI / tool agents: treat tools, retrieval corpora, and prompt channels as trust boundaries.
  • Regulated data: name the obligation (retention, access logs) as a threat if missing; do not give legal advice.
  • Tiny change: a one-endpoint model is fine; do not expand to the whole company.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.