Agent skill

Threat Model Discipline

by hypnguyen1209 in hypnguyen1209/offensive-claude

A skill your agent uses when starting an engagement, before exploitation, or whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before…

MITAuto-check passedSecurity

Install Threat Model Discipline

skills CLI
$ npx skills add hypnguyen1209/offensive-claude --skill threat-model-discipline -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hypnguyen1209/offensive-claude threat-model-discipline --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/threat-model-discipline .claude/skills/threat-model-discipline && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
threat-model-discipline
GitHub stars
388
Token cost
~660 tokens
SKILL.md length
250 words
Files
2 (incl. scripts)
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when starting an engagement, before exploitation, or whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before…

  • Starting an engagement
  • SKILL.md covers Overview, When to Activate, The model (JSON, materialized… and Red Flags — STOP, plus 1 more section
  • Runs Python scripts from its folder; calls python
  • Before exploitation

What it does

Threat Model Discipline is an agent skill from hypnguyen1209/offensive-claude. Use when starting an engagement, before exploitation, or whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before advancing

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/threatmodel_lint.py`).

It sits in Security, covering Threat modeling and Penetration testing. The repository describes itself as: Offensive security toolkit for Claude Code covering red team, exploit dev, AD attacks, EDR bypass, mobile pentest. The licence is MIT.

When your agent uses it

  • Starting an engagement
  • Before exploitation
  • Whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before advancing

Example prompts

  • “/threat-model-discipline”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit a506ad3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Threat Model Discipline loads about 660 tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 250 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~660

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from hypnguyen1209/offensive-claude at commit a506ad3, republished under its MIT licence (© hypnguyen1209). 250 words, ~660 tokens.

Download SKILL.mdSave it as .claude/skills/threat-model-discipline/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
threat-model-discipline
description
Use when starting an engagement, before exploitation, or whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before advancing
scripts
scripts/threatmodel_lint.py

Threat-Model Discipline

Overview

You cannot test what you have not modeled. A threat model names the assets, entry points, trust boundaries, relevant ATT&CK techniques, and existing mitigations — so coverage is deliberate, not accidental. On a long engagement the surface drifts (a new endpoint, a new dependency); un-reviewed drift is where bugs hide. This skill keeps the model complete and re-checks it for drift.

When to Activate

  • At engagement start (after recon-osint), before weaponize/exploit.
  • Whenever recon is re-run or the target changes — to catch new attack surface.
  • At /engage.gate — the gate refuses to advance on un-acknowledged drift.

The model (JSON, materialized from recon)

threat-model.json (see templates/threat-model/): five required lists — assets, entry_points, trust_boundaries, attck (technique ids), mitigations.

bash
# 1. Lint - every required field present, no placeholders, valid ATT&CK ids
python skills/threat-model-discipline/scripts/threatmodel_lint.py lint .engage/recon/threat-model.json

# 2. Drift - diff a re-run against the reviewed baseline; NEW entry points/assets/boundaries are
#    unreviewed surface and BLOCK the gate until re-reviewed or acknowledged
python skills/threat-model-discipline/scripts/threatmodel_lint.py drift \
    .engage/recon/threat-model.baseline.json .engage/recon/threat-model.json

Or use /engage.threatmodel (materialize | lint | drift).

Red Flags — STOP

  • "We'll model it as we go" — unmodeled surface = untested surface. Model first.
  • "Recon changed but the threat model didn't" — re-run drift; new surface must be re-reviewed.
  • A threat model full of TBD/[fill in] — that is not a model; the lint fails it.
  • A new entry_point appeared and you proceeded anyway — that is the exact gap attackers use.

Rationalizations

ExcuseReality
"The model is obvious, skip it"Obvious to you ≠ documented. Coverage you can't diff is coverage you can't trust.
"Drift is just noise"A new entry point is new attack surface. Acknowledge it explicitly or re-review.
"ATT&CK mapping is busywork"It turns 'we tested stuff' into 'we covered these techniques' — the report's backbone.

Pairs with scope-discipline (what you may touch) and finding-discipline (what counts as proven).

© hypnguyen1209, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/threat-model-discipline of hypnguyen1209/offensive-claude.

  • SKILL.md
  • scripts/threatmodel_lint.py

Open the folder on GitHubat commit a506ad3

Compare with similar skills

Threat Model Discipline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Threat Model Discipline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Threat Model Discipline this skillhypnguyen1209/offensive-claude388—~660Automated safety check: PassMIT
Graph DB Writessamugit83/redamon3k—~2.2kAutomated safety check: PassMIT
Csono-session/pstack136—~12kAutomated safety check: NotesMIT
Senior Securitydavila7/claude-code-templates33k2 repos~1.1kAutomated safety check: NotesMIT
Secure By Designooiyeefei/ccc495—~1.5kAutomated safety check: PassMIT
Securitytelagod/code-abyss244—~907Automated safety check: PassMIT

Similar skills

  • Graph DB Writes

    samugit83/redamon

    Writing to the Neo4j attack-surface graph in RedAmon: the tenant-isolation MERGE key every entity node must carry, where graph methods live (mixins, not the client), and the schema places that must…

    3k GitHub stars~2.2k tokensUpdated 2 days ago
    SecurityAuto-check passed
  • Cso

    no-session/pstack

    Chief Security Officer mode. An agent skill from no-session/pstack.

    136 GitHub stars~12k tokensUpdated 6 mo ago
    SecurityAuto-check: notes
  • Senior Security

    davila7/claude-code-templates

    Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing.

    33k GitHub starsUsed in 2 repos~1.1k tokens
    SecurityAuto-check: notes
  • Secure By Design

    ooiyeefei/ccc

    Run an enterprise security review of a system design or existing code before it ships.

    495 GitHub stars~1.5k tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Security

    telagod/code-abyss

    Defensive security engineering judgment, distilled from a stronger model - invoke when THREAT MODELING a system or feature; making security-relevant design decisions (auth, crypto, trust boundaries…

    244 GitHub stars~907 tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Build or challenge an application threat model from architecture, dataflows, identities, trust boundaries, business invariants, dependencies, and deployment context.

    135 GitHub stars~1.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed

More from hypnguyen1209/offensive-claude

All 9 skills in this repo
  • Crypto Analysis

    hypnguyen1209/offensive-claude

    A skill your agent uses when assessing cryptography — TLS/PKI auditing, RSA/ECC key attacks, ECDSA nonce lattice recovery, symmetric/AEAD misuse, JWT/JOSE forgery, hash cracking, post-quantum…

    388 GitHub stars~2.2k tokensUpdated 13 days ago
    Auto-check passed
  • Incident Response

    hypnguyen1209/offensive-claude

    A skill your agent uses when responding to or forensically investigating an incident — triage acquisition (Velociraptor/KAPE), Volatility 3 memory forensics, Chainsaw/Hayabusa EVTX timelining…

    388 GitHub stars~2.5k tokensUpdated 13 days ago
    Auto-check passed
  • Malware Analysis

    hypnguyen1209/offensive-claude

    A skill your agent uses when reverse-engineering or detecting malware — static triage + capa/YARA-X, emulation/DBI/.NET unpacking, dynamic/fileless/Volatility 3 memory analysis, C2 config extraction…

    388 GitHub stars~2.3k tokensUpdated 13 days ago
    Auto-check passed
  • Recon Osint

    hypnguyen1209/offensive-claude

    A skill your agent uses when mapping a target's external attack surface or gathering OSINT — subdomain enumeration, attack-surface mapping (httpx/katana/JS secrets), subdomain takeover…

    388 GitHub stars~2.2k tokensUpdated 13 days ago
    Auto-check passed
  • Threat Hunting

    hypnguyen1209/offensive-claude

    A skill your agent uses when hunting threats or engineering detections — ATT&CK Detection-Strategies, Sigma + correlation with Detection-as-Code CI, Windows endpoint hunting…

    388 GitHub stars~2.4k tokensUpdated 13 days ago
    Auto-check passed
  • Writing Offensive Skills

    hypnguyen1209/offensive-claude

    A skill your agent uses when creating or editing a skill in this offensive-claude repo — for the SKILL.md conventions (trigger descriptions, technique map, runnable scripts, OPSEC/detection…

    388 GitHub stars~826 tokensUpdated 13 days ago
    Auto-check passed

Categories

Questions about Threat Model Discipline

What does Threat Model Discipline do?

A skill your agent uses when starting an engagement, before exploitation, or whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before…. Threat Model Discipline is an agent skill from hypnguyen1209/offensive-claude.

When should I use Threat Model Discipline?

Threat Model Discipline fits situations like: starting an engagement; before exploitation; whenever the attack surface changes — build/validate the threat model and detect drift (new unreviewed surface) before advancing.

How do I install Threat Model Discipline in Claude Code?

Run `npx skills add hypnguyen1209/offensive-claude --skill threat-model-discipline -a claude-code`. Or copy the skill folder (skills/threat-model-discipline in hypnguyen1209/offensive-claude) into .claude/skills/threat-model-discipline in your project. Claude Code loads it when a task matches its description.

How do I install Threat Model Discipline in Codex?

Run `npx skills add hypnguyen1209/offensive-claude --skill threat-model-discipline -a codex`. Or copy the skill folder (skills/threat-model-discipline in hypnguyen1209/offensive-claude) into .agents/skills/threat-model-discipline in your project. Codex loads it when a task matches its description.

Can I use Threat Model Discipline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hypnguyen1209/offensive-claude --skill threat-model-discipline -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/threat-model-discipline, .gemini/skills/threat-model-discipline, .github/skills/threat-model-discipline and .opencode/skills/threat-model-discipline in your project.

What does Threat Model Discipline need to run?

Going by SKILL.md and its folder, Threat Model Discipline needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Threat Model Discipline access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Threat Model Discipline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Threat Model Discipline use?

Threat Model Discipline is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Threat Model Discipline use?

About 660 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Threat Model Discipline?

Skills that share tags, products or a category with Threat Model Discipline: Graph DB Writes (samugit83/redamon, 3k stars), Cso (no-session/pstack, 136 stars), Senior Security (davila7/claude-code-templates, 33k stars) and Secure By Design (ooiyeefei/ccc, 495 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Threat Model Discipline?

hypnguyen1209 (a GitHub user) maintains it in hypnguyen1209/offensive-claude, which has 388 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 28, 2026.

Source: hypnguyen1209/offensive-claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.