Skip to content
Back to skills

Go Concurrency Patterns

ASecurity

Use when implementing Go concurrency patterns.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
ai-agentsgo

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill go-concurrency-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Go Concurrency Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Go Concurrency Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-go-concurrency-patterns/badge)](https://www.skillsdirectory.com/skills/loopyluci-go-concurrency-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: go-concurrency-patterns
description: "Use when implementing Go concurrency patterns."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [go, goroutines, channels, select, sync, concurrency, pipeline]
    related_skills: [message-queue-patterns, concurrency-parallelism, data-pipeline-streaming]
---

# Go Concurrency Patterns

Implementing Go concurrency patterns — from goroutines and channels through pipelines, fan-out/in, and advanced sync primitives.

## When to Use

- Building concurrent Go applications
- Implementing worker pools and pipelines
- Managing goroutine lifecycles
- Synchronization with channels and mutexes

## Concurrency Patterns

```go
// Pipeline pattern
func gen(nums ...int) <-chan int {
    out := make(chan int)
    go func() { for _, n := range nums { out <- n }; close(out) }()
    return out
}

func sq(in <-chan int) <-chan int {
    out := make(chan int)
    go func() { for n := range in { out <- n * n }; close(out) }()
    return out
}

// Fan-out / Fan-in
func merge(cs ...<-chan int) <-chan int {
    var wg sync.WaitGroup
    out := make(chan int)
    output := func(c <-chan int) {
        for n := range c { out <- n }
        wg.Done()
    }
    wg.Add(len(cs))
    for _, c := range cs { go output(c) }
    go func() { wg.Wait(); close(out) }()
    return out
}
```

## Verification Checklist

- [ ] Goroutine lifecycle managed (no leaks)
- [ ] Channel directions (send/receive) restricted
- [ ] select with default for non-blocking
- [ ] sync.WaitGroup for goroutine coordination
- [ ] Context for cancellation and deadlines
- [ ] errgroup for error propagation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.