go-concurrency

Enforce context-first signatures and goroutine lifecycle management in Go code.

2|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/jovermier/cc-stack-marketplace --skill go-concurrency-jovermier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-concurrency
Source: https://github.com/jovermier/cc-stack-marketplace/tree/main/plugins/cc-go/skills/go-concurrency
Command: npx skills add https://github.com/jovermier/cc-stack-marketplace --skill go-concurrency-jovermier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Solves the challenge of writing safe, leak-free concurrent Go code.

Core Features & Use Cases

  • Goroutine lifecycle and leak prevention: ensures goroutines exit cleanly on cancellation.
  • Context propagation: advocates passing context through call stacks for cancellation and timeouts.
  • Synchronization primitives: demonstrates correct use of Mutex, RWMutex, WaitGroup, and errgroup.
  • Channel patterns: provides best practices for channel usage and avoiding anti-patterns.
  • Use Case: when you need to design scalable concurrent systems with proper lifecycle management.

Quick Start

Run this skill against a Go project that uses goroutines and channels to receive guidance on lifecycle management, cancellation, and synchronization.

Frequently Asked Questions about go-concurrency

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

FAQPage Schema
How do I prevent goroutine leaks in Go concurrent systems?

To prevent goroutine leaks in Go, enforce explicit goroutine lifecycle management and context-first function signatures, ensuring goroutines exit cleanly on cancellation signals.

How does context propagation work for safe Go concurrency?

Go context propagation passes cancellation and timeouts through call stacks, requiring context-first function signatures to ensure concurrent operations terminate safely during system shutdown.

What is the correct way to use Mutex and WaitGroup in Go?

The correct way to use Mutex and WaitGroup in Go involves applying synchronization primitives to coordinate access to shared state and explicitly manage concurrent goroutine completion.

What are the best practices for Go channels to avoid concurrency anti-patterns?

Best practices for Go channels dictate avoiding anti-patterns through explicit ownership, proper closure, and correct synchronization to build scalable and correct concurrent systems.

When do I need context cancellation patterns in Go goroutines?

You need context cancellation patterns in Go goroutines when designing scalable concurrent systems that require proper lifecycle management to prevent leaks during application shutdown or timeouts.

Can I use errgroup for goroutine synchronization in Go?

Yes, you can use errgroup for goroutine synchronization in Go to manage concurrent operations and propagate errors, complementing standard Mutex and WaitGroup usage for leak-free code.