wjgoarxiv/antigravity-swarm/debugging
Claude Code and agent skill by wjgoarxiv/antigravity-swarm
- community
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/debuggingSKILL.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:
- 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.
- 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
litroute (lit-loop,litwork,start-work) hits an unexplained failure mid-task. Read../debugging/SKILL.mdwithread_filefrom 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.mdat 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.mdand 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, orcargo check --message-format=jsonthroughrun_command. Thelspskill (read_fileon../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 underreferences/methodology/(named in the phase table below), one runtime recipe per language underreferences/runtimes/, and one specialist-tool recipe each underreferences/tools/.references/methodology/partial-runtime-evidence.mdcovers 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 is | Open this first | Why it earns the read | |
|---|---|---|---|
| Python (CPython, pytest, asyncio, Django, FastAPI) | references/runtimes/python.md | pdb, 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 source | references/runtimes/node.md | tsx 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.md | Release builds strip symbols, tokio tasks need tokio-console, and dbg! is usually the faster tool. | |
| Go (goroutines, dlv, pprof, race) | references/runtimes/go.md | Goroutine 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 source | references/runtimes/native-binary.md | The 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.md | These 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
| Tool | Reach for it when | Reference | |
|---|---|---|---|
| Playwright CLI | A 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 | |
| Ghidra | Any binary without trustworthy source: closed libraries, suspect vendored binaries, CTF, firmware. Use the decompiler before strings or objdump guessing. | references/tools/ghidra.md | |
| pwndbg | Any 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 | |
| pwntools | Reproducible 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.
| # | Phase | Open when entering | |
|---|---|---|---|
| 0 | Environment assessment: runtime, ports, symbols, env vars, watchers, wrappers | references/methodology/00-setup.md | |
| 1 | Journal setup: one .debug-journal.md tracks every artifact for a guaranteed revert | references/methodology/00-setup.md | |
| 2 | Hypothesis formation: at least three, on orthogonal axes, each with distinguishing evidence | references/methodology/02-investigate.md | |
| 3 | Independent investigation lanes: read-only children when allowed, otherwise the same lanes in sequence | references/methodology/02-investigate.md | |
| 4 | Orthogonal reframing review after two failed rounds: three angles, new falsification queries | references/methodology/04-oracle-triple.md | |
| 5 | User-decision escalation, only once evidence is exhausted and the call carries policy weight | references/methodology/05-escalate.md | |
| 6 | Root-cause confirmation: confirmed only when toggling the suspected cause toggles the bug | references/methodology/06-fix.md | |
| 7 | Test-first fix: a red test, the minimal green change, no scope growth | references/methodology/06-fix.md | |
| 8 | Manual 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 binary | references/methodology/08-qa.md | |
| 9 | Cleanup: walk the journal, revert every artifact, confirm the diff shows only the fix and the test | references/methodology/09-cleanup.md | |
| 10 | Final verification: four evidence gates before you declare done | references/methodology/09-cleanup.md |
Cross-cutting references, read when the situation calls for them:
| Situation | Reference | |
|---|---|---|
| You cannot run the real operation (a paid API, a blocked network, missing hardware) but still need runtime evidence | references/methodology/partial-runtime-evidence.md | |
| You are about to call an extraction, audit or reverse-engineering task done and want a skeptical pass | references/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
- SKILL.md in the repositoryCheckingplugin/skills/debugging/SKILL.md
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
[](https://verified-skill.com/skills/wjgoarxiv/antigravity-swarm/debugging)