agentxagi/zero-inc/gstack-investigate

Claude Code and agent skill by agentxagi/zero-inc

Trust tier 3
  • community
Source check pending

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

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Trigger on "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis".

Install

npx vskill@latest install agentxagi/zero-inc/gstack-investigate

SKILL.md

The same SKILL.md was published earlier as agentxagi/zero-inc/gstack-investigate.

Systematic Debugging

Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.

Completion Status

When completing a debug session, report status using one of:

  • DONE — Root cause found, fix applied, verified
  • DONE_WITH_CONCERNS — Fixed but cannot fully verify (e.g., intermittent bug)
  • BLOCKED — Root cause unclear after investigation, escalated

Phase 1: Root Cause Investigation

Gather context before forming any hypothesis.

  1. Collect symptoms: Read the error messages, stack traces, and reproduction steps. If context is missing, ask ONE question at a time via AskUserQuestion.
  1. Read the code: Trace the code path from the symptom back to potential causes. Use Grep to find all references, Read to understand the logic.
  1. Check recent changes:

``bash git log --oneline -20 -- <affected-files> `` Was this working before? What changed? A regression means the root cause is in the diff.

  1. Reproduce: Can you trigger the bug deterministically? If not, gather more evidence before proceeding.

Output: "Root cause hypothesis: ..." — a specific, testable claim about what is wrong and why.


Phase 2: Pattern Analysis

Check if this bug matches a known pattern:

PatternSignatureWhere to look
Race conditionIntermittent, timing-dependentConcurrent access to shared state
Nil/null propagationNoMethodError, TypeErrorMissing guards on optional values
State corruptionInconsistent data, partial updatesTransactions, callbacks, hooks
Integration failureTimeout, unexpected responseExternal API calls, service boundaries
Configuration driftWorks locally, fails in staging/prodEnv vars, feature flags, DB state
Stale cacheShows old data, fixes on cache clearRedis, CDN, browser cache

Also check:

  • git log for prior fixes in the same area — recurring bugs in the same files are an architectural smell, not a coincidence

Phase 3: Hypothesis Testing

Before writing ANY fix, verify your hypothesis.

  1. Confirm the hypothesis: Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match?
  1. If the hypothesis is wrong: Return to Phase 1. Gather more evidence. Do not guess.
  1. 3-strike rule: If 3 hypotheses fail, STOP. Use AskUserQuestion:

``` 3 hypotheses tested, none match. This may be an architectural issue.

A) Continue investigating — I have a new hypothesis B) Escalate for human review C) Add logging and wait — instrument the area and catch it next time ```

Red flags — if you see any of these, slow down:

  • "Quick fix for now" — there is no "for now." Fix it right or escalate.
  • Proposing a fix before tracing data flow — you're guessing.
  • Each fix reveals a new problem elsewhere — wrong layer, not wrong code.

Phase 4: Implementation

Once root cause is confirmed:

  1. Fix the root cause, not the symptom. The smallest change that eliminates the actual problem.
  1. Minimal diff: Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code.
  1. Write a regression test that:
  • Fails without the fix (proves the test is meaningful)
  • Passes with the fix (proves the fix works)
  1. Run the full test suite. No regressions allowed.
  1. If the fix touches >5 files: Use AskUserQuestion to flag the blast radius.

Phase 5: Verification & Report

Fresh verification: Reproduce the original bug scenario and confirm it's fixed. This is not optional.

Output a structured debug report:

DEBUG REPORT
════════════════════════════════════════
Symptom: [what was observed]
Root cause: [what was actually wrong]
Fix: [what was changed, with file:line references]
Evidence: [test output, reproduction showing fix works]
Regression test: [file:line of the new test]
Status: DONE | DONE_WITH_CONCERNS | BLOCKED
════════════════════════════════════════

Important Rules

  • 3+ failed fix attempts → STOP and question the architecture.
  • Never apply a fix you cannot verify. Run the tests.
  • Never say "this should fix it." Verify and prove it.
  • If fix touches >5 files → flag blast radius before proceeding.

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/agentxagi/zero-inc/gstack-investigate/badge)](https://verified-skill.com/skills/agentxagi/zero-inc/gstack-investigate)

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