golang-pro

Implements concurrent Go patterns, microservices, and performance-optimized code with idiomatic error handling.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/ArMaTeC/Redball --skill golang-pro-armatec
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golang-pro
Source: https://github.com/ArMaTeC/Redball/tree/main/.devin/skills/golang-pro
Command: npx skills add https://github.com/ArMaTeC/Redball --skill golang-pro-armatec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing production-grade Go requires mastering concurrency, interface design, generics, and testing discipline. This Skill provides senior-level Go expertise so you avoid goroutine leaks, race conditions, and non-idiomatic code when building concurrent systems and microservices. ## Core Features & Use Cases - Concurrent Programming: Implements goroutines, channels, worker pools, fan-out/fan-in, pipelines, and rate limiting with proper context cancellation and error propagation. - Idiomatic Go Design: Enforces small interfaces, generics with type constraints, functional options, and error wrapping with fmt.Errorf and %w. - Testing & Performance: Produces table-driven tests, benchmarks, fuzzing, race-detector validation, and pprof-based optimization. - Use Case: Ask it to build a gRPC microservice with a worker pool processing jobs concurrently, and it delivers interface definitions, implementation, table-driven tests with -race validation, and an explanation of the concurrency patterns used. ## Quick Start Ask the assistant to implement a concurrent worker pool in Go with context cancellation, error propagation, and table-driven tests.

Frequently Asked Questions about golang-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a worker pool with goroutines in Go?▼

Create a buffered channel for tasks, spawn a fixed number of goroutines that range over the channel, and use sync.WaitGroup to wait for completion. Close the task channel to signal shutdown and always propagate context for cancellation.

How to write table-driven tests in Go?▼

Define a slice of anonymous structs holding test name, inputs, and expected outputs, then loop over them calling t.Run for each subtest. Run tests with the -race flag to detect data races and aim for 80%+ coverage.

When should I use generics in Go?▼

Use generics when the same logic applies to multiple types, such as containers, Map/Filter/Reduce helpers, or algorithms over constraints.Ordered types. Avoid generics when a simple interface or concrete type suffices.

Does Go context cancellation prevent goroutine leaks?▼

Yes, when goroutines select on ctx.Done() alongside their work channels and callers always call the cancel function. Every goroutine needs a clear exit path via context cancellation or channel closure to avoid leaks.

Why does the Go race detector report warnings in my tests?▼

Race warnings occur when multiple goroutines access shared memory without synchronization. Fix them by protecting shared state with sync.Mutex or sync.RWMutex, or by passing data through channels instead of sharing variables.