Skip to main content
skill CX Codex

deep-dive · zaxbyhub — Claude Code skill for code audits and setup

deep-dive audits a selected part of a codebase without editing source files. Use it to investigate several aspects of a project and review evidence-backed findings.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill deep-dive -a claude-code
Open on GitHub

What deep-dive does

The skill examines a chosen codebase scope in read-only mode. It maps relevant files and dependencies, then sends parallel waves of explorers to inspect them. Findings are collected as candidates with severity levels and supporting evidence.

The protocol assigns two independent reviewers, followed by a sequential critic challenge for HIGH and CRITICAL findings. It does not delegate work to a coder or modify source code. A dirty working tree requires user approval before the audit proceeds; switching to main for an update also requires confirmation when the current branch is different.

What it helps with

  • audit a codebase area without changing source files
  • trace data flow and module boundaries
  • spot gaps in tests or error handling
  • check audit findings against source evidence

Example prompts for the agent

  • Run a read-only deep audit of the authentication area.
  • Inspect the payment flow for data-handling issues and test gaps.
  • Audit the architecture of src/hooks/ and report evidence-backed findings.

How to install deep-dive

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill deep-dive -a claude-code

2Manually: put the files in place

~/.claude/skills/deep-dive/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/deep-dive/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about deep-dive

How do I install deep-dive in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill deep-dive -a claude-code. The skill file is at ~/.claude/skills/deep-dive/SKILL.md.

What does deep-dive do?

It audits a selected codebase scope through parallel explorer waves and independent review. The process is read-only, with an extra critic challenge for HIGH and CRITICAL findings.

Does deep-dive modify project files?

No. Its audit protocol does not change source code or delegate work to a coder. If the working tree is dirty, it asks before proceeding.

Source text

SKILL.md · MIT
---
name: deep-dive
description: >
  Full execution protocol for MODE: DEEP_DIVE — read-only codebase audit with
  parallel explorer waves, 2 independent reviewers, and sequential critic
  challenge for HIGH/CRITICAL findings. Loaded on demand by the architect when
  the deep-dive command emits a [MODE: DEEP_DIVE ...] signal.
metadata:
  audience: swarm-plugin
---

# Deep Dive Audit Protocol

Read-only deep audit of a specified codebase scope using parallel explorer waves, always 2 parallel reviewers, and sequential critic challenge. This mode does NOT mutate source code, does NOT delegate to coder, and does NOT call declare_scope.

## Graph-first evidence contract

Use `repo_map` `graph_health` and boundary discovery before a targeted source-bearing `context_pack`; existing `ask`, `key_files`, and `localization` remain discovery inputs, and `repo_map action="retrieve"` adds one bounded mixed pass routing across ask, symbols, callers, impact, routes, data, preflight, tests, diffs, and explanations — it does not replace explicit `key_files` or `localization` discovery. Graph evidence is advisory only. If freshness is stale or inconclusive, confidence is low, source is missing, the language is unsupported/dynamic, the graph is absent, or an action fails, inspect the direct source and searches before reporting a finding.

### MODE: DEEP_DIVE

## Step 0 — Parse Header

Parse the MODE: DEEP_DIVE header to extract:
- `scope`: the codebase area to audit (e.g., "auth", "payment flow", "src/hooks/")
- `profile`: one of standard | security | ux | architecture | full (default: standard)
- `max_explorers`: integer 1..8 — upper bound on explorer waves (default: 6, or 8 for full profile). This is a CAP, not a fixed count: scale the actual wave size to the resolved scope surface — a trivial scope needs 1–2 explorers, a typical scope 3–5, a large multi-module scope up to the cap — never fix the count in advance.
- `output`: markdown | json (default: markdown)
- `update_main`: boolean (default: true) — whether to fetch/ff-only main before starting
- `allow_dirty`: boolean (default: false) — whether to proceed with uncommitted changes

If the header is malformed or missing required fields, report the error and stop.

## Step 1 — Repo Readiness

1. Check git working tree status. If dirty and `allow_dirty` is false, warn the user and ask whether to proceed. Do NOT proceed automatically.
2. If `update_main` is true and tree is clean: check current branch. If not on `main`, report current branch to user and ASK FOR CONFIRMATION before switching. Only after explicit user approval: `git fetch origin main && git checkout main && git merge --ff-only origin/main`. If ff-only fails, warn the user and ask before proceeding.
3. Record the current HEAD commit hash for the report.

## Step 2 — Scope Resolution

Use the following tools to map the audit scope:
1. `repo_map` with action "graph_health" — only if the graph is missing or incomplete (stale beyond the refresh cap, extraction failures) run `repo_map` with action "build"; plugin init and the session-start probe keep the graph fresh otherwise
2. `repo_map` with action "ask" (the audit scope as the question) and action "key_files" to rank scope-relevant files and repo hubs before any manual symbol walk
3. `repo_map` with action "localization" for the scope target
4. `symbols` and `batch_symbols` on key files identified by ask or localization
5. `imports` to trace dependency boundaries
6. `doc_scan` if documentation coverage is relevant
7. `knowledge_recall` with query matching the scope domain

Produce a SCOPE MAP: list of files, modules, and interfaces within the audit boundary. Cap at 50 files total.

## Step 3 — Explorer Missions (Parallel Waves)

Dispatch explorer waves with `dispatch_lanes_async` when available. Each wave contains up to `max_explorers` missions. Before the first dispatch, verify from the session's actual tool list whether the controller's lane tools are present; when they are absent, use the native parallel subagent path from the start rather than discovering the gap on first failure.

**File caps per mission:**
- 8 files maximum per mission
- ~3500 total lines across all files in a mission
- Group files by import proximity (files that import each other go in the same mission)

**Partition is the contract:** missions own non-overlapping file sets — no file appears in two missions — and the union of all missions must cover every file in the Step 2 scope map. Any scope-map file not assigned to a mission is an explicit coverage gap, not an optional skip.

**Profile-based lane selection — each profile activates specific lanes:**

| Lane | Template | standard | security | ux | architecture | full |
|------|----------|----------|----------|----|-------------|------|
| SCOPE_MAP | Map structure, exports, boundaries | ✓ | ✓ | ✓ | ✓ | ✓ |
| WIRING_DATAFLOW | Trace data flow, API contracts, state propagation | ✓ | ✓ | | ✓ | ✓ |
| RUNTIME_BEHAVIOR | Error handling, edge cases, lifecycle, async patterns | ✓ | | | ✓ | ✓ |
| UX_FLOW | User-facing behavior, accessibility, responsiveness | | | ✓ | | ✓ |
| SECURITY_TRUST | Auth boundaries, input validation, trust transitions | | ✓ | | | ✓ |
| TEST_COVERAGE | Coverage gaps, flaky tests, missing assertions | ✓ | | | | ✓ |
| PERFORMANCE_RELIABILITY | Resource leaks, N+1 queries, race conditions | | | | ✓ | ✓ |
| DOCS_CONFIG_DEPLOYMENT | Config consistency, docs accuracy, deployment drift | | | | | ✓ |

Each explorer mission receives:
- Lane template name and description
- Assigned files (8 max, grouped by import proximity)
- The scope map context from Step 2
- Instruction: "You are performing a [LANE] audit. Report ALL findings as pipe-delimited [CANDIDATE] rows. Header row first, then one row per finding:

[CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence

- candidate_id: unique within this lane (e.g. C-001, C-002)
- severity: INFO | LOW | MEDIUM | HIGH | CRITICAL
- confidence: LOW | MEDIUM | HIGH
- If you find zero issues, emit the header row with no data rows.
- Do NOT emit findings as prose or free text — the downstream parser requires pipe-delimited rows."

Explorer missions are dispatched in parallel waves. Launch the wave promptly — do not accumulate extensive planning prose before the call, or output truncation may swallow the tool call itself. Launch the wave, record the returned `batch_id`, then continue deterministic architect work that does not depend on lane output: refine the scope map, build the candidate ledger shell, inspect local evidence with read-only tools, and prepare reviewer shard structure. Do not synthesize findings from running lanes. Keep each lane `prompt` compact: send shared context ONCE via the `common_prompt` field, or have lanes read it from a file by absolute path, instead of inlining the same large blob into every lane prompt — oversized inline prompts produce malformed or truncated tool-call JSON.

**Incremental collection pattern:** While lanes are running, use `collect_lane_results` without `wait` (or `wait: false`) to poll progress. Process any settled lanes immediately — extract candidates, check `output_ref`, update the candidate ledger — while continuing independent architect work (scope refinement, local evidence reads, reviewer preparation) between polls. This avoids idle waiting and lets you pipeline candidate normalization with lane completion. Only use `wait: true` at the Step 4 boundary if lanes are still pending and no more independent work remains.

At the Step 4 boundary, all lanes must be settled before proceeding. If non-blocking polls show lanes still running and you have exhausted independent work, call `collect_lane_results` with `wait: true` to block on the remaining lanes. **COVERAGE GATE:** Every lane must produce validated candidate output before proceeding. Missing, stale, cancelled, or failed lanes are coverage gaps that must be closed — not documented and skipped. If a lane fails: (1) retry max 2 times with materially different parameters; (2) if retries fail, deploy an equivalent alternative (same agent type, same prompt, same scope, same isolation — different dispatch mechanism acceptable when verified, including Task-tool dispatch as the final fallback when lane tools do not work); (3) if no equivalent exists, stop and surface the lane failure to the user as BLOCKED. Do not proceed past a required lane with unclosed coverage or produce a degraded review.

When a collected or blocking lane result includes `output_ref`, treat `output` as a preview and call `retrieve_lane_output` before extracting candidate findings or declaring a lane clean. If the result is `output_degraded`, `transcript_incomplete`, truncated without a usable ref, missing, stale, cancelled, or failed — or if the lane reports `status: completed` but `parse_lane_candidates` returns 0 candidates (Mode B: intermediate reasoning only) — apply the COVERAGE GATE: retry, deploy equivalent including Task-tool dispatch as the final fallback when lane tools do not work, or stop and surface the lane failure to the user as BLOCKED. Do not mark findings/coverage UNVERIFIED to proceed past the gap.

Explorers generate CANDIDATE FINDINGS only — they do NOT make verdicts. All findings are unverified until Step 5.

## Step 4 — Normalize Candidates

1. Collect all candidate findings from all explorer missions.
2. Deduplicate: merge findings that reference the same location and issue.
3. Assign DD-C001 through DD-CNNN identifiers to unique findings.
4. Sort candidates by severity (CRITICAL → HIGH → MEDIUM → LOW → INFO).
5. Shard into ≤10-candidate shards until all candidates are assigned to a shard.

## Step 5 — Always 2 Parallel Reviewers

Split the candidates into shards of ≤10 each and dispatch 2 parallel `the active swarm's reviewer agent` calls.

Each reviewer receives:
- Their shard of candidates (up to 10)
- The scope map context
- The original scope description
- Instruction: "Verify or reject each candidate finding. For each: verdict (VERIFIED / REJECTED / NEEDS_MORE_EVIDENCE), confidence (0-1), and brief reasoning."

Reviewers MUST NOT suggest fixes — they verify findings only.

## Step 5b — Reviewer Merge/Dedup

After both reviewers return, perform a lightweight sync pass:
1. Cross-reference findings between reviewers — flag correlations
2. Deduplicate any findings both reviewers verified independently
3. For NEEDS_MORE_EVIDENCE findings: if the other reviewer verified a related finding, merge
4. Produce a unified findings list with verified/rejected status

## Step 6 — Critic Challenge (HIGH/CRITICAL only)

For verified findings rated HIGH or CRITICAL, dispatch sequential critic passes:

**Pass 1 — False-positive / root-cause challenge:**
- `the active swarm's critic agent` receives each HIGH/CRITICAL finding
- Challenge: "Is this a false positive? Is the root cause correctly identified? Provide verdict: SURVIVES / DOWNGRADE / REJECT"
- Only findings that SURVIVE proceed to Pass 2

**Pass 2 — Impact / severity challenge:**
- `the active swarm's critic agent` receives surviving findings
- Challenge: "Is the severity correctly rated? Could this be lower impact than claimed? Provide verdict: SURVIVES / DOWNGRADE / REJECT"
- Final severity is the critic's assessed severity

CRITICAL: Do NOT challenge MEDIUM/LOW/INFO findings. Only HIGH and CRITICAL go through critic review.

## Step 7 — Final Report

Assemble and present the audit report:

1. **Wiring Map**: Visual summary of the scope's module structure and data flow
2. **Functionality Assessment**: High-level summary of what the scope does and how well
3. **Verified Findings Table**: DD-ID, severity, location, description, evidence
4. **Rejected Candidates**: Brief list with rejection reasons
5. **Enhancements**: Non-blocking improvement suggestions
6. **Recommended Implementation Phases**: If findings suggest follow-up work, outline phases
7. **JSON Block** (when output=json): Structured machine-readable findings

## Important Constraints

- Do NOT mutate source code under any circumstances
- Do NOT delegate to coder
- Do NOT call declare_scope
- Do NOT create or modify any files outside .swarm/
- No final finding may appear in the report without reviewer verification
- Explorers generate candidate findings only — reviewers verify or reject
- Critics challenge only HIGH/CRITICAL findings — do NOT waste cycles on lower severity

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Code review and refactoring →

deep-dive by other authors comes first.

deep-dive akillness deep-dive — a two-stage skill: three parallel lanes trace why something broke, then a requirements interview starts from those findings. Built for bugs and changes in code you don't know yet. CX Codex +1 177installs deep-dive rohitg00 deep-dive runs multi-step deep research in Claude Code using DAG query planning, parallel subagents, and gap iteration without external APIs. CX Codex +1 ★ 2,858repo stars deep-security-scan official openai deep-security-scan is a Claude Code skill that runs deep, multi-pass repository security audits, combining findings until consecutive scans reveal nothing new. CX Codex +1 127installs firecrawl-migration-deep-dive Jeremy Longshore The firecrawl-migration-deep-dive skill guides a move from Puppeteer, Playwright, Cheerio, or another scraper to Firecrawl v2, with checks for parity, policy, spend, and rollback. CX Codex +1 1installs ghost-validate ghostsecurity ghost-validate validates security vulnerability findings by tracing code paths and checking live endpoints. Separates true positive security bugs from scanner false positives. CX Codex +1 4,200installs code-auditor mhattingpete code-auditor walks a repository through architecture, code quality, security, performance, testing and maintainability, then hands back a report. Useful when you inherit code and need to know what hurts. CX Codex +1 344installs Finding Deep Verifier microsoft Finding Deep Verifier is a Claude Code subagent that re-checks FAIL and PARTIAL findings in security reviews, seeks code evidence for and against each, and rules on it. CX Codex +1 ★ 1,627repo stars Animation Principles - Deep Dive dylantarre Animation Principles - Deep Dive — a reference skill covering Disney's 12 animation principles with technical detail: deformation ratios, frame counts, arcs, follow through. Useful when the agent needs animation context. CX Codex +1 560installs

From the same set121

The whole set →
ci-fixer ci-fixer is a Claude Code subagent that diagnoses and remediates GitHub Actions pipeline failures layer by layer in opencode-swarm. CX Codex +1 ★ 539repo stars ci-fix-monitor The ci-fix-monitor skill checks a PR’s CI results, diagnoses failed checks from their logs, and guides fixes and another push. Use it when a PR has red checks. CX Codex +1 ★ 539repo stars issue-tracer2 issue-tracer2 pulls in a GitHub Issue, works through a chain of hypotheses to pin down the root cause, and carries the fix through to tests and a PR. CX Codex +1 ★ 539repo stars issue-ingest issue-ingest pulls a GitHub issue, locates the likely cause in the codebase, and writes a resolution spec. Triggered with /swarm issue <url>. CX Codex +1 ★ 539repo stars guardrail-patterns guardrail-patterns — a skill for opencode-swarm that maps how the guard blocks inside checkDestructiveCommand() are built, and what breaks when you edit them. CX Codex +1 ★ 539repo stars swarm Enables a multi-agent swarm workflow in the active session, running parallel subagents, independent review validation, and critic checks. CX Codex +1 ★ 539repo stars loop The loop skill takes a task through planning, implementation, review, and improvement while keeping run state on disk. Use it for gated, repeatable work toward a defined objective. CX Codex +1 ★ 539repo stars running-tests Sets the rules for running tests in opencode-swarm: when a shell bun call is enough, when to reach for test_runner, and how to keep the session from stalling. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open