One-click install
npx skills add https://github.com/mengdehong/opencode-dotfiles --skill debug-mengdehong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/mengdehong/opencode-dotfiles/tree/main/skills/debug
Command: npx skills add https://github.com/mengdehong/opencode-dotfiles --skill debug-mengdehong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Systematic debugging ensures root-cause investigation before fixes, preventing symptom-focused patches under time pressure.

Core Features & Use Cases

  • Phase-based workflow: Root Cause Investigation, Pattern Analysis, Hypothesis & Testing, and Implementation.
  • Guards against shortcuts, ensures traceability, and supports collaboration with defense-in-depth practices.
  • Applicable to bugs, failing tests, performance issues, and integration problems.

Quick Start

Start by completing Phase 1: Root Cause Investigation before attempting any fixes, then proceed through Phases 2, 3, and 4.

Frequently Asked Questions about debug

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

FAQPage Schema
How do I perform root-cause debugging for flaky tests and deep call stacks?

Root-cause debugging requires systematically tracing data and gathering evidence before attempting fixes. You must follow a four-phase workflow to investigate patterns, test hypotheses, and validate staged fixes to prevent symptom-focused patches.

What is the best way to prevent symptom fixes when debugging under time pressure?

To prevent symptom fixes, apply a defense-in-depth workflow that enforces root-cause tracing and evidence gathering. This structured process guards against shortcuts and ensures fixes remain grounded in the true trigger rather than superficial patches.

How do I start a phase-based debugging workflow for complex integration problems?

Start phase-based debugging by completing Phase 1: Root Cause Investigation before attempting any fixes. You then proceed sequentially through Pattern Analysis, Hypothesis & Testing, and Implementation to resolve integration issues.

Does systematic debugging work for performance issues obscured by environmental factors?

Systematic debugging works for performance issues by defensively tracing environmental factors and deep call stacks. The workflow ensures you identify the true trigger through staged validation rather than applying patches that mask the underlying problem.

When should I avoid symptom-focused patches during bug investigation?

You should avoid symptom-focused patches whenever you face deep call stacks or integration problems. Always conduct root-cause investigation first to ensure traceability and prevent incomplete fixes that fail under pressure.

What are the limitations of phase-based debugging for failing tests?

Phase-based debugging requires strict discipline and defensiveness in data tracing, which limits rapid patching. It demands thorough evidence gathering and staged validation, making it unsuitable for quick symptom suppression under time pressure.