agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when designing a system and identifying what could go wrong. Applies STRIDE to a data-flow model, ranks threats by realistic risk, and produces mitigations that are actually built.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill threat-modeling --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/threat-modelingContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when designing a system and identifying what could go wrong. Applies STRIDE to a data-flow model, ranks threats by realistic risk, and produces mitigations that are actually built.
name: threat-modeling description: Use when designing a system and identifying what could go wrong. Applies STRIDE to a data-flow model, ranks threats by realistic risk, and produces mitigations that are actually built. metadata: category: security version: 1.0.0 tags: [threat-model, stride, risk, design, security]
Find the security problems in a design before they are built. Threat modeling is cheap; the same finding after launch is a rewrite, and after a breach it is a disclosure.
1. **Draw the data flow** — Components, data stores, external entities, and the flows between them. Simple boxes and arrows; the diagram is a tool, not a deliverable. 2. **Mark the trust boundaries** — Every line data crosses where the trust level changes: internet to your edge, your service to a third party, tenant A's data to tenant B's request. Threats live on these lines. 3. **Apply STRIDE at each boundary** — For each flow, ask each of the six questions. It is mechanical, and that is the point: it finds what intuition skips. 4. **Rank by realistic risk** — Likelihood times impact. A theoretical attack requiring physical access to the datacenter ranks below an IDOR that a bored user could find. 5. **Design mitigations** — For each threat above the acceptance line, a specific control, with an owner. 6. **Accept the rest explicitly** — Write down what you are not mitigating and why. Undocumented acceptance is indistinguishable from oversight.
**STRIDE applied to one flow, producing a real finding:**
Flow: Browser -> API Gateway -> Orders Service -> Postgres
Boundary: internet / internal (at the gateway)
Asset: order data, including customer PII and amounts
S - Spoofing
Threat: Attacker forges a JWT to impersonate another user.
Mitigation: Signature verified with a pinned algorithm (RS256); `alg`
from the header is never trusted. Keys rotated quarterly.
Status: MITIGATED
T - Tampering
Threat: Client modifies `total_cents` in the create-order payload.
Finding: The API currently trusts the client-supplied total.
Mitigation: Server recomputes the total from the line items and the
price list. The client-supplied value is ignored entirely.
Status: ACTION REQUIRED — owner @sam, due 2026-04-02
R - Repudiation
Threat: A user denies having placed an order.
Mitigation: Append-only audit log with the authenticated subject, the
request ID, and the source IP. Retained 7 years.
Status: MITIGATED
I - Information disclosure
Threat: Tenant A reads tenant B's orders by guessing an ID.
Mitigation: ULIDs (not enumerable) AND a row-level security policy on
tenant_id. Two independent controls, because this is the highest-impact
threat in the system.
Status: MITIGATED
D - Denial of service
Threat: An expensive report query is called in a loop.
Mitigation: Rate limit per tenant; query timeout of 5s; the report is
served from a materialized view.
Status: MITIGATED
E - Elevation of privilege
Threat: A read-only API key performs a write.
Finding: Scopes are checked at the gateway but not re-checked in the service.
Risk: A service reachable from inside the VPC bypasses the check entirely.
Mitigation: Enforce scope in the service, not only at the edge.
Status: ACTION REQUIRED — owner @maya, due 2026-04-09A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…