test-go
Automates Go testing gates including race detection, benchmarks, and coverage requirements for Paryty Cluster.
Install
mkdir -p .claude/skills/test-go && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15924" && unzip -o skill.zip -d .claude/skills/test-go && rm skill.zipInstalls to .claude/skills/test-go
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run comprehensive Go tests for Paryty Cluster — unit tests, race detection, integration tests, benchmarks, coverage, and escape analysis.Key capabilities
- →Run Go unit tests with verbose output
- →Perform race detection across the codebase
- →Execute benchmarks and report memory allocations
- →Generate code coverage reports
- →Conduct escape analysis on hot paths
- →Run `go vet` for static analysis
How it works
The skill executes a series of Go commands in a specified directory to perform unit tests, race detection, benchmarks, coverage analysis, escape analysis, and vet checks.
Inputs & outputs
When to use test-go
- →Running Go unit tests
- →Detecting race conditions
- →Benchmarking performance
- →Generating coverage reports
About this skill
Test Go — Comprehensive Go Testing
Execution Steps
Step 1: Unit Tests
cd paryty-v1.0/cluster && go test -v -count=1 ./... 2>&1
Step 2: Race Detection
cd paryty-v1.0/cluster && go test -race -count=1 ./... 2>&1
Step 3: Benchmarks
cd paryty-v1.0/cluster && go test -bench=. -benchmem -count=3 ./... 2>&1
Report any allocations in hot paths.
Step 4: Coverage Report
cd paryty-v1.0/cluster && go test -coverprofile=coverage.out -covermode=atomic ./... 2>&1
cd paryty-v1.0/cluster && go tool cover -func=coverage.out | Select-String "total"
Step 5: Escape Analysis (Hot Paths)
cd paryty-v1.0/cluster && go build -gcflags="-m" ./cmd/pipeline/... 2>&1 | Select-String "escapes to heap"
Step 6: Vet
cd paryty-v1.0/cluster && go vet ./... 2>&1
Test Patterns Required
Table-Driven Tests
func TestXxx(t *testing.T) {
tests := []struct {
name string
input Input
expected Output
}{ /* cases */ }
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { /* assert */ })
}
}
Integration Tests (build tag)
//go:build integration
func TestIngestion_GRPCStream(t *testing.T) { /* requires infra */ }
Coverage Requirements
| Package | Minimum |
|---|---|
| internal/processing/ | 80% |
| internal/storage/ | 75% |
| internal/stream/ | 75% |
| internal/api/ | 70% |
| internal/models/ | 90% |
Exit Protocol
- ALL pass: "All Go testing gates passed"
- Test fails: Report name + assertion + file:line, STOP
- Race detected: Report stacks, STOP
- Coverage below threshold: Report packages, STOP
- Benchmark regression >10%: Report, STOP
When not to use it
- →When testing a language other than Go
- →When only a subset of testing protocols is needed
Limitations
- →Specific to Go projects within the 'paryty-v1.0/cluster' directory
- →Requires specific test patterns like table-driven tests and integration tests with build tags
- →Enforces minimum coverage requirements for specified packages
How it compares
This workflow automates a complete suite of Go testing and analysis commands, providing a standardized and thorough evaluation of the codebase compared to running individual tests manually.
Compared to similar skills
test-go side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| test-go (this skill) | 0 | 2mo | Review | Intermediate |
| go-dev-guidelines | 14 | 9mo | No flags | Intermediate |
| golang-pro | 14 | 4mo | No flags | Advanced |
| go-concurrency-patterns | 7 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DeLaser123
View all by DeLaser123 →You might also like
go-dev-guidelines
jumppad-labs
This skill should be used when writing, refactoring, or testing Go code. It provides idiomatic Go development patterns, TDD-based workflows, project structure conventions, and testing best practices using testify/require and mockery. Activate this skill when creating new Go features, services, packages, tests, or when setting up new Go projects.
golang-pro
sickn33
Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices. Expert in the latest Go ecosystem including generics, workspaces, and cutting-edge frameworks. Use PROACTIVELY for Go development, architecture design, or performance optimization.
go-concurrency-patterns
wshobson
Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.
code-formatting
openshift
MANDATORY: When writing Go tests, you MUST use 'When...it should...' format for ALL test names. When writing any Go code, you MUST remind user to run 'make lint-fix' and 'make verify'. These are non-negotiable HyperShift requirements.
tidb-test-guidelines
pingcap
Decide where to place TiDB tests and how to write them (basic structure, naming, testdata usage). Use when asked about test locations, writing conventions, shard_count limits, casetest categorization, or when reviewing test changes in code review.
golang-performance
MadAppGang
Use when profiling Go applications (pprof), running benchmarks, optimizing memory/CPU usage, or debugging performance bottlenecks in production Go code.