frontend-test-writerlisted
Install: claude install-skill vipincode/exr-agent-skills
# frontend-test-writer
Write tests for a frontend target the user points at — a component, a hook, a schema, a feature module, or a feature name. 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 (`frontend`) domain via `../LAYOUT.md` (read `.claude/workspace.json`; fall back to the repo root if a root `ARCHITECTURE.md` for a Next.js/React app 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 template/components/hooks/api/schema. You test what the code actually does.
2. `ARCHITECTURE.md` — the conventions that shape assertions: the response envelope (so a mocked API response matches reality), the BFF/axios path, that server state goes through TanStack Query, that forms use the shared `*Field`, that types come from Zod.
3. `MODULE_REGISTRY.md` — to know which collaborators are real shared pieces, so you mock the *real* dependency (the `api` axios instance, a shared component, `useAuth`) rather than inventing a fake that drifts from how it actually behaves.
4. **If a `_docs/FEATURE_PLAN_<name>.md` exists** for the target, read