Skip to content
SkillModel-led802 tokens in use

Audit Context Building

Builds an understanding of unfamiliar code before any bug hunt: what each function assumes, what it guarantees and what it depends on.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/audit-context-building/skills/audit-context-building
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Audit Context Building costs

56tokens idle
802tokens in use
4,711tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter12/15
  • Structure15/25
  • Examples3/15
  • Output15/15
  • Size15/15
  • Resources11/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Audit Context Building runs at the start of an audit, threat model or architecture review. It dispatches one subagent per function and collects compact records of what must always be true, what the function takes on faith and which calls it relies on.

The output is a dossier plus one file per function. It names no vulnerabilities and rates no severity. It marks assumptions that nothing in the code enforces and keeps an open questions list for the hunting phase.

What You Get

  • A dossier file with an index, rules that span several functions, who can reach what, and where complexity clusters
  • One record per function listing invariants with the line that shows them, assumptions with what establishes them, and calls with what each needs
  • A list of assumptions marked nothing found, where the code relies on something no code enforces
  • An open questions list to carry into the bug hunting phase

Common Use Cases

  • Starting an audit of unfamiliar smart contract or C code
  • Preparing a threat model before anyone looks for bugs
  • Revisiting findings nobody could judge because the system map was missing
  • Onboarding onto a service by mapping function contracts first

What Makes It Unique

It deliberately stops short of verdicts. The skill forbids naming vulnerabilities, suggesting fixes or rating severity, and requires every claim to cite a line or become an open question. When two records disagree, both are quoted side by side. The workflow forces subagents to return structured records, so analysis prose never floods the main context.

Under The Hood

The skill is a short instruction file that sends the work to a workflow command and a function analyzer subagent shipped in the same plugin. It lists Workflow, Task, Read, Grep and Glob as allowed tools. The subagents read the target source and write analysis files to disk under an audit-context folder, one dossier and one file per function. It does not run shell commands or reach the network. Format and domain notes are in resource files it links.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers