wjgoarxiv/antigravity-swarm/debugging

Claude Code and agent skill by wjgoarxiv/antigravity-swarm

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Fix a bug: reproduce it, test several hypotheses, isolate the cause, lock it with a failing test, then verify on the real surface.

Install

npx vskill@latest install wjgoarxiv/antigravity-swarm/debugging

SKILL.md

debugging

A bug is fixed when the surface that showed it behaves correctly and a test fails without the fix in place. This skill walks from symptom to that state through a hypothesis loop, and every step leaves a file in the evidence folder.

Two disciplines hold for every language, every runtime, and whether or not you have source:

  1. Runtime truth beats code reading. Every claim about why the bug happens rests on an observed value, read from the running system. A plausible story built by reading code is a hypothesis, and a hypothesis is not a cause.
  2. Leave only the fix behind. Debugging creates artifacts: log lines, breakpoints, scratch scripts, env overrides, proxies, patched files. Write each one into a journal before you create it, and remove it before you call the task done.

This file is the map. The procedure, the per-runtime recipes and the specialist tools live in references/, and those files are part of the skill. Read the one that matches the phase or runtime you are entering, in this session, before you run a command from its domain.

When this applies

  • A test fails, a command exits non-zero, a page renders wrong, a process hangs, output is silently empty, a request returns 200 with an empty body, or timing differs between runs.
  • The user says "debug", "why does X fail", "this broke after Y", "trace this", "attach a debugger", "set a breakpoint", "reverse engineer this binary", "inspect the bundle", or "reproduce and fix".
  • A lit route (lit-loop, litwork, start-work) hits an unexplained failure mid-task. Read ../debugging/SKILL.md with read_file from the calling skill's folder, finish the loop, then return to the route that called you.
  • The target is a binary without trustworthy source (a closed library, a vendored artifact, a CTF challenge, firmware, a packaged app), where static plus dynamic analysis stands in for reading source.

For a known one-line typo with an obvious fix, a full loop is overhead. Fix it, run the failing command, record the output, stop.

Inputs and state

  • The symptom in the user's words plus the exact failing command, URL, or input. When either is missing, derive it from the repo (the test script, the README) before you ask.
  • A slug for this bug, such as null-config-crash. Evidence goes to .litgravity/evidence/<slug>/; the journal is .debug-journal.md at the repo root, or inside the evidence folder when the repo must stay clean, and it is listed for removal at cleanup.
  • A goal record in .litgravity/goals/<slug>.json, when one exists: attach the fix as evidence on the matching criterion.
  • The active ledger .litgravity/ledger/<conversation-id>.jsonl: recent tool events show the last edits before the break, which are the first suspects. The activation note names the active route and the ledger path.
  • AGENTS.md and the package scripts name the test runner, the lint gate and the type gate. Run those commands, not guesses.
  • The runtime. Identify it before anything else (see the runtime table below); the matching reference is required reading before you attach or launch anything.
  • Diagnostics come from the command line, not from a language-server tool. Run tsc --noEmit, pyright --outputjson, ruff check, go vet, or cargo check --message-format=json through run_command. The lsp skill (read_file on ../lsp/SKILL.md) owns the language-server surface; read it when type or lint output is the main evidence.
  • Supporting files sit in this SKILL.md's folder (the activation note gives its absolute path) and are read on demand with read_file: the phase procedures under references/methodology/ (named in the phase table below), one runtime recipe per language under references/runtimes/, and one specialist-tool recipe each under references/tools/. references/methodology/partial-runtime-evidence.md covers the case where the real operation cannot run, plus a late skeptical review for extraction and audit work.

The reference gate

Most of what you need lives in references/. Skim this file and start working, and you will attach a debugger the wrong way, miss a silent-failure pattern you have not seen, lose an hour to a source-map gotcha, or reinvent a worse version of a tool that already solves the problem.

Gate rule: before you run a command from a reference's domain, read that reference in this session (read_file on <skill-dir>/references/..., where <skill-dir> is the folder of the SKILL.md path the activation note gave you). Re-reading across sessions is cheap; guessing is expensive. "I know this language" is no exemption, because every runtime and every specialist tool has at least one gotcha that quietly costs hours.

Runtime setup: read before attaching
Your runtime isOpen this firstWhy it earns the read
Python (CPython, pytest, asyncio, Django, FastAPI)references/runtimes/python.mdpdb, ipdb, debugpy and pytest --pdb attach differently; async code needs special breakpoint handling; wrappers such as poetry run swallow flags.
Node.js / tsx / ts-node / Bun / Deno running sourcereferences/runtimes/node.mdtsx with the node inspect CLI has a silent source-map failure: line breakpoints never fire, and nothing tells you.
Rust (cargo, tokio, panics)references/runtimes/rust.mdRelease builds strip symbols, tokio tasks need tokio-console, and dbg! is usually the faster tool.
Go (goroutines, dlv, pprof, race)references/runtimes/go.mdGoroutine leaks and recovered panics stay quiet; dlv has a port convention; go test -race is the first run, not the last.
Native binary, stripped C/C++, no sourcereferences/runtimes/native-binary.mdThe order of work (triage, dynamic, static, scripted repro) is counterintuitive. strings -n 8 silently drops short interpolations such as ${x}, so read bytes directly for anything that matters. macOS adds SIP, Mach-O and lldb specifics.
Bundled app (Bun SEA, Node SEA, Deno compile, pkg, nexe, Electron, Tauri, PyInstaller)references/runtimes/bundled-js-binary.mdThese look like Mach-O or ELF, but their high-level source is recoverable with a per-bundler tool; a decompiler is overkill. Identify the bundler, locate the bundle, extract with the bundler-specific tool, then grep. Tauri's Rust core still needs native-binary.md.

Native versus bundled, in thirty seconds: file ./target calls both Mach-O or ELF. Run du -h ./target (50 MB or more is suspect) and strings -n 12 ./target | rg -iE 'bun|node_modules|webpack|esbuild|deno|pkg/lib|electron|pyinstaller|nexe|NODE_SEA_FUSE|tauri'. Hits mean bundled; a clean result means native.

Specialist tools: use them in their domain
ToolReach for it whenReference
Playwright CLIA browser-served UI bug, any flow needing clicks or typing, "works locally, breaks in prod" where the browser or the viewport is the variable. Phase 8 QA of a browser product drives a real browser through Playwright, not curl and not imagination. agy's default toolset has no browser tool: run the Playwright CLI through run_command, or hand the flow to browser_subagent when the host offers it.references/tools/playwright-cli.md
GhidraAny binary without trustworthy source: closed libraries, suspect vendored binaries, CTF, firmware. Use the decompiler before strings or objdump guessing.references/tools/ghidra.md
pwndbgAny native debugging session; it is GDB with registers, stack, disassembly and heap always on screen. Whenever you would reach for plain gdb, reach for pwndbg.references/tools/pwndbg.md
pwntoolsReproducible interaction with a binary or a network service: crafted payloads, harnesses, CTF scripting.references/tools/pwntools.md

Skipping a tool in its domain is a process failure. A browser bug "verified" without a browser, or a stripped binary read through xxd, does not count. When the tool is missing and run_command can install it into the engine cache or the project allows an install, install it and say so; otherwise record BLOCKED: <tool> missing, give the user the install command, and continue with the nearest installed substitute, labelled as weaker evidence.

Procedure

The phase loop

Each phase has one reference. Read it as you enter the phase, from the file, not from memory.

#PhaseOpen when entering
0Environment assessment: runtime, ports, symbols, env vars, watchers, wrappersreferences/methodology/00-setup.md
1Journal setup: one .debug-journal.md tracks every artifact for a guaranteed revertreferences/methodology/00-setup.md
2Hypothesis formation: at least three, on orthogonal axes, each with distinguishing evidencereferences/methodology/02-investigate.md
3Independent investigation lanes: read-only children when allowed, otherwise the same lanes in sequencereferences/methodology/02-investigate.md
4Orthogonal reframing review after two failed rounds: three angles, new falsification queriesreferences/methodology/04-oracle-triple.md
5User-decision escalation, only once evidence is exhausted and the call carries policy weightreferences/methodology/05-escalate.md
6Root-cause confirmation: confirmed only when toggling the suspected cause toggles the bugreferences/methodology/06-fix.md
7Test-first fix: a red test, the minimal green change, no scope growthreferences/methodology/06-fix.md
8Manual QA on the real surface: a terminal for a CLI, Playwright for a browser, a real request for an API, the real repro for a binaryreferences/methodology/08-qa.md
9Cleanup: walk the journal, revert every artifact, confirm the diff shows only the fix and the testreferences/methodology/09-cleanup.md
10Final verification: four evidence gates before you declare donereferences/methodology/09-cleanup.md

Cross-cutting references, read when the situation calls for them:

SituationReference
You cannot run the real operation (a paid API, a blocked network, missing hardware) but still need runtime evidencereferences/methodology/partial-runtime-evidence.md
You are about to call an extraction, audit or reverse-engineering task done and want a skeptical passreferences/methodology/partial-runtime-evidence.md (the "Late skeptical review" section)

The loop, step by step:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/wjgoarxiv/antigravity-swarm/debugging/badge)](https://verified-skill.com/skills/wjgoarxiv/antigravity-swarm/debugging)

Something wrong with this skill or its page? Tell us.