/threat-model:threat-model <path or name of the repo/package to model>from threat-model
Produces a threat model for an open-source repository or package, documenting its implicit security contract (assumptions, guarantees, disclaimed properties, known misuses). Delegates to specialists and outputs prose, YAML, and JSON artifacts.
Ships in threat-model. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce the implicit contract between a project and its downstream users. This skill owns the end-to-end procedure and delegates each phase to a specialist. The deliverable is three artifacts, in authority order prose > yaml > json:
threat-model.md) written at the modeled
root, beside the YAML and JSON artifacts, using the
canonical section structure, with embedded structured tables (per-input-operand
trust table, contract-dimension matrix, disposition set).threat-model.yaml) that a
triage pipeline can consume.threat-model.json conforming to the repo's
schema.json, for external consumers. Lossy by design; never a triage input.Read first: principles.md — what a threat model is and is not, the four-question framework, and what to leave out. Do not start producing before internalizing it.
| Phase | Specialist instructions | Produces (artifact handed back) |
|---|---|---|
| 3.1 Orient | threat-model-recon | Project classification, component-family carve, in/out scope |
| 3.2 Mine existing policy | threat-model-recon | Mined maintainer positions and prior-policy back-map |
| 3.3 Deep surface pass | threat-model-surface | §1.7 trust table/matrix, §1.5 side effects, §1.4 reachability, §1.8 taint |
| 3.4 Question waves | threat-model-interview | Answered/queued waves and provenance promotions |
| 3.5 Draft | threat-model-authoring | threat-model.md with tagged prose and embedded tables |
| 3.6 Backtest | threat-model-backtest | Routing/coverage report, revisions, qualified §1.15 feed |
| 3.7 Iterate/sign off | threat-model orchestrator | Accepted model or unratified draft under the termination policy |
| Publication: §1.19 | threat-model-sidecar | Validated threat-model.yaml derived index + threat-model.json export |
| Downstream | threat-model-triage | One §1.17 disposition for an inbound finding |
Specialists can also be invoked standalone. When orchestrating, invoke each in turn, pass it the prior artifacts, and fold its output into the running draft.
Seven canonical phases. Budgets are stated so you notice when a phase over/under-runs — that usually signals a scoping problem. Phases 3.4–3.7 form a revision loop; sidecar generation and final validation are publication gates.
SECURITY.md threat-model content as a strict
superset and build the prior-policy back-map.unresolved questions. Declare the triage policy in the §1.1 header.
Write it plainly — short one-idea sentences, plain words, active voice,
and short bullets or table rows instead of piled-up noun stacks; target the
reading level of good developer docs, not a research paper (see principles.md).VALID or escalates, and never widen a
disclaimer to reach a close. MODEL-GAP → prefer an unresolved matrix row
plus a §1.18 decision question over a new disclaimer; ambiguous routing →
sharpen sections; contradiction with the historical call → §1.18 question.
Replace the §1.1 placeholder with real figures — corpus and cluster counts,
the real-versus-synthesized split, the disposition histogram, and the
fail-safe figure — and write the routing table to the producer-side
threat-model-backtest.md. Export 2–4 de-identified worked routing examples
to §1.11, at least one routing VALID. Only recurring
BY-DESIGN: property-disclaimed closes and already-established
KNOWN-NON-FINDINGs feed §1.15. An OUT-OF-MODEL:* route never does: §1.15
fires first in the precedence order, so relabelling a scope, configuration, or
dependency close as a known non-finding promotes it above the checks that
decided it.relaxed policy, only a low-blast-radius route, and
never a security-critical property.Publication gate A — Sidecar. Delegate to threat-model-sidecar to emit
threat-model.yaml per sidecar-schema.md and
threat-model.json per
json-report-schema.md. The prose stays
canonical; the YAML is a derived index, the JSON a lossy export
(prose > yaml > json).
Publication gate B — Finalize. Run every gate in self-check.md. If any check fails, loop back to the owning phase; publish only when both prose and sidecar pass.
Four tags, used everywhere: (documented, source), (maintainer, YYYY-MM),
(assumption, QN), and (inferred, QN) where QN resolves in §1.18. No
hedge-tag variants. A draft with no inferred / assumption tags is
either fully reviewed or overclaiming; a draft that is mostly unratified is
not ready to publish. Under the default strict triage policy an assumption
escalates like inferred; under relaxed it may license low-blast-radius
provisional closes but never crosses the security-critical floor. See
output-structure.md for the full legend and
the closed disposition set.
threat-model.yaml schema.threat-model.json export mapping.references/glossary.md (opens in a new tab)references/json-report-schema.md (opens in a new tab)references/output-structure.md (opens in a new tab)references/principles.md (opens in a new tab)references/question-bank.md (opens in a new tab)references/self-check.md (opens in a new tab)references/sidecar-schema.md (opens in a new tab)references/worked-example.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alpha-omega-security/threat-model --plugin threat-model8 skills in this plugin
/threat-model-authoringDraft phase 3.5 of a threat model from the orientation brief, surface analysis, and maintainer answers. USE WHEN writing threat-model.md to the canonical §1.1–§1.19 structure. Combines concise prose with the §1.7 trust table and contract matrix, §1.8 output statements, §1.17 disposition table, §1.1 triager quick-start, and any prior-policy back-map. Tags every non-trivial claim as documented, maintainer, or inferred; maps inferred claims to §1.18; and maintains confidence counts. DO NOT USE FOR: sidecar generation, backtesting, or triage./threat-model-backtestBacktest phase 3.6 of threat-model production against historical findings before sign-off. USE WHEN a draft model must prove it can uniquely route real reports. Builds a stratified producer-side corpus across components and contract dimensions, clusters large corpora by sink and attack class, and routes each item blind to one §1.17 disposition. Reports MODEL-GAP, contradictory or ambiguous routing, coverage, qualified §1.15 candidates, and §1.18 questions. The corpus is not published. DO NOT USE FOR: drafting, sidecar generation, or triaging one new finding./threat-model-interviewRun phase 3.4 maintainer question waves for threat-model production. USE WHEN inferred claims need ratification or interview-first versus draft-first mode must be chosen. Asks 3–7 prioritized proposed-answer questions per wave; wave 1 always covers scope, intended use, configuration support, and host side effects. Records answers, promotes inferred provenance to dated maintainer provenance, and retires matching §1.18 questions. Supports the phase 3.7 termination policy. DO NOT USE FOR: fabricating maintainer positions, drafting the whole model, or triage./threat-model-reconOrient and mine an open-source repository for threat-model production phases 3.1–3.2. USE WHEN starting a threat model or surveying security posture before modeling. Reads README, top-level docs, SECURITY/THREAT docs, maintainer issue rulings, and changelog rationale; carves component families; flags shipped-but-unsupported code; classifies project type; and absorbs an existing embedded threat model as a strict superset with a prior-policy back-map. Produces an orientation brief. Read-only. DO NOT USE FOR: deep code-surface analysis (use threat-model-surface), drafting, bug hunting, code fixes, or triage./threat-model-sidecarEmit and validate the §1.19 machine-readable companions: threat-model.yaml using schema threat-model-sidecar/v2, and the flat threat-model.json export conforming to schema.json. USE WHEN an orchestrated threat model is ready for publication, automated or AI-assisted triage, dependency compatibility analysis, or companion regeneration after prose changes. Projects provenance- backed components, input obligations, contract dimensions, outputs, adversaries, dependencies, configurations, properties, misuses, non-findings, and the closed disposition enum. Prose remains canonical; authority order is prose > yaml > json. DO NOT USE FOR: writing prose or routing a finding./threat-model-surfacePerform phase 3.3 deep analysis of an in-scope attack surface for a threat model. USE WHEN the orientation brief is ready and code must be read to derive the §1.7 per-input trust table and contract-dimension matrix, §1.5 no-surprise side-effects inventory, §1.4 reachability preconditions, and §1.8 output taint. Reads public entry points for contract rather than defects, timeboxes each component family, and marks uncovered surface inferred. Produces a surface analysis. Read-only. DO NOT USE FOR: bug hunting, code review, orientation, or drafting the prose model.Other plugins' skills for the same job