openai/threat-model
Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
This is a copy. The original lives at openai/plugins-threat-model.
npx skills add https://github.com/openai/codex-security --skill threat-model
Establish the repository-scoped threat model at the path defined in ../../references/scan-artifacts.md. Reuse a cached model only when its final Repository and Version lines match the current target.
AGENTS.md or resolved SECURITY.md guidance can be that authoritative source when it is sufficiently specific about the repository's product surfaces, trust boundaries, attacker-controlled inputs, assumptions, or security scan guidance to serve as the threat model.
If no threat model is provided, generate a repository-scoped threat model to be used in future bug discovery. The threat model should holistically cover the entire repository and should make it obvious:
The path references in this skill are the default locations for this phase.
If the user explicitly provides a different path for a required input or output, use the user-provided path instead of the corresponding default path referenced in this skill.
If a required input is still missing, stop and ask the user for it before continuing.
Use the shared scan artifact path conventions in ../../references/scan-artifacts.md.
target_id, the current version (revision for an immutable Git tree, snapshot digest otherwise), and the repository-scoped threat model path using ../../references/scan-artifacts.md.Repository and Version lines match those current values. Otherwise regenerate it.../../references/security-guidance.md and the policy resolved for the scan target. Resolve it first if the coordinator did not supply it.AGENTS.md is acceptable here when it is clearly being used as the security scan guidance or threat model source for this scan and is sufficiently repository-specific to stand in for a threat modelRepository and Version lines from ../../references/scan-artifacts.md, then write the threat model to the repository-scoped path.Generate and structure the threat model using references/threat-model-guidance.md.
personal/, test/, tests/, docs/, examples/, or one-off developer tooling unless repository evidence shows those are real deployed or privileged workflow surfaces.../../references/scan-artifacts.md.Take openai/threat-model from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.