← Back to list

go-concurrency
by spjoshis
Modular Claude plugins for agent-based expertise and reusable skills across software development and Agile. Easily extend, share, and automate best practices for modern development.
⭐ 1🍴 0📅 Dec 30, 2025
SKILL.md
name: go-concurrency description: Master Go concurrency with goroutines, channels, select, sync primitives, and patterns for building concurrent applications.
Go Concurrency Patterns
Master Go's concurrency model with goroutines, channels, and synchronization for building efficient concurrent systems.
Core Patterns
Goroutines
func main() {
go sayHello() // Launch goroutine
time.Sleep(1 * time.Second) // Wait for goroutine
}
func sayHello() {
fmt.Println("Hello from goroutine")
}
Channels
func main() {
messages := make(chan string)
go func() {
messages <- "ping"
}()
msg := <-messages
fmt.Println(msg)
}
Worker Pool
func worker(id int, jobs <-chan int, results chan<- int) {
for j := range jobs {
fmt.Println("worker", id, "processing job", j)
time.Sleep(time.Second)
results <- j * 2
}
}
func main() {
jobs := make(chan int, 100)
results := make(chan int, 100)
// Start workers
for w := 1; w <= 3; w++ {
go worker(w, jobs, results)
}
// Send jobs
for j := 1; j <= 5; j++ {
jobs <- j
}
close(jobs)
// Collect results
for a := 1; a <= 5; a++ {
<-results
}
}
Select Statement
select {
case msg1 := <-channel1:
fmt.Println("Received", msg1)
case msg2 := <-channel2:
fmt.Println("Received", msg2)
case <-time.After(1 * time.Second):
fmt.Println("Timeout")
}
Best Practices
- Don't communicate by sharing memory; share memory by communicating
- Close channels from sender side
- Use buffered channels wisely
- Handle goroutine cleanup
- Use context for cancellation
- Avoid goroutine leaks
Resources
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
