Deep Context Builder Skill (Ultra-Granular Pure Context Mode)
1. Purpose
This skill governs how Claude thinks during the context-building phase of an audit.
When active, Claude will:
- Perform line-by-line / block-by-block code analysis by default.
- Apply First Principles, 5 Whys, and 5 Hows at micro scale.
- Continuously link insights → functions → modules → entire system.
- Maintain a stable, explicit mental model that evolves with new evidence.
- Identify invariants, assumptions, flows, and reasoning hazards.
This skill defines a structured analysis format (see Example: Function Micro-Analysis below) and runs before the vulnerability-hunting phase.
When to Use
Use when:
- Deep comprehension is needed before bug or vulnerability discovery.
- You want bottom-up understanding instead of high-level guessing.
- Reducing hallucinations, contradictions, and context loss is critical.
- Preparing for security auditing, architecture review, or threat modeling.
Do not use for:
- Vulnerability findings
- Fix recommendations
- Exploit reasoning
- Severity/impact rating
2. How This Skill Behaves
When active, Claude will:
- Default to ultra-granular analysis of each block and line.
- Apply micro-level First Principles, 5 Whys, and 5 Hows.
- Build and refine a persistent global mental model.
- Update earlier assumptions when contradicted ("Earlier I thought X; now Y.").
- Periodically anchor summaries to maintain stable context.
- Avoid speculation; express uncertainty explicitly when needed.
Goal: deep, accurate understanding, not conclusions.
Rationalizations (Do Not Skip)
| Rationalization |
Why It's Wrong |
Required Action |
| "I get the gist" |
Gist-level understanding misses edge cases |
Line-by-line analysis required |
| "This function is simple" |
Simple functions compose into complex bugs |
Apply 5 Whys anyway |
| "I'll remember this invariant" |
You won't. Context degrades. |
Write it down explicitly |
| "External call is probably fine" |
External = adversarial until proven otherwise |
Jump into code or model as hostile |
| "I can skip this helper" |
Helpers contain assumptions that propagate |
Trace the full call chain |
| "This is taking too long" |
Rushed context = hallucinated vulnerabilities later |
Slow is fast |
3. Phase 1 — Initial Orientation (Bottom-Up Scan)
Before deep analysis, Claude performs a minimal mapping:
- Identify major modules/files/contracts.
- Note obvious public/external entrypoints.
- Identify likely actors (users, owners, relayers, oracles, other contracts).
- Identify important storage variables, dicts, state structs, or cells.
- Build a preliminary structure without assuming behavior.
This establishes anchors for detailed analysis.
4. Phase 2 — Ultra-Granular Function Analysis (Default Mode)
Every non-trivial function receives full micro analysis.
5.1 Per-Function Microstructure Checklist
For each function:
Purpose
- Why the function exists and its role in the system.
Inputs & Assumptions
- Parameters and implicit inputs (state, sender, env).
- Preconditions and constraints.
Outputs & Effects
- Return values.
- State/storage writes.
- Events/messages.
- External interactions.
Block-by-Block / Line-by-Line Analysis
For each logical block:
- What it does.
- Why it appears here (ordering logic).
- What assumptions it relies on.
- What invariants it establishes or maintains.
- What later logic depends on it.
Apply per-block:
- First Principles
- 5 Whys
- 5 Hows
5.2 Cross-Function & External Flow Analysis
(Full Integration of Jump-Into-External-Code Rule)
When encountering calls, continue the same micro-first analysis across boundaries.
Internal Calls
- Jump into the callee immediately.
- Perform block-by-block analysis of relevant code.
- Track flow of data, assumptions, and invariants:
caller → callee → return → caller.
- Note if callee logic behaves differently in this specific call context.
External Calls — Two Cases
Case A — External Call to a Contract Whose Code Exists in the Codebase
Treat as an internal call:
- Jump into the target contract/function.
- Continue block-by-block micro-analysis.
- Propagate invariants and assumptions seamlessly.
- Consider edge cases based on the actual code, not a black-box guess.
Case B — External Call Without Available Code (True External / Black Box)
Analyze as adversarial:
- Describe payload/value/gas or parameters sent.
- Identify assumptions about the target.
- Consider all outcomes:
- revert
- incorrect/strange return values
- unexpected state changes
- misbehavior
- reentrancy (if applicable)
Continuity Rule
Treat the entire call chain as one continuous execution flow.
Never reset context.
All invariants, assumptions, and
1---2name: audit-context-building3description: Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding. 4category: Security & Systems5source: antigravity6tags: [claude, ai, agent, workflow, document, security, vulnerability, rag, cro]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/audit-context-building8metadata:9 source: https://skillmd.com/skills/sickn33/audit-context-building10---111213# Deep Context Builder Skill (Ultra-Granular Pure Context Mode)1415## 1. Purpose1617This skill governs **how Claude thinks** during the context-building phase of an audit.1819When active, Claude will:20- Perform **line-by-line / block-by-block** code analysis by default.21- Apply **First Principles**, **5 Whys**, and **5 Hows** at micro scale.22- Continuously link insights → functions → modules → entire system.23- Maintain a stable, explicit mental model that evolves with new evidence.24- Identify invariants, assumptions, flows, and reasoning hazards.2526This skill defines a structured analysis format (see Example: Function Micro-Analysis below) and runs **before** the vulnerability-hunting phase.2728---2930## When to Use31Use when:32- Deep comprehension is needed before bug or vulnerability discovery.33- You want bottom-up understanding instead of high-level guessing.34- Reducing hallucinations, contradictions, and context loss is critical.35- Preparing for security auditing, architecture review, or threat modeling.3637Do **not** use for:38- Vulnerability findings39- Fix recommendations40- Exploit reasoning41- Severity/impact rating4243---4445## 2. How This Skill Behaves4647When active, Claude will:48- Default to **ultra-granular analysis** of each block and line.49- Apply micro-level First Principles, 5 Whys, and 5 Hows.50- Build and refine a persistent global mental model.51- Update earlier assumptions when contradicted ("Earlier I thought X; now Y.").52- Periodically anchor summaries to maintain stable context.53- Avoid speculation; express uncertainty explicitly when needed.5455Goal: **deep, accurate understanding**, not conclusions.5657---5859## Rationalizations (Do Not Skip)6061| Rationalization | Why It's Wrong | Required Action |62|-----------------|----------------|-----------------|63| "I get the gist" | Gist-level understanding misses edge cases | Line-by-line analysis required |64| "This function is simple" | Simple functions compose into complex bugs | Apply 5 Whys anyway |65| "I'll remember this invariant" | You won't. Context degrades. | Write it down explicitly |66| "External call is probably fine" | External = adversarial until proven otherwise | Jump into code or model as hostile |67| "I can skip this helper" | Helpers contain assumptions that propagate | Trace the full call chain |68| "This is taking too long" | Rushed context = hallucinated vulnerabilities later | Slow is fast |6970---7172## 3. Phase 1 — Initial Orientation (Bottom-Up Scan)7374Before deep analysis, Claude performs a minimal mapping:75761. Identify major modules/files/contracts.772. Note obvious public/external entrypoints.783. Identify likely actors (users, owners, relayers, oracles, other contracts).794. Identify important storage variables, dicts, state structs, or cells.805. Build a preliminary structure without assuming behavior.8182This establishes anchors for detailed analysis.8384---8586## 4. Phase 2 — Ultra-Granular Function Analysis (Default Mode)8788Every non-trivial function receives full micro analysis.8990### 5.1 Per-Function Microstructure Checklist9192For each function:93941. **Purpose**95 - Why the function exists and its role in the system.96972. **Inputs & Assumptions**98 - Parameters and implicit inputs (state, sender, env).99 - Preconditions and constraints.1001013. **Outputs & Effects**102 - Return values.103 - State/storage writes.104 - Events/messages.105 - External interactions.1061074. **Block-by-Block / Line-by-Line Analysis**108 For each logical block:109 - What it does.110 - Why it appears here (ordering logic).111 - What assumptions it relies on.112 - What invariants it establishes or maintains.113 - What later logic depends on it.114115 Apply per-block:116 - **First Principles**117 - **5 Whys**118 - **5 Hows**119120---121122### 5.2 Cross-Function & External Flow Analysis123*(Full Integration of Jump-Into-External-Code Rule)*124125When encountering calls, **continue the same micro-first analysis across boundaries.**126127#### Internal Calls128- Jump into the callee immediately.129- Perform block-by-block analysis of relevant code.130- Track flow of data, assumptions, and invariants:131 caller → callee → return → caller.132- Note if callee logic behaves differently in this specific call context.133134#### External Calls — Two Cases135136**Case A — External Call to a Contract Whose Code Exists in the Codebase**137Treat as an internal call:138- Jump into the target contract/function.139- Continue block-by-block micro-analysis.140- Propagate invariants and assumptions seamlessly.141- Consider edge cases based on the *actual* code, not a black-box guess.142143**Case B — External Call Without Available Code (True External / Black Box)**144Analyze as adversarial:145- Describe payload/value/gas or parameters sent.146- Identify assumptions about the target.147- Consider all outcomes:148 - revert149 - incorrect/strange return values150 - unexpected state changes151 - misbehavior152 - reentrancy (if applicable)153154#### Continuity Rule155Treat the entire call chain as **one continuous execution flow**.156Never reset context.157All invariants, assumptions, and