Use when generating tests for backend code (Express routes, MongoDB models, Node services) - analyzes file type, detects test framework from package.json, generates comprehensive tests with setup/teardown and edge case coverage
NewMaintained
Automatic
◆QA & Test Engineering pack
Last verified 8/21/2026
What it changes
Passed 16 of 22 test cases with the skill, and 16 of 22 without it.
Without skill73%
With skill73%
Checks it passed that the model alone missed
The generated model tests call Mongoose validation methods directly.
The test suite includes test cases evaluating boundary dates across UTC offset transitions.
The response flags missing test runner and HTTP testing dependencies before writing test code.
3 fixed13 passed either way3 still failing3 broke
Pass-rate lift
0 pp
Tokens
+24%
Agent turns
0%
Response time
-17%
Model gemini-3.6-flashMeasured 8/21/2026v116 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
Check `package.json` for test setup where `devDependencies` contains only `eslint` and `prettier`. Determine the next step.
What was checked, without and with the skill
Checked
Without skill
With skill
The response flags missing test runner and HTTP testing dependencies before writing test code.
Missed
Passed
case-08 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md157 linessingle file
Backend Test Writer
Generate comprehensive backend tests for MERN stack code. Analyzes file type, detects project conventions, produces tests that actually run.
Philosophy: Smart defaults, zero config. Detect everything from project.
Workflow
Copy and track progress:
Phase 0: Infrastructure check
Phase 1: Analyze target files
Phase 2: Generate tests
Phase 3: Report summary
Phase 0: Infrastructure Check
Before generating tests, verify setup:
Check package.json for test framework (Jest/Vitest/Mocha)
If none → prompt: "Set up Jest + Supertest?"
Check for mongodb-memory-server (needed for integration tests)
Detect test file convention (colocated vs __tests__/ vs tests/)
Stop if: No test framework and user declines setup.
Phase 1: Analyze Target Files
Pattern
Type
Test Approach
routes/, *.routes.js
Route
Integration (Supertest + real DB)
controllers/
Controller
Integration
services/
Service
Unit (mocked deps)
models/, *.model.js
Model
Unit (validation tests)
middleware/
Middleware
Unit (mock req/res/next)
utils/, helpers/
Utility
Unit (pure functions)
Override: User can specify --unit or --integration.