Repository Threat Model skill for Claude and Codex
Repository Threat Model as an AI skill. It asks for Repository and purpose, Deployment shape, Key entry points and 3 more, then does the rest. Free to install…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a maintainer or security reviewer needs a code-anchored threat model of a repository, with abuse paths from attacker capability to harm. Do not use for scanning for known vulnerabilities in dependencies or a compliance audit. Related topics: coding, technical.
What it will ask you for
- Repository and purpose (longer free text)
- Deployment shape (choose one: Web service, Library, CLI tool, Mobile app, Serverless, Batch job)
- Key entry points (longer free text)
- Most valuable assets (choose any: User data, Credentials, Money movement, Source code, Availability, Reputation)
- Attacker types to consider (choose any: Anonymous internet user, Authenticated user, Malicious insider, Compromised dependency)
- Scope of code to read (free text, e.g. "Folders or services")
How it works
- Read the code in scope and list the assets with where each is stored or processed.
- Describe the trust boundaries where data moves from less to more trusted components.
- State what each chosen attacker type can do now and what they must not be able to do.
- Write numbered abuse paths citing the file and function at each step, rated by likelihood and impact.
- Propose the cheapest control that breaks each path and list the five paths to fix first.
What you get
An assets list, trust boundaries, attacker capabilities, a table of abuse paths with code references and ratings, controls, and a top five list, with unconfirmed items marked.
What it watches out for
- Writing generic threats with no file or function cited, which cannot be acted on.
- Treating every path as high impact, which hides the ones that matter.
- Presenting inferences about code never read as confirmed findings.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.