/everything-backend:backend-testfrom everything-backend
Designs backend test strategy and writes, runs, and repairs unit, integration, and API contract tests with fixtures, mocks, and coverage tracking.
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.
Give the project a test suite that catches real regressions, runs safely, and reports honest results.
backend-debug asks for a failing test that reproduces a bug.Not for: fixing production bugs (backend-debug), building features (backend-implement), behavior-preserving restructuring (backend-refactor), or execution-based health checks (backend-doctor). backend-test writes and changes test code, test config and fixtures only.
_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>/memory-schema.md -> test-strategy.md before writing that file.<shared>/context-loading.md: priorities 1-2 always, 6 (test-strategy.md) always, 3 (db-schema.md) for integration tests, 4 (api-patterns.md) for endpoint or contract tests, and issues.md for intents repair and reproduce. If memory is missing, run backend-scan first when possible; otherwise continue from the manifests and say so in the summary.<shared>/stacks/, read it (its Testing and Local and Test Setup sections in particular).mode=auto or mode=interactive, as defined in <shared>/tool-rules.md -> mode=auto Contract. This skill does not redefine it.feature=<slug>: names the checkpoint when files are written (e.g. feature=user-registration). Derive a short kebab-case slug from the request if the caller gives none.backend-debug), or matrix (a table of required cases handed over by backend-auth, backend-db-design or backend-api-design).<shared>/tool-rules.md -> Test Integrity): never skip, delete, mark xfail/pending, loosen, or re-snapshot a failing test to get green. A genuinely wrong expectation is changed only after showing the diff and the reason and getting a yes.backend-debug (or to backend-implement when it is a missing feature) with the failing test and the evidence.Run this check before every test command unless the command provably runs only hermetic unit tests: a dedicated unit script or path (e.g. npm run test:unit, pytest tests/unit) whose setup loads no .env or DB/queue config and that has no database hook (see the last bullet). A combined command such as npm test, pytest, go test ./..., ./mvnw test, or ./gradlew test counts as an integration run for this check.
Inspect the environment and config the tests will load (.env.test, .env, test config files, docker-compose*.yml, CI test env, and the current shell environment) for database, queue, cache, mail, and external-API targets, e.g. DATABASE_URL, DB_HOST, REDIS_URL, AMQP_URL/RABBITMQ_URL, KAFKA_BROKERS, SMTP_HOST, MONGODB_URI, payment or email provider keys.
<shared>/tool-rules.md -> Production Targets): localhost, 127.0.0.1, ::1, *.localhost served by a local process or container (not a tunnel or port-forward), a container this run started (e.g. via Testcontainers), or a file database under a temp directory.dev, staging, or test is not proof. Unresolved variables count as not local.pretest/posttest scripts (npm runs them with npm test), Jest/Vitest globalSetup/setupFiles, pytest conftest.py fixtures, Go TestMain, and Maven/Gradle test tasks wired to Flyway or Liquibase. If any of them migrate, reset, seed, or push a schema (e.g. prisma migrate reset --force, prisma db push, knex migrate:latest, alembic upgrade head) against anything other than a disposable database this run started, ask first even for a local database (see <shared>/tool-rules.md -> Always Ask First).A guard "allow" (<shared>/scripts/guard.js or the Claude Code hook) never replaces this check: guard cannot see where DATABASE_URL points.
references/frameworks-and-commands.md -> Detect the Runner).test-strategy.md if present: commands, test database setup, coverage tool, metric and target, known failures.references/frameworks-and-commands.md -> Choosing a Framework, with the exact install command. Installing is Always Ask First; in mode=auto without a user, write the plan and stop before installing.Output: runner, commands (all, unit-only, single file, coverage), layout. Done when each command is known or marked unknown with the reason.
Classify every command you plan to run as hermetic-unit or integration, then run the Target Check above for each integration command. Record the resolved targets for the summary.
Done when every planned command is either cleared to run or marked "ask first" with the target that blocked it.
Pick the layer for each behavior. Optimize for confidence and speed:
| Layer | Target | Rules |
|---|---|---|
| Unit | services, use cases, domain models, pure functions | one behavior per test; Arrange-Act-Assert; assert outputs and side effects; happy path, boundaries and every error branch |
| Integration | repositories with a real database, transaction boundaries, migrations, queues with a test broker | real DB only when SQL or constraints matter, and only a local or ephemeral one; isolate each test (rollback, truncate, or per-worker DB); do not retest business rules |
| Contract / API | HTTP endpoints, gRPC, webhooks, CLI commands | status codes, response shape and error mapping; validate responses against the OpenAPI spec when one exists; smallest surface that proves it; full browser E2E is rarely needed for APIs |
Add the cases that matter for the code under test:
references/api-and-auth-tests.md. When backend-auth or backend-db-design hands over a matrix, every row becomes a test.references/security-tests.md (SQL and NoSQL injection payloads, LIKE wildcards, sort allowlist, cross-tenant ids). They are required by <shared>/sql-safety.md -> Verification, and a failing one is an implementation bug for backend-debug, never a test to loosen.references/security-tests.md -> Beyond SQL (mass assignment, oversized bodies, path traversal, SSRF, command and template payloads, open redirect, webhook signature and replay, JWT alg: none/expired/wrong audience, rate limits), required by <shared>/secure-coding.md -> Verification, step 4.references/async-and-concurrency-tests.md.Anti-patterns: testing the framework; asserting internal call order that is not a requirement; mocking the unit under test; business-rule tests at the HTTP layer.
Output: a list of tests to add or change, grouped by layer. In mode=interactive, show it and wait. Done when every requested behavior has at least one planned test.
node <shared>/scripts/checkpoint.js start --skill backend-test --feature <slug>. If it exits 3, an open checkpoint exists: offer resume or restart (--restart); in mode=auto with no user, resume. Record each file you create or edit (checkpoint.js record --created ... --modified ...), snapshot after each step, and close it when done. If Node is unavailable, follow <shared>/tool-rules.md -> Concurrent & Partial Work by hand.references/fixtures-and-mocking.md. Mock at architectural boundaries only.references/fixtures-and-mocking.md -> Test Database. Applying migrations to a database this run started needs no confirmation; any other database does.Done when every planned test exists and type-checks.
<shared>/tool-rules.md -> Command Time Budgets; a run that does not finish is "did not complete", never passing.test-strategy.md -> Flaky Tests and open test issues in issues.md). They are reported, not hidden, and not counted as your regressions.backend-debug with the test, the failure output, and the suspected location.references/frameworks-and-commands.md -> Flaky Tests. Do not add retries to hide it.checkpoint.js record --modified ...). Re-run after each fix. If the same failure remains after two fix attempts, stop and report it instead of looping.Done when the full suite has run to completion and every failure is classified.
references/frameworks-and-commands.md -> Coverage Commands) with the metric and scope recorded in test-strategy.md, before and after your changes. If the tool is not installed, report coverage as "not measured" and propose the install.backend-debug the test path and name, the run command, and the failure output showing it fails for the reported reason. Do not fix the bug.Compare the result with test-strategy.md -> Coverage Target, or the default targets in references/frameworks-and-commands.md when none is set. Do not change the stored target unless the user asks.
Done when coverage is reported from command output (or as "not measured") and every handoff has its evidence attached.
test-strategy.md per references/memory-and-report.md (runners and commands, layout, test database, fixtures and mocking conventions, coverage target and latest result, flaky tests). Record it with node <shared>/scripts/checkpoint.js record --skill backend-test --feature <slug> --memory test-strategy.md (skip when intent run opened no checkpoint).backend-debug, add an entry to issues.md if the caller has not, following <shared>/memory-schema.md -> issues.md.node <shared>/scripts/checkpoint.js close --skill backend-test --feature <slug>.references/memory-and-report.md.The run is complete when all of these hold:
DATABASE_URL, time budget, missing tool).backend-debug.test-strategy.md reflects the commands and conventions used, and the checkpoint is closed.For intent run, only the first, third and fourth bullets apply (no files are written, so no checkpoint).
characterization: returns 0 for empty cart). Replace them with behavioral tests after the refactor is verified.references/frameworks-and-commands.md: read in Steps 1, 5 and 6 to detect the runner and package manager, for run and single-test commands per stack, coverage commands and metrics, choosing a framework, and flaky-test handling.references/fixtures-and-mocking.md: read in Step 4 when writing factories, fakes, HTTP or time mocks, or setting up a disposable test database and per-test isolation.references/api-and-auth-tests.md: read when testing endpoints, contract conformance against an OpenAPI spec, or authentication and authorization (401/403, ownership, tenant isolation, token cases).references/security-tests.md: read when the feature takes user-controlled query parameters (search, filter, sort, id, free text, JSON filter bodies) or touches tenant- or user-owned data, for injection and cross-tenant negative tests in Vitest + Supertest and pytest + httpx. Rules come from <shared>/sql-safety.md and <shared>/secure-coding.md.references/async-and-concurrency-tests.md: read when testing queue consumers, retries and DLQs, webhooks, scheduled jobs, idempotency keys, concurrent writes, or transaction rollback.references/memory-and-report.md: read in Step 7 for the test-strategy.md entry format and the Test Work Summary template.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.Other plugins' skills for the same job