golang-pro

Implement concurrent Go services with goroutines, channels, and context cancellation.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Manu343726/audible-exporter --skill golang-pro-manu343726
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-pro
Source: https://github.com/Manu343726/audible-exporter/tree/main/.agents/skills/golang-pro
Command: npx skills add https://github.com/Manu343726/audible-exporter --skill golang-pro-manu343726

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and implement correct, maintainable concurrent Go code that performs well and fails safely, instead of relying on ad-hoc goroutines, unclear interfaces, and weak error handling.

Core Features & Use Cases

  • Concurrent Go patterns: Implement goroutine lifecycles with context cancellation, bounded worker pools, fan-out/fan-in pipelines, and safe shutdown behavior.
  • Production-grade service design: Build microservices and gRPC/REST integrations using small, composable interfaces and explicit contracts.
  • Quality and performance discipline: Enforce idiomatic Go with robust error handling, table-driven tests, race-detector validation, and profiling-driven optimizations (pprof/benchmarks).

Use Case: You’re adding an export pipeline that processes many audiobook jobs concurrently—this Skill guides you to implement a context-aware worker pipeline, wrap and propagate errors consistently, benchmark the hot paths, and verify correctness under -race.

Quick Start

Ask the AI to implement your Go pipeline with bounded concurrency and context cancellation for request-scoped processing, using table-driven tests with -race verification and pprof/benchmarks for performance tuning.

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 in Go with proper context cancellation?

To implement a worker pool in Go, use bounded goroutines with channels for task distribution and context cancellation for safe shutdown. This Skill applies idiomatic Go patterns for correct goroutine lifecycle management and request-scoped processing.

What is the best way to structure a fan-out/fan-in pipeline in Go?

A fan-out/fan-in pipeline in Go distributes tasks across multiple goroutines and aggregates results through channels. This Skill guides you to build concurrent pipelines with explicit error wrapping and safe shutdown behavior.

How do I write table-driven tests in Go and validate with the race detector?

Table-driven tests in Go use struct slices to define input and expected output cases, validated with the `-race` flag to detect concurrency issues. This Skill enforces race-detector validation and robust error handling for production code.

Does this approach work for gRPC and REST integrations in Go microservices?

Yes, this approach works for gRPC and REST integrations by building microservices with small, composable interfaces and explicit contracts. This Skill targets production-grade service design using idiomatic Go 1.21+ patterns.

How do I profile a Go application with pprof to optimize concurrent performance?

Profiling a Go application with pprof identifies hot paths in concurrent code for performance tuning and benchmarking. This Skill applies profiling-driven optimizations alongside bounded worker pools and context-aware pipelines.

Why does my Go service leak goroutines during shutdown?

Goroutine leaks during shutdown often occur due to missing context propagation or unbounded goroutine creation. This Skill prevents leaks by applying correct goroutine lifecycle management, context cancellation, and explicit error wrapping.