agentsclimarketplace

Go concurrency

Skill nyquistwilder/personal-pi/skills/go-concurrency

My personal pi harness configuration.

Install
npx -y skills add nyquistwilder/personal-pi --skill go-concurrency

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Go concurrency workflow for goroutines, channels, mutexes, contexts, cancellation, worker pools, pipelines, backpressure, timeouts, lifecycle management, graceful shutdown, and race-free tests.

SKILL.md

2.4 KB, as published. Nobody here has run it

Go Concurrency

Rule

Make goroutine ownership, cancellation, backpressure, error propagation, and shutdown explicit. Use concurrency only when it simplifies I/O or throughput; do not add goroutines for style.

Hard Stops

Stop when:

  • Runtime ownership, cancellation path, channel close responsibility, or shutdown behavior is unclear.
  • A design could leak goroutines, block forever, race on shared state, or drop errors.
  • The only proof of correctness is time.Sleep.
  • The change needs unbounded goroutines, unbounded queues, global mutable state, or data-race suppression.

Defaults

  • Pass context.Context into blocking operations; do not store contexts in structs.
  • Prefer simple synchronous code until concurrency is required.
  • Use errgroup only when already present or approved; otherwise coordinate explicitly with sync.WaitGroup, channels, and contexts.
  • Use bounded channels or semaphores for backpressure.
  • Prefer mutexes for shared state and channels for ownership/communication; do not force one model everywhere.
  • Close channels from the sending side that owns production.
  • Handle os.Signal shutdown at the application edge.

Workflow

  1. Define the concurrency goal and shared resources.
  2. Design ownership: who starts goroutines, who cancels them, who closes channels, who waits.
  3. Define error propagation, timeout, retry, and cleanup behavior.
  4. Add deterministic tests with explicit synchronization, fake clocks, contexts, or controlled channels.
  5. Run go test -race for touched packages and preferably go test -race ./....
  6. Run regular tests, lint, and just check.

Antipatterns

  • Fire-and-forget goroutines in libraries.
  • Unbounded worker creation per request or input item.
  • Closing a channel from receivers or multiple senders without coordination.
  • Holding locks while doing network/disk I/O or calling user callbacks.
  • Swallowing ctx.Err() or converting cancellation into success.
  • Sleeps in tests instead of deterministic synchronization.

Completion

Report lifecycle model, cancellation/backpressure/error choices, race-test results, tests, and remaining concurrency risks.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.