audit-context-building

Build line-by-line code context for smart contract security audits.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill audit-context-building-kennyolofsson23-netizen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: audit-context-building
Source: https://github.com/kennyolofsson23-netizen/claude-code-config/tree/main/skills/audit-context-building
Command: npx skills add https://github.com/kennyolofsson23-netizen/claude-code-config --skill audit-context-building-kennyolofsson23-netizen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers and auditors often lose critical details when jumping straight to vulnerability hunting, leading to hallucinations, missed invariants, and inconsistent reasoning. This skill supplies a systematic, line‑by‑line context‑building process that preserves a stable mental model of the codebase before any security analysis.

Core Features & Use Cases

  • Micro‑level analysis: Breaks every function into purpose, inputs, outputs, block‑by‑block reasoning, and cross‑function dependencies.
  • Structured checklists: Enforces invariants, assumptions, first‑principles, and 5 Whys/5 Hows for each code segment.
  • Cross‑function flow: Jumps into internal and available external code, treating the entire call chain as a continuous execution flow.
  • Sub‑agent orchestration: Allows spawning dedicated analyzers for dense functions, cryptographic logic, or state‑machine workflows.
  • Use case: Before auditing a DeFi smart‑contract suite, run this skill to map every function, state variable, and external call, producing a comprehensive context report that guides later vulnerability hunting.

Quick Start

Ask the audit-context-building skill to analyze the target contract file and produce a detailed line‑by‑line context report.

Frequently Asked Questions about audit-context-building

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build code context for smart contract security audits?▼

Build smart contract audit context by analyzing source files line-by-line to map functions, invariants, and data flows. This structured pre-vulnerability process breaks down every function into purpose, inputs, outputs, and block-by-block reasoning to prevent missed invariants.

Why does jumping straight to vulnerability hunting cause hallucinations in code analysis?▼

Skipping context building in code analysis causes hallucinations and missed invariants because auditors lose critical details without a stable mental model. A systematic line-by-line pre-analysis phase mapping cross-function dependencies preserves reasoning consistency before vulnerability hunting.

Can I use this line-by-line context building for cross-function dependency tracking in DeFi protocols?▼

Yes, line-by-line context building supports DeFi protocols by tracking cross-function data flows and treating internal and external calls as a continuous execution flow. It maps every state variable, external call, and invariant across smart contract modules.

What's the best way to map invariants and assumptions before auditing a smart contract?▼

The best way to map invariants before auditing is applying structured checklists that enforce assumptions, first-principles, and 5 Whys/5 Hows analysis for each code segment. This micro-analysis format tracks dependencies across functions to ensure comprehensive coverage.

Does this code analysis approach work with dense functions and cryptographic logic?▼

Yes, the context building approach handles dense functions and cryptographic logic by allowing sub-agent orchestration. It spawns dedicated analyzers for complex state-machine workflows and dense code segments to maintain granular analysis depth.

When should I not use line-by-line context building for code audits?▼

Line-by-line context building is not suitable when you lack access to source files or need rapid preliminary vulnerability scanning. It is a deep pre-vulnerability phase tool designed for thorough mapping rather than quick automated checks or surface-level reviews.