threat-model-surface

threat-model-surface is a skill for Claude Code from alpha-omega-security/threat-model. It costs 134 tokens per session (3,063 once invoked), scanned A, original, MIT.

A security-analysis skill for examining one defined attack surface, meaning the parts of a system an attacker could reach. It reads the relevant code to document inputs, side effects, access conditions, and unsafe outputs.

In plain words
What is it for?
Use it to build input-trust tables, contract matrices, side-effect inventories, reachability requirements, and output-taint analysis for in-scope code.
Why use it?
It exposes trust assumptions and behavior that documentation alone may miss, helping produce a more complete threat model.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the threat-model plugin — 8 skills shipped together

Good fit Use it to build input-trust tables, contract matrices, side-effect inventories, reachability requirements, and output-taint analysis for in-scope code.

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

Made for: Claude Code.

Or install threat-model, the plugin that ships this one along with the rest of its 8 skills.

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-surface

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alpha-omega-security/threat-model/threat-model-surface"><img src="https://agentmods.dev/badge/skills/alpha-omega-security/threat-model/threat-model-surface.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,063 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 190
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
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.00134 $0.03063
Opus 5 $0.00067 $0.01532
Sonnet 5 $0.00027 $0.00613
Haiku 4.5 $0.00013 $0.00306

Measured 9d ago against content hash 0f79bc82c7de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

threat-model-surface 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 9d 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/threat-model-surface/SKILL.md · 194 lines

How it starts

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

Threat Model — Surface (deep pass on the in-scope surface)

Phase 3.3. The orient pass was minutes; this is hours, and that is expected. Three of the output's most valuable artifacts cannot be produced any other way:

  • the per-input-operand trust table (§1.7), which requires reading each in-scope entry point far enough to say which direct parameters and indirect inputs an attacker can reach and what the caller must enforce; and
  • the contract-dimension matrix (§1.7-§1.12), which prevents silence about failure behavior, representational limits, executable collaborators, object topology, and lifecycle edge cases from becoming downstream MODEL-GAP findings; and
  • the no-surprise side-effects inventory (§1.5) — negative claims about what the project does to its host that cannot be established by reading docs.

Read principles.md and the §1.5 / §1.7 / §1.8 specs in output-structure.md first.

Rules for keeping the cost bounded

  • Scope by the recon carve. Read only the entry points of in-model families. Do not read contrib/, examples, or out-of-scope families beyond confirming they are separable.
  • Read for contract, not for bugs. At each entry point the question is "which of these parameters can an attacker control, what kind of control is it, and what contract applies at edge conditions?" — not "is this code correct?" Record whether behavior is guaranteed, disclaimed, or unresolved; do not test whether the implementation satisfies it. The moment the reading turns into review, stop and move on.
  • Timebox per family. If a family's surface is too large to table in budget (e.g., a service with 100+ routes), table the highest-exposure subset, mark the remainder (inferred, QN) with a coverage note, and raise completing the table as an open question / follow-up — do not silently generalize.
  • Record hypotheses as you go, in draft form with provenance tags. Preserve documented provenance for explicit normative public contracts. Code, implementation comments, and tests that merely suggest an unwritten contract remain (inferred, QN) until a maintainer ratifies them.
  • Read code as a behavioural oracle, not just as a second-class doc. Mining comments and headers tells you what the project says; it cannot tell you where a guarantee stops. Every security-critical property needs its off-switches found by reading statements: the API call that relaxes a check, the flag that removes one, the mode that trades it for speed. Cite each as <file>:<line> at the statement that implements it. A comment describing the function does not qualify — the check that matters may have no comment at all, which is exactly why comment-harvesting misses it. These are easy to walk past because they are not input operands: no attacker-controlled parameter appears, so an input-shaped reading of the API sees nothing. They are property switches. Grep for names built on validate, undermine, relax, skip, permit, trust, unsafe, strict, and sane, then read what each one assigns.
  • Search the whole shipped build, not the files you happen to have open. Scope every switch hunt to the source set the supported build compiles — including the build scripts, which is where platform-conditional and default-on options live. A search restricted to the public header and one implementation file will miss a compile-time switch that replaces an entire function, and it will miss it silently.
  • Report a negative as a command plus its result, so the next reader can re-run it in one paste: grep -rn 'PATTERN' <file set>N hits, all in X. "I searched and found nothing" is not reviewable and has been wrong every time it has been checked.
  • Cite harder before tagging inferred. Before marking a row inferred, check the API docs, header comments, Javadoc/package-info, manpage, and README — a fact stated there is (documented, source), not inferred. Turning a false-inferred into a true-documented row is pure accuracy and directly reduces the escalation count.
  • Disclaim demonstrably-absent guarantees rather than leaving them open. When the reading shows a family makes no thread-safety, resource-bound, or failure-atomicity guarantee, that absence is verifiable — record the matrix row as disclaimed with (documented, source), routing to §1.12, not as unresolved. Reserve unresolved / inferred for dimensions where a guarantee plausibly exists but you could not confirm it. Where you must reason past the verifiable to a clear safe default, tag (assumption, QN) rather than (inferred, QN).

Read the full file on GitHub · 194 lines

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. 9d ago First seen · 194 lines · 134 tokens per session scan A 0f79bc82c7de

Subscribe to this mod's changes

threat-model-surface is a skill published in the GitHub repository alpha-omega-security/threat-model (54 stars, last pushed 21d ago), licensed MIT. It adds 134 tokens to every session and 3,063 once invoked, about $0.0007 per session on Opus 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.