threat-model

threat-model is a skill for Claude Code, Codex from Robotti-io/copilot-security-instructions. It costs 39 tokens per session (1,544 once invoked), scanned A, original, Apache-2.0.

A structured method for finding security risks in a system, feature, service, repository, or proposed code change. It uses evidence from the code and deployment setup to map how attacks could happen and records the results in Markdown with diagrams.

In plain words
What is it for?
Use it for repository reviews, architecture reviews, feature planning, and pull-request security checks. It helps document components, data flows, trust boundaries, privileged actions, threats, mitigations, and validation steps.
Why use it?
It gives security reviews a repeatable process instead of relying on guesswork or informal checklists. It helps connect each risk to its likely impact, priority, and a way to verify the fix.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for repository reviews, architecture reviews, feature planning, and pull-request security checks. It helps document components, data flows, trust boundaries, privileged actions, threats, mitigations, and validation steps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robotti-io/copilot-security-instructions/threat-model
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Robotti-io/copilot-security-instructions --skill threat-model
Clone the repo
git clone --depth 1 https://github.com/Robotti-io/copilot-security-instructions

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threat-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/robotti-io/copilot-security-instructions/threat-model/github.svg)](https://agentmods.dev/skills/robotti-io/copilot-security-instructions/threat-model)
Your own site
<a href="https://agentmods.dev/skills/robotti-io/copilot-security-instructions/threat-model"><img src="https://agentmods.dev/badge/skills/robotti-io/copilot-security-instructions/threat-model/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threat-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/robotti-io/copilot-security-instructions/threat-model"><img src="https://agentmods.dev/badge/skills/robotti-io/copilot-security-instructions/threat-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,544 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01544
Opus 5.5 $0.00016 $0.00618
Sonnet 5.5 $0.00008 $0.00309
Haiku 4.5 $0.00004 $0.00154

Measured 3mo ago against content hash 806ab27bdcce, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

threat-model scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/mermaid-docs.mjs, scripts/mermaid-support.mjs, scripts/validate-mermaid.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/copilot-security/skills/threat-model/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Threat Model

Purpose

Provide a repeatable, evidence-first threat modeling workflow for GitHub Copilot users who need durable Markdown output and Mermaid diagrams, including a fallback path for GitHub Copilot CLI users who cannot call the VS Code Mermaid Chart tools directly.

When to use

Use this skill when you need to:

  • threat model a repository, feature, architecture, or PR diff
  • prepare a security architecture review with data flows and trust boundaries
  • produce a 4Q report with actionable mitigations and a validation plan
  • work from GitHub Copilot CLI and still validate Mermaid diagrams before publishing the report

Inputs to collect

  • in-scope components, deployables, and entry points
  • deployment and reachability assumptions
  • privileged roles and high-impact workflows
  • sensitive data categories and likely consequence of misuse
  • existing controls, especially authn/authz, ingress, logging, and environment isolation
  • repository evidence for code paths, IaC, manifests, and configuration

How to use

  1. Collect repository evidence before relying on operator answers.

  2. Ask only the branching intake questions that materially change exposure, privilege, or data-sensitivity scoring.

  3. Draft the report in a root-level file named Threat Model Review - YYYY-MM-DD.md.

  4. Use the bundled Mermaid helper scripts when the Mermaid Chart extension tools are unavailable:

    npm run threat-model:mermaid-docs -- --list
    npm run threat-model:mermaid-docs -- --type flowchart
    npm run threat-model:mermaid-docs -- --type sequenceDiagram
    npm run threat-model:mermaid-validate -- --file "Threat Model Review - 2026-04-15.md"
    
  5. Fix Mermaid failures and rerun validation until the script exits successfully.

  6. Deliver the final report plus a short PR-ready summary.

Rules

  • MUST use this evidence hierarchy for factual claims: repo-confirmed, runtime/deployment evidence, operator-stated, ASSUMPTION, UNKNOWN.
  • MUST keep confirmed facts separate from inference.
  • MUST ask 4-8 concise intake questions when reachability, privileged workflows, data sensitivity, or environment isolation are unclear.
  • MUST produce at least these diagrams unless the repository clearly cannot support them: DFD Level 0, DFD Level 1, trust-boundary view, and top 2-3 sequence diagrams.
  • MUST validate every Mermaid block before finalizing the report.
  • MUST include at least 3 code-anchored or IaC-anchored findings that do not depend primarily on operator answers.
  • MUST assign an overall application risk score from 0-100 with confidence, volatility, and top score drivers.
  • MUST mark mitigations as PRESENT, ABSENT, or UNKNOWN.
  • MUST mark threats as Mitigated, Partially Mitigated, Open, or Unknown based on whether controls materially close the exploit path.
  • SHOULD prefer simple Mermaid syntax over advanced styling.
  • SHOULD call out contradictions between repo evidence and operator statements before finalizing prioritization.
  • MAY omit optional diagrams when the repository does not expose the needed evidence; label the gap as UNKNOWN.

Read the full file on GitHub · 161 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 161 lines · 39 tokens per session scan A 806ab27bdcce

Subscribe to this mod's changes

threat-model is a skill published in the GitHub repository Robotti-io/copilot-security-instructions (44 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 1,544 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

threat-model compared with skills from other repositories

threat-model next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
threat-modelRobotti-io/copilot-security-instructionsSkill446mo agoApache-2.0A39Claude Code, Codex
dataverse-schema-architectpnp/copilot-promptsSkill912todayMITA93Claude Code, Codex
code-review-csharppnp/copilot-promptsSkill912todayMITA66Claude Code, Codex
clean-architecture-dotnetSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A50Claude Code, Codex
outside-in-tddSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A35Claude Code, Codex
setup-husky-dotnetSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A30Claude Code, Codex
finding-filesSebastienDegodez/copilot-instructionsSkill19923d agoApache-2.0A28Claude Code, Codex