Agent skill

Threat Model

by pproenca in pproenca/dot-skills

Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase.

MITAuto-check passedSecurity

Install Threat Model

skills CLI
$ npx skills add pproenca/dot-skills --skill threat-model -a claude-code

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

GitHub CLI
$ gh skill install pproenca/dot-skills threat-model --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/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/threat-model .claude/skills/threat-model && 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
GitHub stars
214
Token cost
~1.7k tokens
SKILL.md length
550 words
Files
15 (incl. scripts, references)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase.

  • Works in 5 steps: Read methodology for the detailed… → Read output format for the document… → Consult attack patterns for… → …
  • Security review
  • SKILL.md covers When to Apply, Workflow Overview, How to Use and Analytical Techniques, plus 4 more sections
  • Runs Shell scripts from its folder

What it does

Threat Model is an agent skill from pproenca/dot-skills. Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase. Triggers on 'threat model', 'security review', 'attack surface', 'trust boundaries', or when assessing a project's security posture. Also trigger when the user is about to build security-sensitive features (auth, crypto, file I/O, network services, native bridges) and needs to understand the threat landscape first — even if they don't explicitly say "threat model." Also triggers on 'what changed' or 'diff analysis' for…

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 17 other files, including scripts and reference files (for example `config.json`, `gotchas.md` and `metadata.json`).

It sits in Security, covering Threat modeling. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • Security review
  • Trust boundaries
  • Assessing a projects security posture
  • The user is about to build security-sensitive features (auth

Example prompts

  • “threat model”
  • “security review”
  • “attack surface”
  • “/threat-model”

Requirements

  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Read methodology for the detailed approach at each phase
  2. Read output format for the document structure (6 sections)
  3. Consult attack patterns for technology-specific patterns
  4. Run scripts/trace-data-flows.sh to inventory entry points and sinks
  5. Optionally run scripts/scan-patterns.sh for security-relevant code patterns

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. 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 2 files in scripts/ (Shell), which the agent can run.

    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 loads about 1.7k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 144 tokens; SKILL.md has 550 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~144
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

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 pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 550 words, ~1,686 tokens.

Download SKILL.mdSave it as .claude/skills/threat-model/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
threat-model
description
Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase. Triggers on 'threat model', 'security review', 'attack surface', 'trust boundaries', or when assessing a project's security posture. Also trigger when the user is about to build security-sensitive features (auth, crypto, file I/O, network services, native bridges) and needs to understand the threat landscape first — even if they don't explicitly say "threat model." Also triggers on 'what changed' or 'diff analysis' for incremental security review of recent commits.

Threat Model

Produces structured, evidence-backed security threat models for any codebase. Goes beyond surface enumeration by tracing untrusted data through actual code paths, clustering findings by root cause, and constructing exploit chains that combine individual findings into higher-severity attack paths.

When to Apply

  • User asks to threat model, security review, or map attack surfaces for a codebase
  • Starting work on security-sensitive features (auth, crypto, file I/O, networking, native bridges)
  • Evaluating a new codebase or major architectural change for security implications
  • Reviewing a PR or recent commits for security regressions (incremental/diff mode)
  • After a security incident to reassess the threat landscape

Workflow Overview

Phase 0 (conditional): Diff Analysis — if git range provided, scope to changed code
Phase 1:  Codebase Survey        → Understand what the project is and does
Phase 2:  Component Mapping      → Identify components, data flows, and language bridges
Phase 3:  Asset Identification   → Determine what needs protecting
Phase 4:  Trust Boundaries       → Classify inputs by trust level, inventory entry points
Phase 5:  Data Flow Tracing      → Follow untrusted values from entry to sink ← key technique
Phase 6:  Attack Surface Enum    → Document surfaces with traced evidence
Phase 7:  Pattern Clustering     → Group 3+ similar findings by root cause
Phase 8:  Exploit Chains         → Combine findings into multi-step attack paths
Phase 9:  Calibration            → Rate with chain-adjusted and systemic severity
Phase 10: Output                 → Write structured THREAT-MODEL.md

How to Use

  1. Read methodology for the detailed approach at each phase
  2. Read output format for the document structure (6 sections)
  3. Consult attack patterns for technology-specific patterns
  4. Run scripts/trace-data-flows.sh <project-root> to inventory entry points and sinks
  5. Optionally run scripts/scan-patterns.sh <project-root> for security-relevant code patterns

Analytical Techniques

These techniques are the skill's core value — they encode analytical methods that produce findings the model wouldn't generate from general knowledge alone.

TechniqueWhen to ReadWhat It Adds
Data Flow TracingPhase 5 — alwaysTraces untrusted input from entry to sink through actual code. Produces evidence-backed findings instead of theoretical risks
Pattern ClusteringPhase 7 — after enumerationGroups related findings by root cause. Recommends systemic fixes instead of individual patches
Exploit ChainsPhase 8 — after clusteringCombines findings into multi-step attack paths rated by terminal impact
Bridge AnalysisPhase 6 — when FFI/bridges foundSystematic checklist for cross-language boundaries (Swift↔C, Rust↔C, Rails↔NGINX)
Diff AnalysisPhase 0 — for incremental reviewScopes analysis to changed code, identifies regressions

Key Principles

  • Evidence over speculation: Every finding should include a data flow trace showing how untrusted input reaches the vulnerable operation. "XSS is possible" is speculation. "RFC markdown → marked.parse() → innerHTML at line 917 with no sanitizer" is evidence.
  • Systemic over individual: When 3+ findings share a root cause, the systemic finding is more important than any individual finding. Fix the root cause, not the symptoms.
  • Chains over singletons: Rate combined attack paths by their terminal impact. Three medium findings that chain into critical impact are a critical finding.
  • Existing mitigations matter: Document what's already protected, not just what's missing.
  • Context-aware calibration: Severity depends on deployment context. Always include scope notes.
Show full SKILL.md (171 more words)Show less

Output

Produces two files (configurable via config.json):

  • findings.json — Structured, machine-readable findings. Source of truth. Consumed by threat-patch for automated remediation. Tracks finding state across runs (open → patched → verified → closed).
  • THREAT-MODEL.md — Human-readable view generated from findings.json. 6 sections: Overview, Trust Boundaries, Attack Surfaces, Systemic Findings, Exploit Chains, Criticality Calibration.
Pipeline Integration
threat-model → findings.json → threat-patch (consumes findings, generates fixes)
     ↑                                          ↓
     └── threat-model --diff (re-analyzes, updates finding status) ←── git commits

When findings.json exists from a prior run, the skill reads it to:

  • Track which findings are still open vs patched
  • Calibrate severity against prior ratings
  • Detect regressions (fixed findings that reappeared)

Two Modes

ModeTriggerWhat It Does
Full analysis"threat model this codebase"Analyzes entire codebase, produces fresh findings.json + THREAT-MODEL.md
Diff analysis"what changed since last review" / git range providedScopes to changed code, updates existing findings.json with new/resolved/regressed findings

Diff mode is the daily driver for ongoing projects. Full mode runs once (or periodically).

References

FileWhen to Read
references/methodology.mdBefore starting — the 10-phase workflow
references/output-format.mdWhen writing output — 6-section template
references/findings-schema.mdWhen writing findings.json — structured schema
references/attack-patterns.mdWhen enumerating surfaces — technology patterns
references/techniques/During specific phases — analytical techniques

© pproenca, 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 14 other files (scripts, references) in skills/.experimental/threat-model of pproenca/dot-skills.

  • SKILL.md
  • config.json
  • gotchas.md
  • metadata.json
  • references/attack-patterns.md
  • references/findings-schema.md
  • references/methodology.md
  • references/output-format.md
  • references/techniques/bridge-analysis.md
  • references/techniques/data-flow-tracing.md
  • references/techniques/diff-analysis.md
  • references/techniques/exploit-chains.md
  • references/techniques/pattern-clustering.md
  • scripts/scan-patterns.sh
  • scripts/trace-data-flows.sh

Open the folder on GitHubat commit cf93c57

Compare with similar skills

Threat Model 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Threat Model this skillpproenca/dot-skills214—~1.7kAutomated safety check: PassMIT
Fla Ascend Performancefla-org/flash-linear-attention5.8k—~5.6kAutomated safety check: PassMIT
Forensifyalexgreensh/repo-forensics187—~2.5kAutomated safety check: NotesCustom licence
Create Rulecartography-cncf/cartography4.1k—~3kAutomated safety check: PassApache-2.0
Commit Security Scancodexstar69/bug-hunter519—~629Automated safety check: PassMIT
Auditing Code For Vulnerabilitiestrilwu/secskills156—~3.2kAutomated safety check: PassMIT

Similar skills

  • Fla Ascend Performance

    fla-org/flash-linear-attention

    Guidelines for Ascend NPU kernel / Triton-Ascend backend performance work in the FLA repo.

    5.8k GitHub stars~5.6k tokensUpdated yesterday
    SecurityAuto-check passed
  • Forensify

    alexgreensh/repo-forensics

    Cross-agent self-inspection of your AI-agent stack. An agent skill from alexgreensh/repo-forensics.

    187 GitHub stars~2.5k tokensUpdated 10 days ago
    SecurityAuto-check: notes
  • Create Rule

    cartography-cncf/cartography

    Author a Cartography security rule (one or more Cypher Facts plus a Pydantic Finding output model) under cartography/rules/data/rules/.

    4.1k GitHub stars~3k tokensUpdated yesterday
    SecurityAuto-check passed
  • Commit Security Scan

    codexstar69/bug-hunter

    Scan code changes for security vulnerabilities using Bug Hunter-native artifacts and STRIDE context.

    519 GitHub stars~629 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    156 GitHub stars~3.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Audit Browser Security Boundaries

    nordstjernen-web/northstar-browser

    Audit browser-engine changes that process untrusted content or cross native-memory, origin, network, storage, extension, decoder, sandbox, or operating-system boundaries.

    112 GitHub stars~920 tokensUpdated yesterday
    SecurityAuto-check passed

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Threat Model

What does Threat Model do?

Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase. Threat Model is an agent skill from pproenca/dot-skills. Security threat modeling, attack surface mapping, and trust boundary analysis on a codebase.

When should I use Threat Model?

Threat Model fits situations like: security review; trust boundaries; assessing a projects security posture; the user is about to build security-sensitive features (auth.

How do I install Threat Model in Claude Code?

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

How do I install Threat Model in Codex?

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

Can I use Threat Model 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 pproenca/dot-skills --skill threat-model -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, .gemini/skills/threat-model, .github/skills/threat-model and .opencode/skills/threat-model in your project.

What does Threat Model need to run?

Going by SKILL.md and its folder, Threat Model needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Threat Model 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 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 use?

Threat Model 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 use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16k tokens, read only when the agent opens those files.

What are the alternatives to Threat Model?

Skills that share tags, products or a category with Threat Model: Fla Ascend Performance (fla-org/flash-linear-attention, 5.8k stars), Forensify (alexgreensh/repo-forensics, 187 stars), Create Rule (cartography-cncf/cartography, 4.1k stars) and Commit Security Scan (codexstar69/bug-hunter, 519 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Threat Model?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

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