pre-audit-threat-model

pre-audit-threat-model is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 80 tokens per session (1,516 once invoked), scanned A, original, MIT.

A first-pass threat model for a new Solidity project. Solidity is a programming language commonly used for Ethereum smart contracts.

In plain words
What is it for?
It is for preparing a Solidity audit by listing permissionless functions, privileged roles, source and test files, and stated invariants. It also records available fuzzing, invariant-testing, and fork-test setup.
Why use it?
Starting with tools can miss important entry points, roles, and intended safety rules. This pass creates a map of who can call what and which program invariants the audit should check.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Good fit It is for preparing a Solidity audit by listing permissionless functions, privileged roles, source and test files, and stated invariants. It also records available fuzzing, invariant-testing, and fork-test setup.

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

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 pre-audit-threat-model

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/pre-audit-threat-model"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/pre-audit-threat-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,516 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.00080 $0.01516
Opus 5.5 $0.00032 $0.00606
Sonnet 5.5 $0.00016 $0.00303
Haiku 4.5 $0.00008 $0.00152

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

Security

Grade A, and why

pre-audit-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 1mo 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.

.agents/skills/pre-audit-threat-model/SKILL.md · 107 lines

How it starts

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

pre-audit-threat-model

Audit-readiness x-ray. Build the threat model BEFORE running any tooling so every later pass has an entry-point list, an actor map, and a stated invariant set to evaluate against.

When to use

  • First skill on any new Solidity engagement. Always.
  • Operator says "x-ray", "audit readiness", "prep this protocol", "summarize this protocol", or "where do I start".
  • Re-run when the codebase changes meaningfully (new contract, new role, new external integration); the cached x-ray.md is otherwise the source of truth.

Pipeline (3 steps, sequential)

Step 1 — Enumerate and measure

  1. Detect source dir: read foundry.toml src= first, else hardhat.config.*, else try src/ then contracts/.
  2. Count: source files, nSLOC (no ~ prefix in the report), test files, test functions, stateful-fuzz files, foundry-invariant files, echidna/medusa/halmos/certora configs, fork tests. These signal test presence — never infer "no tests" from coverage tool failure.
  3. Run coverage in background (forge coverage, or a project-local hardhat coverage only if the project already has Hardhat installed — never npx-fetch a remote tool). If the toolchain is missing, surface the failure reason and continue — coverage is not a gate.
  4. Run a git-security scan: branch shape (linear / merged / squashed-import), fix-commit candidates (commits whose message matches fix|patch|vuln|exploit|audit), late changes (commits in the final 10% of history), forked deps, tech-debt markers (TODO/FIXME density), test co-change rate per source file.
  5. Glob for spec/whitepaper docs and extract only stated invariants, actor definitions, trust assumptions, economic properties. Tag spec-derived claims (per spec) so auditors can tell code-verified from spec-stated.

Step 2 — Read source and classify entry points

  1. Read every in-scope .sol. Skip interfaces/, vendored copies of OZ/Uniswap libs, tests/mocks. For each contract record: type & inheritance, roles & access control, value-holding state vars, external calls, fund flows, invariant comments, require/assert statements.
  2. Entry-point grep gate (PCRE — Bash, not the Grep tool):
    # single-line signatures
    grep -rnP 'function\s+\w+\s*\([^)]*\)\s+(external|public)(?!.*\b(view|pure)\b)' src/ --include='*.sol'
    # multi-line signatures (visibility on closing-paren line)
    grep -rnP '^\s*\)\s+(external|public)(?!.*\b(view|pure)\b)' src/ --include='*.sol' -B5
    
  3. Classify EACH grep hit by reading its body: permissionless (no modifier AND no internal msg.sender check), role-gated (modifier or internal restriction — acceptOwnership style counts), or admin-only. nonReentrant alone is NOT access control. The grep list is the source of truth — subagent summaries lose.
  4. Centralization analysis per privileged role: enumerate operational actions, distinguish role-transfer delays from action delays, mark which actions can extract user funds.
  5. Pause-coverage analysis: which critical functions are whenNotPaused, which aren't. Integrate gaps into the relevant role's attack surface — do NOT make a standalone "Centralization Risks" section (that duplicates Actors / Trust Boundaries / Attack Surfaces).

Read the full file on GitHub · 107 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. 1mo ago First seen · 107 lines · 80 tokens per session scan A d65e517859f2

Subscribe to this mod's changes

pre-audit-threat-model is a skill published in the GitHub repository mtarcure/claude-vibe-squad (165 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 1,516 once invoked, about $0.0003 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-09-19.