debug

Trace errors through call stacks and validate fixes with root cause analysis.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Hoang130203/Emgu_CV_automation --skill debug-hoang130203
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/Hoang130203/Emgu_CV_automation/tree/main/.opencode/skills/debug
Command: npx skills add https://github.com/Hoang130203/Emgu_CV_automation --skill debug-hoang130203

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a structured framework to systematically investigate and resolve bugs, test failures, and unexpected behavior by focusing on root cause analysis before implementing fixes.

Core Features & Use Cases

  • Systematic Debugging: A four-phase approach (Investigation, Pattern Analysis, Hypothesis & Testing, Implementation) to ensure thorough problem-solving.
  • Root Cause Tracing: Techniques to trace errors backward through call stacks to pinpoint the origin of invalid data.
  • Defense-in-Depth: Strategies for adding validation at multiple layers to prevent bugs from recurring.
  • Verification Protocols: Ensuring fixes are validated before claiming completion.
  • Use Case: When a critical test fails unexpectedly, use this Skill to meticulously trace the error, identify the exact line of code causing the issue, implement a targeted fix, and verify its effectiveness.

Quick Start

Use the debug skill to systematically investigate the root cause of the latest test failure.

Frequently Asked Questions about debug

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

FAQPage Schema
How do I systematically debug a failing test to find the root cause?

Systematic debugging uses a four-phase approach: Investigation, Pattern Analysis, Hypothesis & Testing, and Implementation to identify the root cause of test failures. It guides you through tracing errors backward through call stacks to pinpoint invalid data origins.

What is the best way to trace an error back through a call stack?

Root cause tracing involves analyzing the call stack backward to identify exactly where invalid data originates. This technique helps pinpoint the specific line of code causing the defect rather than just addressing the surface symptom.

How do I fix test pollution when tests fail unexpectedly?

To resolve test pollution, you can use bisection scripts provided within the debugging framework to isolate the problematic test interactions. This method systematically narrows down the source of unexpected failures.

How do I ensure a bug fix is validated and does not recur?

Defense-in-depth validation adds checks at multiple layers to prevent bugs from recurring, while verification protocols ensure fixes are fully tested before completion. This multi-layered approach secures the system against regression.

Can I use this debugging approach for any software defect or is it specialized?

This debugging framework applies to general software defects and test failures by employing pattern identification and hypothesis testing. It provides a structured methodology adaptable to various unexpected behaviors in your codebase.