← ClaudeAtlas

test-golisted

Write, review, and improve Go test code for this project. Use whenever generating, reviewing, or modifying Go tests - including when invoked by the Tester agent, the /test prompt, or any test-related request. Covers table-driven tests, subtests, t.Parallel(), test helpers with t.Helper(), error assertions via errors.As/errors.Is, fixture loading from testdata/, httptest servers, env-gated integration tests, mock/fake/spy patterns, and adapter conformance. Do NOT use for benchmarks or performance profiling.
sergeyklay/.agents · ★ 5 · Testing & QA · score 80
Install: claude install-skill sergeyklay/.agents
# Go Testing ## Placeholders Examples below use two placeholders. They are not literal - substitute the actual names from the project being worked on, matching the case of the surrounding context: - `{PROJECT}` - the project's identifier (e.g. env-var prefix, repo name). In env vars: `MYAPP_…`. In prose: `MyApp` or `myapp`. - `{integration}` - an external system or adapter name (e.g. `jira`, `stripe`, `claude`). In paths: `internal/tracker/jira/`. In env vars: `JIRA_…`. In type names: `JiraAdapter`. `.go` files in `assets/` use concrete-looking sample names (`Adapter`, `MYAPP_INTEGRATION_TEST`, etc.) so the templates stay syntactically valid Go; comments inside each template tell you what to rename. ## Decision Framework Before writing any test, determine which category it belongs to: | Category | Characteristics | Run condition | | ---------------------- | -------------------------------------------------- | ------------------------------------------------------- | | **Unit** | Deterministic, no I/O, no network | Always (`make test`) | | **Unit with fixtures** | Reads `testdata/` files, uses `t.TempDir()` | Always | | **Unit with httptest** | Spins up `httptest.NewServer`, tests HTTP adapters | Always | | **Int