Debugging

Guide root-cause investigation of software bugs with four-phase debugging protocols.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/luan-thnh/hrm-auto-extension --skill debugging-luan-thnh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Debugging
Source: https://github.com/luan-thnh/hrm-auto-extension/tree/main/.opencode/skills/debugging
Command: npx skills add https://github.com/luan-thnh/hrm-auto-extension --skill debugging-luan-thnh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Systematic debugging guidance that helps teams investigate root causes before applying fixes, reducing wasted effort and repeated bugs.

Core Features & Use Cases

  • Four-phase debugging process (investigate, pattern analysis, hypothesis testing, implementation) to ensure solid fixes.
  • Backward call stack tracing to identify where bad data originates.
  • Defense-in-depth validation across entry, business, environment, and instrumentation layers.
  • Verification protocols to confirm success before claiming completion.

Quick Start

Follow Phase 1: document the error, reproduce it reliably, gather evidence, then proceed with root-cause analysis.

Frequently Asked Questions about Debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to find the root cause of a software bug before fixing it?

Systematic debugging uses a four-phase process: investigate, pattern analysis, hypothesis testing, and implementation. It enforces backward call stack tracing and defense-in-depth validation to ensure solid fixes and reduce wasted effort.

How do I trace where bad data originates in a stack trace?

Use backward call stack tracing to identify where bad data originates. This technique analyzes the stack trace to pinpoint the exact origin of invalid data across codebases, preventing superficial fixes.

How do I systematically debug integration problems and test failures?

Debug integration problems and test failures by following the four-phase investigation protocol. Document the error, reproduce it reliably, gather evidence, and proceed with root-cause analysis before applying fixes.

Does defense-in-depth validation help prevent repeated software bugs?

Yes, defense-in-depth validation prevents repeated software bugs by enforcing checks across entry, business, environment, and instrumentation layers. This ensures comprehensive error verification before completion.

Why should I verify a bug fix before claiming the debugging process is complete?

You must verify a bug fix before completion because systematic debugging requires confirmation of success. Verification protocols ensure the fix resolves the root cause and prevents unexpected behavior.