/everything-backend:backend-debugfrom everything-backend
Triages and fixes backend bugs via a strict loop: reproduce, failing test, root cause, minimal fix, green suite, memory entry. Also diagnoses perf regressions.
Ships in everything-backend. 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.
None: SKILL.md is the whole skill.
Fix the bug that was reported, prove it is fixed, and write down why it happened. Nothing else changes in the same run.
Not for:
backend-implement. If the "bug" turns out to be a missing feature, say so and hand off.backend-refactor, in a separate change set after the fix.backend-migrate (see Handoffs).backend-security. A vulnerability found while debugging is logged and handed off there._shared/ inside this skill's folder (bundled installs), then ../_shared/ next to it; other fallbacks are in <shared>/context-loading.md -> Resolving _shared/ Files. A missing shared doc is a warning, not a stop.<shared>/tool-rules.md (mode=auto contract, Production Targets, Test Integrity, checkpoints) and <shared>/host-tools.md if the action names below don't match your host's tools. Read <shared>/principles.md (applied to every fix) and <shared>/memory-schema.md -> issues.md and decisions.md before writing memory.<shared>/context-loading.md: project-overview.md, tech-stack.md, issues.md (the bug may be known), and test-strategy.md (test conventions). Load api-patterns.md for endpoint bugs and db-schema.md for data bugs. If memory is missing, do not stop: find the manifest and test runner yourself and suggest backend-scan in the report.<shared>/stacks/, read it.<shared>/sql-safety.md fully. It is the rule set for every query this skill changes. For every other change, <shared>/secure-coding.md -> The Rules applies: a fix never adds a shell call, eval, an unsafe parser, an unchecked path or URL, a disabled TLS check or a logged secret, and never removes a validation, auth or size check to make a symptom go away.references/triage-playbook.md: read when localizing a cause by symptom (500s, timeouts, wrong data, flaky tests, memory leaks, deadlocks, race conditions, SQL/NoSQL injection, one user or tenant reaching another's rows), and for bisect and temporary-logging rules.references/performance.md: read when the bug is "slow", a latency or throughput regression, high CPU or memory, or a suspected N+1 query; its "Safe Query Shapes" section applies to every query rewrite (dynamic ORDER BY, IN lists, LIKE search, pagination, bulk writes).Follow the shared mode=auto contract in <shared>/tool-rules.md. This skill adds only these pauses:
git bisect or any other command that writes refs or moves HEAD.Write down, from the user's message, memory and logs they shared:
Ask once, in a single message, only for what is missing and needed to reproduce. Check issues.md for a matching open entry.
Output: a short bug statement. Done when expected vs actual and at least one concrete trigger are known.
Find the smallest command, request or test input that shows the bug.
curl against localhost), a small script.<shared>/tool-rules.md -> Production Targets, and run the Target Check from backend-test.Production incident: start with read-only triage of what the user shares (logs, metrics, traces, recent deploys, error tracker exports). Running a command that reaches a production or shared target yourself (for example kubectl logs, a cloud logging CLI, a query against a production database or APM API) is Always Ask First even when it only reads: show the command and target, and redact secrets and PII from anything you quote. Mitigation (rollback, restart, scale, feature-flag flip, config change, data fix) is Always Ask First; propose it with the exact command and expected effect, and point to docs/runbooks/ from backend-ops. Then reproduce the cause locally.
If you cannot reproduce after a reasonable effort: stop. Report what you tried, the ranked hypotheses with evidence for each, and what information would settle it. Offer temporary diagnostic logging as a separate, approved step. Do not ship a speculative fix as "fixed".
Output: the reproduction command and its observed output. Done when the bug shows up on demand, or the run has stopped with hypotheses.
Capture the bug as a test before changing code.
test-strategy.md, existing tests near the code) and backend-test for framework, fixtures and mocking. Use the lowest level that shows the bug: unit if the logic is local, integration if SQL or a constraint matters, contract if the HTTP mapping is wrong.returns 404 when order belongs to another tenant.Start the checkpoint before writing the test, if Step 2 has not already started it (see Step 5 for the command), and record the test file.
Before any fix, run the existing suite once (Target Check and Command Time Budgets apply) and save the list of failing tests as the baseline. Step 6 compares against it; without a baseline, report new-failure checks as "not verified".
Output: the new test path and its failing output. Done when the test fails on current code for the reason in the bug statement.
Localize the fault, then explain it. Use references/triage-playbook.md for symptom-specific checks.
git log -p and git blame on the suspect lines are read-only and run without asking. git bisect start/good/bad/run moves HEAD and writes refs: Always Ask First, require a clean tree, and finish with git bisect reset.State the root cause in this form before fixing anything:
Root cause: [one sentence: what is wrong and where, file:line]
Evidence: [stack frame, log line, data sample, bisect result, failing assertion]
Why it produces the symptom: [the causal chain]
Why it was not caught: [missing test, missing validation, untested path]
Distinguish the root cause from the trigger. "Null customer crashes the handler" is a trigger; "the repository returns orders whose customer was soft-deleted" is a cause.
Output: the root-cause statement. Done when the evidence explains every observed symptom, or the run has paused because several causes still fit.
Start a checkpoint before the first edit: node <shared>/scripts/checkpoint.js start --skill backend-debug --feature <slug> (slug from the bug, e.g. fix-order-404-tenant). Before editing a file listed in the checkpoint's pre_existing_changes[] (already dirty before this run), run checkpoint.js backup --skill backend-debug --feature <slug> <file>. Record each file you create or edit (checkpoint.js record), snapshot after each step, and close it when done. Exit code 3 means an open checkpoint exists: offer resume or restart. If Node is unavailable, follow <shared>/tool-rules.md -> Concurrent & Partial Work by hand.
catch to make the error disappear.backend-refactor.issues.md.<shared>/stacks/ and <shared>/principles.md to the changed lines.<shared>/sql-safety.md: bound values, allowlisted identifiers, and the owner predicate from the authenticated principal on tenant- or user-owned rows. Never fix a query bug by escaping quotes by hand or building SQL from strings. If the bug is an injection or BOLA, use the playbook section "SQL/NoSQL Injection and BOLA".Output: the diff of the fix. Done when only files tied to the bug and its test changed.
_shared/sql-safety.md -> Verification on the changed files (static search, read each changed DAO file, SAST if available, hostile-payload negative tests). A failed check means the fix is not done.node <shared>/scripts/security-scan.js --changed. A new critical or high finding in the fix means the fix is not done; for a security bug, also add the matching hostile-input test from <shared>/secure-coding.md -> Verification, step 4.Output: test and check results, each marked passed, failed or did not complete. Done when the failing test passes, the suite has no new failures, and no debug code remains.
Follow <shared>/memory-schema.md and record each memory write in the checkpoint (--memory).
issues.md: add an entry, or update the matching one, with Status Resolved, the root cause, the fix location, the regression test path, and the date. Log unrelated problems found on the way as new Open entries.decisions.md: only if the fix made a decision others must follow (for example "money is stored as integer cents", "timestamps are UTC at the boundary").test-strategy.md: only if the fix added a test convention (owner backend-test; append, do not rewrite).Never write secrets, tokens or production PII into memory.
Close the checkpoint: node <shared>/scripts/checkpoint.js close --skill backend-debug --feature <slug> --status completed.
## Debug Summary
- Bug: [expected vs actual]
- Reproduction: [command or request]
- Root cause: [one sentence, file:line] — Evidence: [short]
- Fix: [what changed and why it is minimal]
- Regression test: [path] — failing before, passing after
- Suite: [passed / N pre-existing failures / did not complete: reason]
- Files changed: [list; tests marked]
- Existing tests modified: [file -> reason and user approval, or "none"]
- Memory: [issues.md entry, decisions.md if any]
- Follow-ups: [handoffs, similar risks logged in issues.md]
backend-migrate. This skill never writes or applies migrations.backend-auth rules (JWT verification, CSRF, tenant-scoped authorization, credential handling). Never fix an auth bug by removing or loosening a check. If the bug is exploitable, mark it High or Critical in issues.md and suggest backend-security for a wider review.<shared>/sql-safety.md; severity per its Verification step 5 (Critical if reachable from a public or low-privilege endpoint). Log other occurrences in issues.md and suggest backend-security.references/performance.md. Caching, pooling and queue changes go to backend-ops.backend-ops; deploy or rollback goes to backend-deploy with confirmation.backend-implement.backend-refactor, after this run, in a separate change set.To undo this run's changes, use node <shared>/scripts/checkpoint.js rollback --skill backend-debug --feature <slug> --dry-run, show the result, then run it without --dry-run. Restoring backups (--restore-backups) and deleting created files (--delete-created) need the user's confirmation. Never use git checkout --, git reset --hard or git clean.
issues.md.<shared>/sql-safety.md -> Verification.security-scan.js --changed reports no new critical or high finding.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
debugging, bug-fix, root-cause, regression, testing, incident-triage
16 skills in this plugin
/backend-api-designDesigns API contracts before code is written: resources, endpoints, request and response schemas, error format, pagination, versioning and per-endpoint authorization rules. Writes the contract to an OpenAPI spec (docs/api/openapi.yaml by default, or the existing spec) and records conventions in api-patterns.md memory. REST is fully covered; GraphQL schemas and gRPC .proto contracts get basic guidance. Use when the user says 'design the API', 'what endpoints do I need', 'plan routes', 'write an OpenAPI spec', 'Swagger', 'define the API contract', 'design a GraphQL schema', 'write a proto file', 'add an endpoint to the spec', or 'version or deprecate an endpoint'. Not for writing handler code (backend-implement), choosing the login mechanism or auth endpoints (backend-auth), or reviewing API security (backend-security)./backend-architectDesigns backend architecture for new and existing systems, including architecture pattern (monolith, modular monolith, microservices, serverless), tech stack, module boundaries, consistency rules and non-functional targets, then records the result as docs/architecture/overview.md, numbered ADR files in docs/adr/ and project memory. Use when the user says "design the architecture", "plan the backend", "how should I structure this", "what tech stack should I use", "should we split into microservices", "write an ADR", "redesign this system", or is starting a new project or a major feature. Hands diagrams to backend-visualize and detailed schema and API work to backend-db-design and backend-api-design.npx claudepluginhub codeworksid/everything-backend --plugin everything-backendOther plugins' skills for the same job