sec-threat-model

sec-threat-model is a skill for Claude Code, Codex from ellmos-ai/skills. It costs 149 tokens per session (1,224 once invoked), scanned A, original, MIT.

A threat model for a code repository: a written map of valuable assets, trust boundaries, entry points, data flows, and attacker goals. It is derived from the actual source code rather than only from the README.

In plain words
What is it for?
It helps decide what to inspect first in a repository and records focused security questions. It can create or update a threatmodel.md file for a selected commit or working tree without changing the source code.
Why use it?
Without this map, security reviews can miss important paths or assume that documentation is accurate. Marking unsupported details as unknown keeps the model tied to evidence.

Skill for Claude CodeCodex

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

Good fit It helps decide what to inspect first in a repository and records focused security questions. It can create or update a threatmodel.md file for a selected commit or working tree without changing the source code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ellmos-ai/skills/sec-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 ellmos-ai/skills --skill sec-threat-model
Clone the repo
git clone --depth 1 https://github.com/ellmos-ai/skills

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 sec-threat-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/ellmos-ai/skills/sec-threat-model/github.svg)](https://agentmods.dev/skills/ellmos-ai/skills/sec-threat-model)
Your own site
<a href="https://agentmods.dev/skills/ellmos-ai/skills/sec-threat-model"><img src="https://agentmods.dev/badge/skills/ellmos-ai/skills/sec-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 sec-threat-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/ellmos-ai/skills/sec-threat-model"><img src="https://agentmods.dev/badge/skills/ellmos-ai/skills/sec-threat-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,224 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.00149 $0.01224
Opus 5.5 $0.00060 $0.00490
Sonnet 5.5 $0.00030 $0.00245
Haiku 4.5 $0.00015 $0.00122

Measured 29d ago against content hash f2ca84590b8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sec-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 29d ago.

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.

skills/dev/sec-threat-model/SKILL.md · 58 lines

How it starts

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

sec-threat-model

Phase 1 der ellmos-Security-Familie (sec-threat-model, sec-scan, sec-diff-scan, sec-validate, sec-triage, sec-report). Gemeinsamer Vertrag: sec-scan/references/contract.md (Abschnitt 1 Scan-Verzeichnis, 6 Regeln). Hier nicht wiederholt.

Regeln

  • Nur eigener oder ausdrücklich autorisierter Code (Vertrag 6.1). Kein Netzzugriff auf fremde Systeme, keine Port-Scans.
  • Das Modell entsteht aus gelesenem Quelltext, nicht aus README-Behauptungen. Was nur dort steht oder nicht belegbar ist, kommt als offen ins Modell, nie als Tatsache.
  • Schreiben nur in das Scan-Verzeichnis (<tmp>/ellmos-security/<repo>/sec-scan-<scanId>/), nicht in den Quelltext. Vor dem Schreiben Lock prüfen wie in sec-scan > Preflight.

Vorgehen

  1. Scope klären: Repo, Ref (Commit-SHA oder working-tree), ausgeschlossene Pfade. Vorhandenes threatmodel.md lesen; dann Update-Modus: nur Änderungen nachziehen, Stand und Ref vermerken.
  2. Struktur lesen: Manifeste, Build-/Deploy-Dateien, Konfiguration, Verzeichnisbaum. Sprachen und Frameworks aus dem Code ableiten.
  3. Einstiegspunkte finden: HTTP-Routen, CLI-Argumente, Queue-/Webhook-Consumer, Datei- und Format-Parser, IPC/Sockets, geplante Jobs, Umgebungsvariablen, Plugin-/Skript-Ladepunkte. Je Eintrag Datei:Zeile und Aufruferkreis (anonym, authentifiziert, intern).
  4. Assets benennen: Geheimnisse und Tokens, personenbezogene Daten, Nutzerdateien, Datenbanken, Rechenzeit, Ausführungsrechte, Reputation/Lieferkette. Ort im Code, nie den Wert.
  5. Vertrauensgrenzen ziehen: wo Daten von weniger vertrauenswürdig nach vertrauenswürdig wechseln (Netz -> Prozess, Nutzer -> Admin, Mandant -> Mandant, Prozess -> Betriebssystem/Shell/DB, Drittpaket -> eigener Code). Wo die Durchsetzung (Authn/Authz, Validierung, Sandbox) im Code sitzt, oder dass sie fehlt.
  6. Datenflüsse skizzieren: Source -> Transformation -> Sink für die kritischsten Assets und Einstiegspunkte (Text oder Mermaid, kurz). Sinks: Shell, SQL, Dateisystem, Deserialisierung, Template, HTTP-Client, Logs.
  7. Angreiferziele ableiten: pro Grenze, was ein Angreifer erreichen will (Codeausführung, Datenabfluss, Rechteausweitung, Manipulation, Ausfall). STRIDE nur als Denkhilfe, nicht als Pflichtraster.
  8. Untersuchungsfragen priorisieren: konkrete, prüfbare Fragen ("Erreicht user_id aus Route X ungeprüft die Query in db.py?"), sortiert nach Auswirkung mal Erreichbarkeit. Sie werden in sec-scan zu Untersuchungspaketen.

Read the full file on GitHub · 58 lines

Files

What ships with it

6 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. 29d ago Changed · +2 lines f2ca84590b8d
  2. 1mo ago First seen · 56 lines · 149 tokens per session scan A 87065e0d95b4

Subscribe to this mod's changes

sec-threat-model is a skill published in the GitHub repository ellmos-ai/skills (10 stars, last pushed today), licensed MIT. It adds 149 tokens to every session and 1,224 once invoked, about $0.0006 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-11-01.

Related

sec-threat-model compared with skills from other repositories

sec-threat-model next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sec-threat-modelellmos-ai/skillsSkill10todayMITA149Claude Code, Codex
pytorch-patternsaffaan-m/ECCSkill314kyesterdayMITA32Claude Code, Kiro
django-patternsaffaan-m/ECCSkill314kyesterdayMITA32Claude Code, Kiro
accelerateNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
fastapi-patternsaffaan-m/ECCSkill314kyesterdayMITA35Claude Code, Kiro
python-patternsaffaan-m/ECCSkill314kyesterdayMITA45Claude Code, Kiro
python-testingaffaan-m/ECCSkill314kyesterdayMITA35Claude Code, Kiro