audit-context-building — Claude Code skill: how to install
Maps assumptions, guarantees, and call chains in unfamiliar source code before vulnerability hunting starts. Useful for audits and threat modeling.
npx skills add trailofbits/skills --skill audit-context-building -a claude-codeWhat audit-context-building does
This skill maps how functions behave before anyone starts hunting for bugs. It does not rate vulnerabilities, write exploit code, or suggest patches. Instead, it tracks what every routine assumes to be true, what guarantees it provides, and which outside functions it calls. When an assumption lacks any enforcement in the code, the record tags it as nothing found.
Context windows fill up fast. Because of that, the skill runs analysis through subagents rather than keeping entire call trees in the main chat. Running /audit-context-building:audit-context <path> inspects each function independently, saving structured notes to audit-context/functions/ and a summary to audit-context/DOSSIER.md. For a single target, it routes work to audit-context-building:function-analyzer.
Running this on code you already know wastes tokens. It works best on fresh targets where the team needs an honest list of unverified assumptions before running security passes.
What it helps with
- map function assumptions and invariants before vulnerability hunting
- spot unchecked premises marked with nothing found
- generate architectural dossiers for unfamiliar codebases
- document unresolved call interactions and open questions
Example prompts for the agent
- /audit-context-building:audit-context ./src
- Analyze this function with audit-context-building:function-analyzer
- /audit-context-building:audit-context contracts/
How to install audit-context-building
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill audit-context-building -a claude-code2Manually: put the files in place
~/.claude/skills/audit-context-building/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/audit-context-building/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill audit-context-building -a codex2Manually: put the files in place
.agents/skills/audit-context-building/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill audit-context-building -a cursor2Manually: put the files in place
.cursor/skills/audit-context-building/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install trailofbits/skills audit-context-building2Manually: put the files in place
.github/skills/audit-context-building/SKILL.md1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill audit-context-building -a gemini-cli2Platform CLI
gemini skills install https://github.com/trailofbits/skills --path plugins/audit-context-building/skills/audit-context-buildingManually: put the files in place
.devin/skills/audit-context-building/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add trailofbits/skills --skill audit-context-building -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about audit-context-building
How do I install audit-context-building in Claude Code?
Run npx skills add trailofbits/skills --skill audit-context-building -a claude-code in your terminal.
What does audit-context-building do?
It maps out call dependencies, function guarantees, and unenforced assumptions across unfamiliar code to prepare the ground for a separate vulnerability assessment.
Does this skill flag security vulnerabilities?
No, it avoids naming vulnerabilities or rating severity. The goal is gathering verified facts and open questions before bug hunting begins.