agentsclimarketplace

Systematic debugging

Skill tspry/superpowers-devops/skills/systematic-debugging

Use when encountering any bug, error, crash, or unexpected behavior — before proposing any fixFrom its SKILL.md

Install
npx -y skills add tspry/superpowers-devops --skill systematic-debugging

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.1 KB, as published. Nobody here has run it

Systematic Debugging

The Iron Law

NO FIX WITHOUT ROOT CAUSE INVESTIGATION FIRST

Random fixes waste time and create new bugs. Quick patches mask underlying issues. If you haven't completed Phase 1, you cannot propose fixes.

Works In Both Modes

  • Repo mode — read actual log files, configs, code. Run diagnostic commands.
  • Chat mode — work entirely from what the user pastes. Ask for more output if needed.

Phase 1 — Gather Evidence

Do NOT skip any of these:

  1. Read the full error — not just the first line. The root cause is often at the bottom.
  2. Identify the failure boundary — where exactly did it break? Which service, which line, which step?
  3. Check what changed — recent deploy, config change, dependency update, infra change?
  4. Collect context:
    • Exact error message and full stack trace
    • Environment (prod/staging/local, OS, runtime version)
    • Logs immediately before the failure
    • Any recent changes

Phase 2 — Form Hypotheses

List 2-3 specific, falsifiable hypotheses. Examples:

  • "The container is OOMKilled because the memory limit is too low"
  • "The 502 is caused by the upstream timing out before the proxy does"
  • "The Terraform apply fails because the IAM role lacks the required permission"

Do not combine hypotheses. Test one at a time.

Phase 3 — Test Hypotheses

For each hypothesis:

  • What evidence would confirm it?
  • What evidence would rule it out?
  • Run the smallest possible test

Phase 4 — Fix

Only after you have confirmed the root cause:

  • Fix the specific root cause, not the symptom
  • Explain what caused it and why the fix resolves it
  • Check if the same issue exists elsewhere

Red Flags — STOP and Follow Process

If you catch yourself thinking:

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • "Add multiple changes, run tests"
  • "Skip the test, I'll manually verify"
  • "It's probably X, let me fix that"
  • "I don't fully understand but this might work"
  • Proposing solutions before tracing data flow
  • "One more fix attempt" (when already tried 2+)
  • Each fix reveals new problem in different place

ALL of these mean: STOP. Return to Phase 1.

If 3+ fixes failed: Question the architecture — is this pattern fundamentally sound? Discuss with your human partner before attempting more fixes.

Common Rationalizations

ExcuseReality
"Issue is simple, don't need process"Simple issues have root causes too. Process is fast for simple bugs.
"Emergency, no time for process"Systematic debugging is FASTER than guess-and-check thrashing.
"Just try this first, then investigate"First fix sets the pattern. Do it right from the start.
"I see the problem, let me fix it"Seeing symptoms ≠ understanding root cause.
"One more fix attempt" (after 2+ failures)3+ failures = architectural problem. Question pattern, don't fix again.

Quick Reference

PhaseKey ActivitiesSuccess Criteria
1. Gather EvidenceRead errors, reproduce, check changes, collect contextUnderstand WHAT and WHERE
2. Form HypothesesList falsifiable hypotheses, one at a timeSpecific, testable theories
3. Test HypothesesSmallest possible test per hypothesisConfirmed or ruled out
4. FixFix root cause, verify, check for spreadBug resolved, no regressions

Common DevOps Error Patterns

ErrorFirst thing to check
CrashLoopBackOffkubectl logs <pod> --previous
OOMKilledMemory limits vs actual usage
502 Bad GatewayUpstream health, timeout settings
Connection refusedService running? Port correct? Firewall?
Terraform apply failsState drift, permissions, provider version
CI pipeline failsDependency versions, environment vars, secrets
Permission deniedIAM/RBAC roles, file permissions
DNS not resolvingPropagation time, correct record type, TTL

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.