backend-test-writerlisted
Install: claude install-skill vipincode/exr-agent-skills
# backend-test-writer
Write tests for a target the user points at — a file, a module, or a feature name. This is a pure, on-demand utility: the user calls it explicitly and it does one thing. **It is never invoked by the other skills, never modifies source, and never edits MODULE_REGISTRY.md.**
## Step 1 — Read context (do not assume)
**First resolve the project dir** for this (`backend`) domain via `../LAYOUT.md` (read
`.claude/workspace.json`; fall back to the repo root if a root `ARCHITECTURE.md` exists with no
manifest). The contract files, `package.json` (framework detection), and the target files are
all **relative to that project dir**.
1. The **target file(s)** the user named — read the real implementation, not an assumption of it. If they named a module or feature, read its service/controller/routes.
2. `ARCHITECTURE.md` — the response envelope, error model, and validation flow, so assertions match how the code actually behaves (e.g. assert `{ success: true, data }`, assert error `{ success: false, error: { code } }`, assert the right `AppError` status codes).
3. `MODULE_REGISTRY.md` — to know which collaborators are shared real pieces. Mock the *real* shared dependencies (the model, another module's service) rather than inventing fakes that don't match reality.
## Step 2 — Detect, don't ask (where possible)
- **Framework**: read `package.json`. Vitest or Jest — use whatever is installed. Only ask if neither is present (then suggest Vitest as the default for a