debug
Debug and Fix
Find root causes, then fix them. This skill investigates bugs systematically — tracing the full causal chain before proposing a fix — and optionally implements the fix with test-first discipline.
The bug description is the input this skill was invoked with — the failure to diagnose, present in the current prompt or conversation, whether the user provided it directly or a calling skill passed it (e.g. babysit-pr / lfg in mode:pipeline, which pass the failing jobs and log tails as the argument). It may be a description of the failure, a mode: token, or an issue reference (#123, org/repo#123, or an issue URL). The rest of this skill refers to it as <bug_description>; if nothing was provided, treat <bug_description> as blank.
Mode
Default is interactive — investigate, then use the Phase 2 fix-choice gate and the Phase 4 handoff prompt as written below.
mode:pipeline (set by an orchestrator such as babysit-pr or lfg): run fully non-interactively. Strip the mode:pipeline token from <bug_description> before parsing. Read references/pipeline-mode.md and follow it — it overrides every "ask the user" point in this skill with a conservative default, replaces the Phase 2 fix-gate with "fix convergent bugs, defer divergent ones," and replaces the Phase 4 prompt with a structured return. Never call the blocking-question tool in pipeline mode.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1 (investigation), you cannot propose fixes. Symptom fixes are failure. This is non-negotiable.