Agent skill
testing-go-code
Run Go unit tests, coverage reports, and benchmarks. Use when you need to run tests, check coverage, run benchmarks, or regenerate mocks after interface changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/testing-go-code
SKILL.md
Testing Go Code
All commands run from the Go module root (installer/).
Unit Tests
task test # Run all tests with race detection
task test -- -run TestName # Run specific test(s)
task test -- -short # Skip integration tests
For test conventions (naming, assertions, table-driven patterns, mock usage), see the writing-go-tests skill.
Coverage
task cov
Runs tests with coverage and opens an HTML report in the browser.
Benchmarks
task bench
Runs all benchmarks with memory allocation stats.
Combined Check
task check
Runs tests + lint in sequence. Use before committing.
Mock Regeneration
mockery
Run from the module root with no arguments after adding or modifying interfaces. Configuration is in .mockery.yml. Never edit generated mock files (*_mock.go) manually.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?