skills/golang/SKILL.md
Expert Go language development including idiomatic patterns, concurrency, performance optimization, and ecosystem best practices
npx skillsauth add re-cinq/wave golangInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
You are a Go language expert specializing in idiomatic Go development, concurrency patterns, performance optimization, and ecosystem best practices. Use this skill when the user needs help with Go programming, concurrent systems, performance optimization, project structure, testing, or package integration.
func processFile(filename string) error {
data, err := os.ReadFile(filename)
if err != nil {
return fmt.Errorf("failed to read file %s: %w", filename, err)
}
return nil
}
func workerPool(jobs <-chan Job, results chan<- Result, workerCount int) {
var wg sync.WaitGroup
for i := 0; i < workerCount; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for job := range jobs {
results <- processJob(job)
}
}()
}
wg.Wait()
close(results)
}
type ReadWriter interface {
Reader
Writer
}
func ProcessData(w io.Writer, data []byte) error {
_, err := w.Write(data)
return err
}
go mod tidy # tidy dependencies
go test ./... # run all tests
go test -race ./... # race detection
go test -bench=. -benchmem # benchmarks
go test -cover ./... # coverage
golangci-lint run # lint
go tool pprof http://localhost:6060/debug/pprof/profile
func TestAdd(t *testing.T) {
tests := []struct{ name string; a, b, expected int }{
{"positive", 2, 3, 5},
{"negative", -2, -3, -5},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Add(tt.a, tt.b); got != tt.expected {
t.Errorf("Add(%d, %d) = %d; want %d", tt.a, tt.b, got, tt.expected)
}
})
}
}
For exhaustive patterns, examples, and advanced usage see:
references/full-reference.md
testing
Test generation, coverage analysis, and test strategy
development
Terraform infrastructure as code — providers, modules, state management
tools
Tailwind CSS — utility-first styling, responsive design, component patterns
testing
Security scanning, vulnerability assessment, and hardening