go-test-gen

Installation
SKILL.md

Go Unit Test Generator

Generate unit tests for Go service and repository layers.

Critical Rules

  • NO mock.Any/mock.Anything - Use explicit arguments
  • NO mock.MatchedBy - Prefer concrete structs
  • ALL mocks require call counts - .Once(), .Twice(), etc.
  • Use wantErr error - Not wantErr bool
  • Test naming: TestPackageName_FunctionName with cases like "Success_with_valid_input"
  • NO handler/API tests - Service and repository layers only

Workflow

  1. Identify layer: service or repository
  2. Read function to test
  3. For service tests: See references/service-tests.md
  4. For repository tests: See references/repository-tests.md
Related skills

More from sultanfarizbythen/skills

Installs
10
First Seen
Mar 13, 2026