.claude/skills/debug/SKILL.md
Debug systematically with root cause analysis before fixes. Use for bugs, test failures, unexpected behavior, performance issues, call stack tracing, multi-layer validation, log analysis, CI/CD failures, database diagnostics, system investigation.
npx skillsauth add haidonglethqb/CloudSchool ck:debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive framework combining systematic debugging, root cause tracing, defense-in-depth validation, verification protocols, and system-level investigation (logs, CI/CD, databases, performance).
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Random fixes waste time and create new bugs. Find root cause, fix at source, validate at every layer, verify before claiming success.
Code-level: Test failures, bugs, unexpected behavior, build failures, integration problems System-level: Server errors, CI/CD pipeline failures, performance degradation, database issues, log analysis Always: Before claiming work complete
references/systematic-debugging.md)Four-phase framework: Root Cause Investigation → Pattern Analysis → Hypothesis Testing → Implementation. Complete each phase before proceeding. No fixes without Phase 1.
Load when: Any bug/issue requiring investigation and fix
references/root-cause-tracing.md)Trace bugs backward through call stack to find original trigger. Fix at source, not symptom. Includes scripts/find-polluter.sh for bisecting test pollution.
Load when: Error deep in call stack, unclear where invalid data originated
references/defense-in-depth.md)Validate at every layer: Entry validation → Business logic → Environment guards → Debug instrumentation
Load when: After finding root cause, need comprehensive validation
references/verification.md)Iron law: NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE. Run command. Read output. Then claim result.
Load when: About to claim work complete, fixed, or passing
references/investigation-methodology.md)Five-step structured investigation for system-level issues: Initial Assessment → Data Collection → Analysis → Root Cause ID → Solution Development
Load when: Server incidents, system behavior analysis, multi-component failures
references/log-and-ci-analysis.md)Collect and analyze logs from servers, CI/CD pipelines (GitHub Actions), application layers. Tools: gh CLI, structured log queries, correlation across sources.
Load when: CI/CD pipeline failures, server errors, deployment issues
references/performance-diagnostics.md)Identify bottlenecks, analyze query performance, develop optimization strategies. Covers database queries, API response times, resource utilization.
Load when: Performance degradation, slow queries, high latency, resource exhaustion
references/reporting-standards.md)Structured diagnostic reports: Executive Summary → Technical Analysis → Recommendations → Evidence
Load when: Need to produce investigation report or diagnostic summary
references/task-management-debugging.md)Track investigation pipelines via Claude Native Tasks (TaskCreate, TaskUpdate, TaskList). Hydration pattern for multi-step investigations with dependency chains and parallel evidence collection.
Load when: Multi-component investigation (3+ steps), parallel log collection, coordinating debugger subagents
references/frontend-verification.md)Visual verification of frontend implementations via Chrome MCP (Claude Chrome Extension) or ck:chrome-devtools skill fallback. Detect if frontend-related → check Chrome MCP availability → screenshot + console error check → report. Skip if not frontend.
Load when: Implementation touches frontend files (tsx/jsx/vue/svelte/html/css), UI bugs, visual regressions
Code bug → systematic-debugging.md (Phase 1-4)
Deep in stack → root-cause-tracing.md (trace backward)
Found cause → defense-in-depth.md (add layers)
Claiming done → verification.md (verify first)
System issue → investigation-methodology.md (5 steps)
CI/CD failure → log-and-ci-analysis.md
Slow system → performance-diagnostics.md
Need report → reporting-standards.md
Frontend fix → frontend-verification.md (Chrome/devtools)
psql for PostgreSQL queries and diagnosticsgh CLI for GitHub Actions logs and pipeline debuggingck:docs-seeker skill for package/plugin docs; repomix for codebase summary/ck:scout or /ck:scout ext for finding relevant filesck:chrome-devtools skill for visual verification (screenshots, console, network)ck:problem-solving skill when stuck on complex issuesStop and follow process if thinking:
All mean: Return to systematic process.
development
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
data-ai
Conversion copywriting formulas, headline templates, email copy patterns, landing page structures, CTA optimization, and writing style extraction. Activate for writing high-converting copy, crafting headlines, email campaigns, landing pages, or applying custom writing styles from assets/writing-styles/ directory.
tools
ALWAYS activate this skill before implementing EVERY feature, plan, or fix.
development
Check context usage limits, monitor time remaining, optimize token consumption, debug context failures. Use when asking about context percentage, rate limits, usage warnings, context optimization, agent architectures, memory systems.