/fullstack-skills:bug-debuggingfrom fullstack-skills
Use this skill when fixing bugs, debugging errors, reading logs, troubleshooting production issues, diagnosing performance problems, or responding to incidents. Triggers on requests involving error messages, stack traces, broken features, unexpected behavior, log analysis, "it doesn't work", "there's a bug", or any request about finding and fixing problems in code.
Ships in fullstack-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when fixing bugs, debugging errors, reading logs, troubleshooting production issues, diagnosing performance problems, or responding to incidents.
../../../RULES.md when available and apply it as the behavior, safety, validation, and communication baseline.This is a Rigid discipline (per ../../../RULES.md Skill Types): the order is not
optional. Every bug, error, failing test, or unexpected behavior goes through these
four phases in order. The "Debugging Process" Steps below are not a second model —
they are these four phases expanded. The mapping is exact:
Do not skip ahead; do not treat the Steps as an alternative to the phases.
Before doing anything else, output this block exactly as written. No paraphrasing, no shortening, no skipped lines. Recite once per debug session — do not re-recite mid-session. If the user explicitly says "skip the mantra," skip the recital but still apply the four phases silently.
Debug Mantra:
- Reproduce first. No fix proposal until the failure is deterministic.
- Know the fail path. Debugger → source trace + knob enumeration → in-code instrumentation, in that order.
- Falsify the hypothesis. Run the cleanest disproof before the proof.
- Every run is a breadcrumb. Cross-reference all of them; the ledger is your memory across the session.
The mantra is a constraint you carry through the session — not advice to deliver back to the user. After reciting, begin Phase 1.
verification-before-completion. For any
non-trivial bug, after this phase hand off to post-mortem
to write the engineering record — your Phase-2 ledger is its raw material.| Thought | Reality |
|---|---|
| "Let me just try changing this and see" | Guess-and-check ≠ debugging. Find the cause. |
| "It's probably the same as last time" | Verify on evidence, not memory. |
| "Wrap it in try/catch and move on" | That hides the bug, it doesn't fix it. |
| "Can't reproduce, but I'll fix it anyway" | An unconfirmed fix is a new guess. |
| "The fix works, no need for a test" | Without a regression test it will come back. |
| "One symptom fixed, done" | Same root cause may surface elsewhere. Check. |
Before touching any code:
Reproduction priority:
| Method | Reliability | Speed |
|---|---|---|
| Automated test that fails | ✅ Best | Fast |
| Local reproduction steps | ✅ Good | Medium |
| Staging environment reproduction | ⚠️ OK | Slow |
| "It happened once in production" | ❌ Poor | N/A |
Reproduction checklist:
If you can't reproduce:
Narrow down where the bug lives:
Frontend Bug?
├── Browser console errors?
├── Network tab — request/response correct?
├── Component rendering issue?
├── State management issue?
└── CSS/layout issue?
Backend Bug?
├── Request reaches server? (check access logs)
├── Middleware passes? (auth, validation)
├── Controller receives correct input?
├── Service/business logic correct?
├── Database query returns expected data?
├── Response formation correct?
└── External service call fails?
Database Bug?
├── Query returns wrong data?
├── Missing/incorrect data?
├── Constraint violation?
├── Migration issue?
└── Connection/timeout issue?
Root cause analysis techniques:
| Technique | When to Use |
|---|---|
| Stack trace reading | Error with stack trace available |
| Binary search | "It worked before" — bisect commits |
| Print/log debugging | Tracing data flow through layers |
| Rubber duck | Explain the problem to find the gap |
| Minimum reproduction | Strip code until bug disappears, add back |
| Diff analysis | Compare working vs broken state/config |
| 5 Whys | Symptom → cause → deeper cause → root |
Fix rules:
Verification checklist:
After fixing:
HTTP status taxonomy, stack-trace reading, and a common-error-pattern lookup table are
in references/error-patterns.md — load it when an error message or stack trace lands
and you need a quick triage hint before diving in.
Log-search heuristics, log-reading patterns, and framework-specific commands (Laravel,
Node.js / PM2) are in references/log-tips.md — load it when you have logs in hand and
need to extract signal.
| ✅ Safe to Do | ❌ Never Do |
|---|---|
| Read logs | Modify production data |
| Read error tracking (Sentry) | Run untested queries |
| Check monitoring dashboards | Debug with breakpoints |
| Run read-only queries | Restart services during peak |
| Check health endpoints | Deploy untested hotfix |
| Review recent deploys | Give yourself admin access |
1. DETECT — Alert fired or user reported
2. ACKNOWLEDGE — Confirm the issue, assess severity
3. COMMUNICATE — Notify stakeholders, set expectations
4. TRIAGE — Is it data loss? Security breach? Service down? UX issue?
5. MITIGATE — Immediate action to reduce impact:
- Rollback if deploy-related
- Feature flag if feature-related
- Scale up if load-related
- Block traffic if attack-related
6. FIX — Implement proper fix
7. VERIFY — Confirm fix in production
8. POST-MORTEM — Document what, why, how, and prevention
| Severity | Definition | Response Time |
|---|---|---|
| 🔴 P0 — Critical | Service down, data loss, security breach | Immediate |
| 🟠 P1 — High | Major feature broken, significant user impact | < 1 hour |
| 🟡 P2 — Medium | Feature degraded, workaround exists | < 4 hours |
| 🟢 P3 — Low | Minor issue, cosmetic, edge case | Next business day |
A pre-flight category lookup (data / state / timing / environment bugs) and a
per-layer tool table (frontend / backend / database) live in references/tools.md —
load when you are choosing how to narrow the search or how to instrument.
When something goes wrong while you are working (not a user-reported bug). This is the
pack-wide canonical Error Recovery Protocol; ../../../RULES.md points here.
1. Read the full error message carefully.
2. Identify root cause (syntax, type, dependency, config).
3. Fix the specific error — don't make unrelated changes.
4. Rebuild and verify the fix.
5. Check if the fix introduced new issues.
1. Determine if the failure is from your change or pre-existing.
2. If your change: fix the code to match expected behavior, or update the test if behavior intentionally changed.
3. If pre-existing: note it and continue, but don't hide it.
4. Re-run all tests after fixing.
1. Reproduce the issue to confirm it exists.
2. Check if the behavior is documented or intentional.
3. Trace the code path to find the root cause.
4. Fix at the root cause, not the symptom.
5. Add a test to prevent regression.
1. Stop making more changes.
2. Revert to last known working state if possible.
3. Analyze what caused the cascade.
4. Fix issues one at a time, validating after each fix.
5. Document the root cause for future reference.
When debugging, structure the response as:
# Bug Analysis
## Problem Description
What the bug is, when it happens, who it affects.
## Root Cause
The technical reason the bug exists.
Include file, line, and the specific logic error.
## Evidence
- Error messages, log entries, or stack traces
- Steps that reproduce the issue
- Screenshots if visual
## Fix
The exact code change and why it fixes the root cause.
## Verification
- [ ] Test that reproduces the bug (fails before fix, passes after)
- [ ] Related functionality regression tested
- [ ] Edge cases checked
## Prevention
- Tests added to catch regression
- Similar patterns checked elsewhere
- Monitoring/alerting improvements (if applicable)
## Related Issues
Other areas that may have the same bug pattern.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (korwlik23/ai-skills) — no native marketplace selected
npx claudepluginhub p/korwlik23-fullstack-skills81 skills in this plugin
/ab-testingWhen the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro./ad-creativeWhen the user wants to generate, iterate, or scale ad creative — headlines, descriptions, primary text, or full ad variations — for any paid advertising platform. Also use when the user mentions 'ad copy variations,' 'ad creative,' 'generate headlines,' 'RSA headlines,' 'bulk ad copy,' 'ad iterations,' 'creative testing,' 'ad performance optimization,' 'write me some ads,' 'Facebook ad copy,' 'Google ad headlines,' 'LinkedIn ad text,' or 'I need more ad variations.' Use this whenever someone needs to produce ad copy at scale or iterate on existing ads. For campaign strategy and targeting, see ads. For landing page copy, see copywriting.