/everything-backend:backend-doctorfrom everything-backend
Runs build, tests, coverage, lint, type checks, dependency audits and smoke tests on an existing backend, reporting severity-ranked findings without editing code.
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.
Run the project's own checks, collect evidence, and report what is wrong, how bad it is, and which skill should fix it. Doctor diagnoses. It does not fix.
mode=review: review a branch or pull request, scoped to the changed files.Not for:
_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, Command Time Budgets, checkpoints) and <shared>/host-tools.md if the actions below don't map clearly to your host's tools. Read <shared>/principles.md (what findings are measured against) and the issues.md section of <shared>/memory-schema.md.<shared>/context-loading.md: always project-overview.md and tech-stack.md; api-patterns.md and db-schema.md when the project has endpoints or a database; test-strategy.md if it exists; decisions.md only when a finding contradicts or depends on a recorded decision. Also load issues.md if it exists, to check known issues. A missing issues.md is normal; doctor creates it in Step 9. If all memory is missing, follow the Missing-Memory Rule there (in mode=auto, run backend-scan first).<shared>/stacks/, read it.Doctor-specific checks:
references/commands.md: read in Step 1 to pick test, coverage, build, lint, audit and migration-status commands per stack, package manager and Python environment.references/smoke-test.md: read before Step 6 (start command, port, health route discovery, Bash and PowerShell start/poll/stop).references/static-checks.md: read before Step 7 (injection sinks per stack, owner-predicate (BOLA) check, secret search and masking, bandit flags, architecture, performance and resilience checks).<shared>/sql-safety.md: read before Step 7. It is the source of truth for what counts as safe data access and for injection and BOLA severity.<shared>/secure-coding.md: read before Step 7. It is the source of truth for everything else a static check judges (S1-S18) and for its severity (Verification, step 5).references/output-format.md: read in Step 8 (the output template, the grading rubric and recommendation patterns per finding type).mode=auto (default) or mode=interactive, exactly as defined in <shared>/tool-rules.md -> mode=auto Contract.mode=review (optional) selects diff scope. It is a scope, not a run mode: the run is still auto unless the user asks for interactive. Optional base=<branch>.path=<dir> (optional): the service to check in a monorepo.npm audit fix, no npx downloads, no pip install). Its only writes are issues.md and, if the user asks, a saved copy of the output.references/static-checks.md -> Masking).This is the scale for doctor's findings. Other skills (backend-ops, the orchestrator's gates) refer to it.
| Severity | Examples |
|---|---|
| Critical | Failing build; authentication bypass; confirmed injection (SQL, NoSQL, command, template) or a missing owner predicate on an owned row, when reachable from a public or low-privilege endpoint (High otherwise, per <shared>/sql-safety.md); a committed live secret; data-loss or broken-invariant risk; a known exploitable vulnerability in a production dependency |
| High | Failing tests on critical paths (auth, payments, persistence); missing ownership or authorization check (Critical when reachable from a public or low-privilege endpoint, per <shared>/sql-safety.md -> Verification); missing validation on create, update, auth or payment endpoints; high-severity vulnerability in a production dependency; app fails to start from a code error; health route returns non-2xx; pending or diverged migrations; god service or business rules duplicated across endpoints; type errors that can fail at runtime |
| Medium | Weak layering; N+1 or unbounded queries; inconsistent error mapping; missing health route; outbound calls without timeouts; environment or setup failures; flaky tests; vulnerabilities in dev-only dependencies; missing tests on critical paths; a tool that is missing or failed to run (category "Tooling") |
| Low | Naming, documentation, minor duplication, cosmetic lint warnings, non-critical observability gaps |
Legacy code: keep the scale; group many Low findings into one entry instead of listing each.
references/commands.md, preferring the project's own scripts. Read each script body you plan to run.mode=review, build the file list first (see Review Mode below).Done when: you have a list of commands, each marked hermetic or integration.
Before Step 3 (tests), Step 6 (smoke test) or a migration-status command, read what the process will load: .env, .env.test, config files, docker-compose*.yml, test setup files, and the current shell environment. List every database, queue, cache, mail, SMS, payment and external-API target (e.g. DATABASE_URL, DB_HOST, REDIS_URL, AMQP_URL, RABBITMQ_URL, KAFKA_BROKERS, SMTP_HOST, provider keys).
<shared>/tool-rules.md -> Production Targets. Names containing dev, staging or test are not proof. An unresolved target counts as production..env and no DB or queue config). npm test, npm run test:ci, pytest, go test ./... and ./mvnw test count as integration runs.prestart, migrate-on-boot settings) and test hooks (npm pretest, Jest or Vitest globalSetup / setupFiles, pytest conftest.py fixtures, Go TestMain), e.g. prisma migrate reset --force, prisma db push, knex migrate:latest, alembic upgrade head. If any exists, ask first even for a local database (Always Ask First).Done when: each integration command is marked run, ask, or skip, with the target it resolved.
Run the test command (the coverage variant if coverage is configured). Capture the exit code, failure count, failing test names and assertions. Classify each failure as environment, flaky or code (see references/commands.md -> Classifying failures) before rating it. Follow Test Integrity: never skip, edit or loosen a test.
Done when: results and coverage (or "coverage: not measured") are recorded.
Run the build, linter, formatter check and type-checker. Check LSP diagnostics on the source folders if available; without LSP, the type-checker is the evidence. Rate type errors that can fail at runtime High, lint failures on critical paths Medium, cosmetic warnings Low.
Done when: each tool has an exit code or a "not configured" note.
Audit production dependencies separately from dev dependencies (references/commands.md -> Dependency Audits). For each vulnerability record package, installed version, fixed version and whether it is production or dev. Recommend upgrades with the fixed version and any breaking changes; installing or upgrading always needs confirmation and belongs to the Next skill.
Done when: production and dev results are recorded separately, or the audit is "not run" with the reason.
If there is a start command and the Target Check passed, follow references/smoke-test.md: find the port and the real health route, start in the background, poll up to about 60s, probe, then stop the whole process tree and confirm the port is free. Optionally run the read-only migration-status command for the project's migration tool.
Done when: the probe result is recorded and no process this run started is still running.
Start with node <shared>/scripts/security-scan.js --json over the source roots (mode=review: --changed --base <base>); it is read-only and needs no install. Then follow references/static-checks.md, judging data-access hits against <shared>/sql-safety.md and all other hits against <shared>/secure-coding.md. Search for candidates, read each hit in context, and report only confirmed findings. Cover injection sinks (SQL, NoSQL operator, command, template), reads and writes of owned rows without an owner predicate (candidate BOLA, hand to backend-security), secrets in the working tree, missing validation and obvious ownership gaps, layering and architecture, performance (static only) and resilience. Anything that needs a deeper security look goes to "Needs review (backend-security)".
Done when: every confirmed finding has a file, line and evidence excerpt.
issues.md, check whether this run shows it fixed (Resolved), still present (Open), or back after being Resolved (Regressed, High at least).references/output-format.md. Each finding has: file and line, the command or search that produced it, a 2 to 10 line excerpt (secrets masked), severity and category, the principle it violates, a recommendation (with a code example when useful), and the Next skill.Done when: the output covers every check from Step 1, including the ones not run.
Start a checkpoint before the first write: node <shared>/scripts/checkpoint.js start --skill backend-doctor --feature <slug> (slug health-check, or review-<branch> in review mode). On exit code 3, resume the open checkpoint. Then:
.opencode/everything-backend-memory/issues.md in the memory-schema.md format. Skip findings that already have an entry for the same location and problem; update that entry's Status instead (Resolved with a short note, or Open again with "Regressed on "). Never copy secret values.## Last Updated.checkpoint.js record ... --memory issues.md), snapshot, and close with --status completed.docs/health/doctor-<YYYYMMDD>.md and record it with --created.If Node is unavailable, follow <shared>/tool-rules.md -> Concurrent & Partial Work by hand. In mode=interactive, show the issues.md diff and wait for approval first.
Done when: issues.md reflects this run and the checkpoint is closed.
mode=review checks only what a branch changes.
base=<branch> if given, else the remote default branch (git symbolic-ref --short refs/remotes/origin/HEAD), else main or master. Do not fetch; if the local base may be stale, say so.git diff --name-only --diff-filter=ACMR <base>...HEAD, plus uncommitted changes (git diff --name-only HEAD) and untracked files (git ls-files --others --exclude-standard). Skip deleted, generated and vendored files.vitest related, jest --findRelatedTests), else the full suite. The Target Check still applies.Done when: each changed file is either checked or listed as skipped with a reason.
references/commands.md that needs no install.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub codeworksid/everything-backend --plugin everything-backend16 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./backend-authDesigns, implements and hardens authentication and authorization for backend services, covering sessions, JWT and opaque tokens, OAuth 2.0/OIDC and SSO, API keys, password hashing, account recovery, MFA, RBAC/ABAC, tenant isolation, CSRF and session hardening. Writes the auth core (verifier, middleware, authorization gate), records the auth decision in project memory, and defines the negative tests that prove it. Use when the user says auth, authentication, authorization, login, sign up, sign in, logout, session, JWT, refresh token, OAuth, OIDC, SSO, SAML, SCIM, API key, MFA, 2FA, passkey, WebAuthn, password reset, CSRF, roles, permissions, RBAC, access control, multi-tenant access, or asks to review or harden an existing auth flow./backend-db-designDesigns database schemas for backend features, covering tables or collections, keys, relationships, indexes, constraints, transaction boundaries and multi-tenant isolation, for PostgreSQL, MySQL, MongoDB and Redis. Produces a target schema, an ERD draft and an ordered migration plan, and hands the plan to backend-migrate, which writes and applies the migrations. Use when the user says "design the database", "create a schema", "plan the tables", "model this data", "what tables do I need", "which database should I use", "add a table for", or starts a feature that stores new data./backend-debugTriages and fixes backend bugs with a strict loop: capture the report, reproduce it locally, write a failing test, find the root cause with evidence, apply a minimal fix, prove the test passes and the suite is green, and record the root cause in project memory. Also diagnoses performance regressions and does read-only triage of production incidents. Use when the user says 'bug', 'fix this error', 'it is broken', 'a test fails because the code is wrong', 'regression', 'exception', 'stack trace', '500 error', 'why does X happen', 'why is X slow', or 'debug this'. Not for new features (backend-implement), behavior-preserving cleanup (backend-refactor), writing migrations (backend-migrate), or a security review (backend-security)./backend-deployPlans and generates deployment for backend services. Picks a target (PaaS, containers on a VM, Kubernetes, serverless), writes Dockerfiles for Node, Python, Go and Java, docker compose for local runs, CI/CD pipelines with a gated migration step, Kubernetes manifests or Helm values, and a release plan with rolling, blue-green or canary strategy, rollback and post-deploy checks. Validates the artifacts locally and records the setup in deployment memory and a deploy runbook. Use when the user says deploy, ship to production, Dockerfile, containerize, docker compose, CI/CD, GitHub Actions, GitLab CI, pipeline, Kubernetes, K8s, Helm, readiness or liveness probes, release strategy, canary, blue-green, rollback a release, or environment promotion. Not for writing migrations (backend-migrate), backup, DR and resilience (backend-ops), code health checks (backend-doctor) or security review (backend-security).Other plugins' skills for the same job