Trail of Bits/audit-context-building — Agent Skills | officialskills.sh
Back to skills

audit-context-building

officialsecurity

A structured analysis skill for the pre-audit phase of code review.

Setup & Installation

npx skills add https://github.com/trailofbits/skills --skill audit-context-building
or paste the link and ask your coding assistant to install it
https://github.com/trailofbits/skills/tree/main/plugins/audit-context-building
View on GitHub

What This Skill Does

A structured analysis skill for the pre-audit phase of code review. It guides Claude through line-by-line function analysis, cross-boundary call tracing, and invariant mapping before any vulnerability hunting begins. The output is a stable, evidence-based mental model of how the system actually works.

Manual pre-audit context building is inconsistent and often skips helper functions or external call edge cases, which is exactly where assumptions propagate into bugs — this skill enforces a repeatable checklist that prevents that.

When to use it

  • Mapping data flow across internal and external contract calls before starting a security audit
  • Tracing state variable reads and writes across a multi-module codebase
  • Documenting per-function preconditions and invariants for a DEX or lending protocol
  • Building a trust boundary map showing which actors can reach which entrypoints
  • Running a completeness check on function analysis to meet minimum invariant and assumption thresholds