Skill and workflow that map a codebase function by function before an audit, recording what each assumes, promises and depends on.
How it works
Foe: Fog Wraith, missing facts, outdated docs or thin context.
Foes
- Fog WraithHaze Poison Ward Insight Flicker Pinned Enraged
Party · Context
- RogueYour agent100/100Haze Poison Ward Insight Flicker Pinned Enraged
- function-analyzerSubagent0/40Haze Poison Ward Insight Flicker Pinned Enraged
The Fog Wraith blocks the way.
What really happensIt stands for missing facts, outdated docs or thin context.
Rogue: Context 100/100.
The Fog Wraith breathes haze. Swings start to miss.
What really happensWithout current docs, the agent guesses at APIs that may have changed.
Rogue takes 8. Rogue: Context 92/100. Rogue: Haze.
The hero charts the keep's gates and who may pass them.
What really happensMap the system's parts, its entry points, who can reach them and the state kept between calls, then pick the functions that carry the most weight.
Fog Wraith takes 18.
A scribe visits each chamber and returns a short record.
What really happensOne helper per function writes its assumptions, guarantees and dependencies to audit-context/functions/ and hands back only a short record.
function-analyzer: Context 40/40.
The Fog Wraith lashes at function-analyzer.
What really happensThe subagent takes the hit in its own context. The main context stays clean.
function-analyzer takes 8. function-analyzer: Context 32/40. function-analyzer: Haze.
The summons work the problem, each in its own context.
What really happensEach subagent does its own model and tool work, apart from the main conversation.
Fog Wraith takes 9.
function-analyzer returns with a short report.
What really happensOnly the subagent's final summary comes back to the main agent.
Rogue takes 2. Rogue: Context 90/100. Rogue: Insight. function-analyzer returns.
Rules that span many rooms are bound into one dossier.
What really happensRules that hold across several functions are worked out and saved to audit-context/DOSSIER.md.
Fog Wraith takes 39.
The fog lifts from every door no guard watches.
What really happensYou get the assumptions nothing checks, each marked nothing found with the line where a check belongs, plus the open questions.
Fog Wraith takes 34. Fog Wraith falls.
The Fog Wraith falls.
Learn this spell
Claude Code
/plugin install trailofbits/skills/plugins/audit-context-buildingCodex
codex plugin marketplace add trailofbits/skills
codex plugin add audit-context-building@trailofbitsNotes
Version 2.0.2, by Omar Inuwa. Run /audit-context-building:audit-context <path>, or let the skill start it when an audit begins. Notes go to audit-context/functions/ and a summary to audit-context/DOSSIER.md. It reports no vulnerabilities and suggests no fixes, so pair it with a bug-hunting spell. The per-function fan-out uses Claude Code's Workflow tool. Codex: codex plugin marketplace add trailofbits/skills, then codex plugin add audit-context-building@trailofbits. Equippable in Claude Code trials.
This spell has no recorded sessions in the curator's logs. Tried it? Send a spell report.

