From debugging
Finds and fixes bugs through systematic root cause analysis, stack trace interpretation, browser DevTools automation, CI/CD pipeline debugging, performance profiling, and AI-powered error analysis. Use when the user asks to debug something, fix a bug, investigate an error, analyze a stack trace, find the root cause of a failure, profile performance, diagnose test failures, troubleshoot CI/CD pipelines, or use Chrome DevTools to inspect issues. NOT for writing new tests or setting up test frameworks (use testing-framework), NOT for TDD methodology or writing tests before code (use test-driven-development), NOT for reviewing code quality or PRs (use code-review).
How this skill is triggered — by the user, by Claude, or both
Slash command
/debugging:debuggingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides a complete debugging toolkit combining methodology, automation, and analysis tools for diagnosing and resolving software issues across the entire development lifecycle.
examples/e2e-testing/react-vite/example-page-object.tsexamples/e2e-testing/react-vite/example-test.spec.tsexamples/e2e-testing/reports/fix-recommendations.example.mdexamples/e2e-testing/reports/visual-analysis-report.example.mdexamples/workflow/ai-powered-testing.pyexamples/workflow/console_logging.pyexamples/workflow/element_discovery.pyexamples/workflow/static_html_automation.pyreferences/cdp-domains.mdreferences/ci-cd-integration.mdreferences/cicd-best_practices.mdreferences/cicd-devsecops.mdreferences/cicd-optimization.mdreferences/cicd-security.mdreferences/cicd-troubleshooting.mdreferences/defense-in-depth.mdreferences/e2e-data/accessibility-checks.mdreferences/e2e-data/common-ui-bugs.mdreferences/e2e-data/error-patterns.yamlreferences/e2e-data/framework-detection-patterns.yamlThis skill provides a complete debugging toolkit combining methodology, automation, and analysis tools for diagnosing and resolving software issues across the entire development lifecycle.
Core Principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1 (Root Cause Investigation), you cannot propose fixes.
Use for ANY technical issue:
ESPECIALLY use when:
| Issue Type | Primary Tool | Reference |
|---|---|---|
| Test failures | Systematic Debugging | references/systematic-debugging/ |
| Browser/UI bugs | Chrome DevTools + E2E Testing | references/cdp-domains.md, references/e2e-workflow/ |
| CI/CD failures | Pipeline Analyzer | scripts/cicd/, references/cicd-troubleshooting.md |
| Performance issues | Performance Profiler | references/performance-guide.md |
| Build errors | Root Cause Tracing | references/root-cause-tracing.md |
| Flaky tests | Find Polluter Script | scripts/find-polluter.sh |
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read Error Messages Carefully
Reproduce Consistently
Check Recent Changes
Gather Evidence in Multi-Component Systems
For EACH component boundary:
Trace Data Flow
See references/root-cause-tracing.md for detailed backward tracing technique.
See references/systematic-debugging/SKILL.md for complete methodology.
Browser automation via executable Puppeteer scripts. All scripts output JSON for easy parsing.
Installation:
cd scripts/chrome-devtools
./install-deps.sh # Linux/WSL only
npm install
Available Scripts:
navigate.js - Navigate to URLsscreenshot.js - Capture screenshots (auto-compresses >5MB)click.js - Click elementsfill.js - Fill form fieldsevaluate.js - Execute JavaScript in page contextsnapshot.js - Extract interactive elements with metadataconsole.js - Monitor console messages/errorsnetwork.js - Track HTTP requests/responsesperformance.js - Measure Core Web Vitals + record tracesUsage Pattern:
cd scripts/chrome-devtools
node screenshot.js --url https://example.com --output ./page.png
node console.js --url https://example.com --types error,warn --duration 5000
References:
references/cdp-domains.md - 47 Chrome DevTools Protocol domainsreferences/puppeteer-reference.md - Complete Puppeteer API patternsreferences/performance-guide.md - Core Web Vitals optimizationAutomated Playwright e2e testing with LLM-powered visual debugging, screenshot capture, and fix recommendations.
Key Capabilities:
references/e2e-workflow/phase-1-discovery.md)references/e2e-workflow/phase-2-setup.md)references/e2e-workflow/phase-2.5-preflight.md)references/e2e-workflow/phase-3-generation.md)references/e2e-workflow/phase-4-capture.md)references/e2e-workflow/phase-5-analysis.md)references/e2e-workflow/phase-6-regression.md)references/e2e-workflow/phase-7-fixes.md)references/e2e-workflow/phase-8-export.md)Templates:
templates/e2e-testing/playwright.config.template.tstemplates/e2e-testing/test-spec.template.tstemplates/e2e-testing/page-object.template.tstemplates/e2e-testing/screenshot-helper.template.tsExamples:
examples/e2e-testing/react-vite/ - React Vite exampleexamples/e2e-testing/reports/ - Report examplesQuick Health Check:
python3 scripts/cicd/ci_health.py --platform github --repo owner/repo
Pipeline Optimization Analysis:
python3 scripts/cicd/pipeline_analyzer.py --platform github --workflow .github/workflows/ci.yml
| Error Pattern | Common Cause | Quick Fix |
|---|---|---|
| "Module not found" | Missing dependency or cache issue | Clear cache, run npm ci |
| "Timeout" | Job taking too long | Add caching, increase timeout |
| "Permission denied" | Missing permissions | Add to permissions: block |
| "Cannot connect to Docker" | Docker not available | Use correct runner or DinD |
| Intermittent failures | Flaky tests or race conditions | Add retries, fix timing issues |
GitHub Actions:
# Add repository secrets:
# ACTIONS_RUNNER_DEBUG = true
# ACTIONS_STEP_DEBUG = true
GitLab CI:
variables:
CI_DEBUG_TRACE: "true"
References:
references/cicd-troubleshooting.md - Comprehensive CI/CD debuggingreferences/cicd-best_practices.md - Pipeline design patternsreferences/cicd-optimization.md - Performance tuningreferences/cicd-security.md - Security patternsreferences/cicd-devsecops.md - Security scanning (SAST, DAST, SCA)Templates:
templates/cicd/github-actions/ - GitHub Actions templatestemplates/cicd/gitlab-ci/ - GitLab CI templatesWhen something appears during tests but you don't know which test causes it:
./scripts/find-polluter.sh '.git' 'src/**/*.test.ts'
Runs tests one-by-one, stops at first polluter.
After finding and fixing a bug, add validation at EVERY layer data passes through:
See references/defense-in-depth.md for complete pattern.
The Iron Law:
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
Before claiming any status:
See references/verification-before-completion.md for complete checklist.
For complex error analysis, use the AI-powered debugging module:
Features:
See references/workflow-modules/ai-debugging.md for implementation details.
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
references/systematic-debugging/ - Core debugging methodologyreferences/root-cause-tracing.md - Backward tracing techniquereferences/defense-in-depth.md - Multi-layer validationreferences/verification-before-completion.md - Verification checklistreferences/cdp-domains.md - Chrome DevTools Protocol referencereferences/puppeteer-reference.md - Puppeteer API patternsreferences/performance-guide.md - Performance debuggingreferences/playwright-best-practices.md - Playwright patternsreferences/troubleshooting.md - Common issues and fixesreferences/ci-cd-integration.md - CI/CD integration guidereferences/cicd-*.md - CI/CD specific referencesreferences/e2e-workflow/ - E2E testing workflow phasesreferences/e2e-data/ - E2E testing data and patternsreferences/workflow-modules/ - AI-powered debugging modulesscripts/chrome-devtools/ - Browser automation scriptsscripts/cicd/ - CI/CD analysis toolsscripts/find-polluter.sh - Test pollution finderscripts/workflow/ - Workflow automationtemplates/e2e-testing/ - Playwright test templatestemplates/cicd/github-actions/ - GitHub Actions templatestemplates/cicd/gitlab-ci/ - GitLab CI templatesexamples/e2e-testing/ - E2E testing examplesexamples/workflow/ - Workflow examplesFrom debugging sessions:
npx claudepluginhub viktorbezdek/skillstack --plugin debuggingDiagnoses failures, fixes bugs, and investigates failing tests using systematic debugging: reproduce first, read before changing, assume nothing, find root cause.
Systematic debugging methodology for finding and fixing bugs through root cause analysis. Covers reproduce-investigate-hypothesize-fix-prevent workflow, evidence-based diagnosis, and bug category strategies.
Guides hypothesis-driven debugging through reproduce, investigate, fix, and verify cycles. Useful for bugs, test failures, and unexpected behavior.