Audit context building

From diegosouzapw/awesome-omni-skills · View interactive version

Audit context building is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skills. Deep Context Builder Skill (Ultra-Granular Pure Context Mode) workflow skill. Use this skill when the user needs Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding and the operator should preserve the upstream workflow, copied s

How to use this skill

Skill file

Deep Context Builder Skill (Ultra-Granular Pure Context Mode)

Overview

This public intake copy packages plugins/antigravity-awesome-skills-claude/skills/audit-context-building from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.

Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.

This intake keeps the copied upstream files intact and uses the external_source block in metadata.json plus ORIGIN.md as the provenance anchor for review.

Deep Context Builder Skill (Ultra-Granular Pure Context Mode)

Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: 1. Purpose, 2. How This Skill Behaves, Rationalizations (Do Not Skip), 3. Phase 1 — Initial Orientation (Bottom-Up Scan), 4. Phase 2 — Ultra-Granular Function Analysis (Default Mode), 5. Phase 3 — Global System Understanding.

When to Use This Skill

Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.

Operating Table

| Situation | Start here | Why it matters |

| --- | --- | --- |

| First-time use | metadata.json | Confirms repository, branch, commit, and imported path through the external_source block before touching the copied workflow |

| Provenance review | ORIGIN.md | Gives reviewers a plain-language audit trail for the imported source |

| Workflow execution | SKILL.md | Starts with the smallest copied file that materially changes execution |

| Supporting context | SKILL.md | Adds the next most relevant copied source file without loading the entire package |

| Handoff decision | ## Related Skills | Helps the operator switch to a stronger native skill when the task drifts |

Workflow

This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.

  1. Confirm the user goal, the scope of the imported workflow, and whether this skill is still the right router for the task.
  2. Read the overview and provenance files before loading any copied upstream support files.
  3. Load only the references, examples, prompts, or scripts that materially change the outcome for the current request.
  4. Execute the upstream workflow while keeping provenance and source boundaries explicit in the working notes.
  5. Validate the result against the upstream expectations and the evidence you can point to in the copied files.
  6. Escalate or hand off to a related skill when the work moves out of this imported workflow's center of gravity.
  7. Before merge or closure, record what was used, what changed, and what the reviewer still needs to verify.

Imported Workflow Notes

Imported: 1. Purpose

This skill governs how Claude thinks during the context-building phase of an audit.

When active, Claude will:

This skill defines a structured analysis format (see Example: Function Micro-Analysis below) and runs before the vulnerability-hunting phase.


Examples

Example 1: Ask for the upstream workflow directly

Use @audit-context-building to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.

Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.

Example 2: Ask for a provenance-grounded review

Review @audit-context-building against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.

Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.

Example 3: Narrow the copied support files before execution

Use @audit-context-building for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.

Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.

Example 4: Build a reviewer packet

Review @audit-context-building using the copied upstream files plus provenance, then summarize any gaps before merge.

Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.

Imported Usage Notes

Imported: 7. Subagent Usage

Claude may spawn subagents for:

Use the function-analyzer agent for per-function deep analysis.

It follows the full microstructure checklist, cross-function flow

rules, and quality thresholds defined in this skill, and enforces

the pure-context-building constraint.

Subagents must:


Best Practices

Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.

Imported Operating Notes

Imported: 6. Stability & Consistency Rules

(Anti-Hallucination, Anti-Contradiction)

Claude must:

When contradicted:

Summarize core:

Use:

instead of:

Connect new insights to previous state, flows, and invariants to maintain global coherence.


Troubleshooting

Problem: The operator skipped the imported context and answered too generically

Symptoms: The result ignores the upstream workflow in plugins/antigravity-awesome-skills-claude/skills/audit-context-building, fails to mention provenance, or does not use any copied source files at all.

Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Check the external_source block first, then restate the provenance before continuing.

Problem: The imported workflow feels incomplete during review

Symptoms: Reviewers can see the generated SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.

Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.

Problem: The task drifted into a different specialization

Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better.

Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.

Related Skills

Additional Resources

Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.

| Resource family | What it gives the reviewer | Example path |

| --- | --- | --- |

| references | copied reference notes, guides, or background material from upstream | references/n/a |

| examples | worked examples or reusable prompts copied from upstream | examples/n/a |

| scripts | upstream helper scripts that change execution or validation | scripts/n/a |

| agents | routing or delegation notes that are genuinely part of the imported package | agents/n/a |

| assets | supporting assets or schemas copied from the source package | assets/n/a |

Imported Reference Notes

Imported: 2. How This Skill Behaves

When active, Claude will:

Goal: deep, accurate understanding, not conclusions.


Imported: 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 |


Imported: 3. Phase 1 — Initial Orientation (Bottom-Up Scan)

Before deep analysis, Claude performs a minimal mapping:

  1. Identify major modules/files/contracts.
  2. Note obvious public/external entrypoints.
  3. Identify likely actors (users, owners, relayers, oracles, other contracts).
  4. Identify important storage variables, dicts, state structs, or cells.
  5. Build a preliminary structure without assuming behavior.

This establishes anchors for detailed analysis.


Imported: 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:

  1. Purpose
  1. Inputs & Assumptions
  1. Outputs & Effects
  1. Block-by-Block / Line-by-Line Analysis

For each logical block:

Apply per-block:


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

caller → callee → return → caller.

External Calls — Two Cases

Case A — External Call to a Contract Whose Code Exists in the Codebase

Treat as an internal call:

Case B — External Call Without Available Code (True External / Black Box)

Analyze as adversarial:

Continuity Rule

Treat the entire call chain as one continuous execution flow.

Never reset context.

All invariants, assumptions, and data dependencies must propagate across calls.


5.3 Complete Analysis Example

See FUNCTION_MICRO_ANALYSIS_EXAMPLE.md for a complete walkthrough demonstrating:

This example demonstrates the level of depth and structure required for all analyzed functions.


5.4 Output Requirements

When performing ultra-granular analysis, Claude MUST structure output following the format defined in OUTPUT_REQUIREMENTS.md.

Key requirements:

Quality thresholds:


5.5 Completeness Checklist

Before concluding micro-analysis of a function, verify against the COMPLETENESS_CHECKLIST.md:

Analysis is complete when all checklist items are satisfied and no unresolved "unclear" items remain.


Imported: 5. Phase 3 — Global System Understanding

After sufficient micro-analysis:

  1. State & Invariant Reconstruction
  1. Workflow Reconstruction
  1. Trust Boundary Mapping
  1. Complexity & Fragility Clustering

These clusters help guide the vulnerability-hunting phase.


Imported: 8. Relationship to Other Phases

This skill runs before:

It exists solely to build:


Imported: 9. Non-Goals

While active, Claude should NOT:

This is pure context building only.

Imported: Limitations
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.