askill
debugging

debuggingSafety --Repository

Systematic diagnostic strategy with decision tree for reproducing, isolating, and tracing bugs. Use when investigating bugs, crashes, or unexpected behavior. Complements systematic-debugging workflow with concrete diagnostic patterns.

1 stars
1.2k downloads
Updated 2/6/2026

Package Files

Loading files...
SKILL.md

Debugging

Decision Tree

Bug reported → Can you reproduce it?
    ├─ Yes → Is it consistent?
    │   ├─ Yes → Add breakpoint/logging at suspected location → Trace
    │   └─ No (intermittent) → Race condition or timing issue → Add timestamps to logs
    └─ No → Check environment differences
        ├─ Works locally, fails in CI → Compare env vars, paths, timezone
        ├─ Works for others, fails for me → Check local config, versions, OS
        └─ Cannot reproduce anywhere → Get reproduction steps from reporter

Common Root Causes

SymptomLikely CauseCheck
Works locally, fails in CIEnv vars, file paths, timezoneCompare environments
Intermittent failureRace condition, flaky test, timeoutAdd logging, increase timeout
Null/undefined errorMissing null check, async orderingTrace data flow backwards
Memory growingUnclosed resources, event listener leaksHeap snapshot before/after
Slow responseN+1 queries, missing index, large payloadProfile, check query count
CORS errorMissing headers, wrong origin, preflightCheck server response headers
403/401Token expired, wrong scope, missing headerInspect request headers
"It worked yesterday"Dependency update, config change, data changeCheck git log, dep diff, recent deploys
Passes alone, fails in suiteShared state between tests, order dependencyRun in isolation, check setup/teardown

Strategy

  1. Reproduce - Get a reliable reproduction case first
  2. Isolate - Binary search: remove half the variables, see if it still fails
  3. Trace - Follow data flow from input to failure point
  4. Verify - Fix should explain the symptom, not just suppress it

Anti-Patterns

  • Shotgun debugging - Changing random things hoping it works. Understand first, fix second.
  • Fix the symptom - Adding a null check without understanding why it's null. Find the root cause.
  • "It works now" - Can't explain why it broke or why the fix works. Keep investigating.
  • Printf and pray - Adding one log, running, adding another. Plan your instrumentation.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

AI review pending.

Metadata

Licenseunknown
Version-
Updated2/6/2026
PublisherBigPapiCB

Tags

ci-cdobservabilitytesting
debugging - AI Agent Skill | askill