Systematic debugging framework with root cause investigation, tracing, defense-in-depth validation, and verification. Use when: 'bug', 'test failure', 'unexpected behavior', 'error', 'not working', 'broken', before proposing fixes, when encountering any technical issue
From debuggingnpx claudepluginhub ggprompts/my-plugins --plugin debuggingThis skill uses the workspace's default tool permissions.
references/defense-in-depth.mdreferences/root-cause.mdreferences/systematic.mdreferences/verification.mdProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
If you haven't completed root cause investigation, you cannot propose fixes.
Use for ANY technical issue:
Use this ESPECIALLY when:
| Phase | Key Activities | Success Criteria |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
| 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
If you notice yourself considering:
ALL of these mean: STOP. Return to Phase 1.
If 3+ fixes failed: Question the architecture (not just symptoms)
# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
echo "VAR: ${VAR:+SET}${VAR:-UNSET}"
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep VAR || echo "VAR not in environment"
# Layer 3: Target script
echo "=== State at execution: ==="
./script.sh --verbose
# Reveals: Which layer fails
// Before problematic operation
async function operation(param: string) {
const stack = new Error().stack;
console.error('DEBUG operation:', {
param,
cwd: process.cwd(),
env: process.env.NODE_ENV,
stack,
});
await doRiskyThing(param);
}
// Layer 1: Entry validation
function createThing(path: string) {
if (!path || path.trim() === '') {
throw new Error('path cannot be empty');
}
// Layer 2: Business logic
if (!existsSync(path)) {
throw new Error(`path does not exist: ${path}`);
}
// Layer 3: Environment guard
if (process.env.NODE_ENV === 'test') {
if (!path.startsWith(tmpdir())) {
throw new Error('Test operations must use temp dir');
}
}
// Layer 4: Debug instrumentation
logger.debug('Creating thing', { path, caller: new Error().stack });
// Now safe to proceed
}
This skill works with:
From debugging sessions:
The Bottom Line:
This is non-negotiable.