SkillVaultskills Browse all 500 skills

Code Quality · Version 1.4.0 · Reviewed 2026-08-02

Go Concurrency Reviewer

Make a defensible decision about goroutine leak detection and channel design with evidence, explicit trade-offs, and a verification plan.

4 method steps 6 documented failure modes 5 diagnostic checks 7 quality gates

Reviews goroutine lifetime, channel ownership, cancellation propagation, data races, backpressure, and shutdown behavior in Go services.

₹99 one-time

Get this skill archive

What this skill helps you do

  • Goroutine leak detection
  • Channel design
  • Cancellation review

How Go Concurrency Reviewer works

You provide

Shared-state access paths, pool sizing, and symptoms

It inspects

Read-modify-write and lock ordering for goroutine leak detection

It decides

A channel design fix using atomic or constraint enforcement

You verify

Reproduce under real concurrency and confirm one outcome

What it checks first

Go Concurrency Reviewer reviews goroutine lifetime, channel ownership, cancellation propagation, data races, backpressure, and shutdown behavior in Go services. Use it when the work involves Goroutine leak detection, Channel design, Cancellation review.

  1. Every read-modify-write on shared state and whether it is atomic, locked, or transactional.
  2. Lock acquisition order across code paths, since inconsistent ordering is the definition of a deadlock risk.
  3. Whether async work outlives the request that started it, and what cancels it.
  4. Pool sizing relative to the blocking behavior of the work, because blocking calls on a small pool serialize everything.
  5. Whether the failure reproduces under load or only in production, which indicates a timing-dependent defect.

Failure modes it recognizes

  • Lost update where two transactions read the same value and the second write silently discards the first.
  • Deadlock from two paths acquiring the same two locks in opposite order.
  • Thread-pool exhaustion where blocking I/O on the pool starves the work that would release it.
  • A cancelled request whose downstream work continues, consuming capacity and producing orphaned writes.
  • Double execution of a scheduled job when two instances both believe they hold leadership.
  • Unbounded queue growth converting backpressure into memory exhaustion.

Answers it will reject

  • Adding a sleep to fix a race, which changes the probability without removing the defect.
  • Widening a lock to make a bug disappear, trading correctness ambiguity for a throughput collapse.
  • Assuming a single instance, which becomes false at the first horizontal scale event.
  • Using a database read followed by an application-level uniqueness check instead of a unique constraint.

Decision rules it applies

  • Prefer atomic database operations and unique constraints over application-level coordination.
  • Acquire locks in a globally consistent order and hold them for the shortest possible span.
  • Make operations idempotent so that at-least-once execution is safe.
  • Bound every queue and every retry; unbounded means the failure mode is chosen by the environment.

Evidence it asks for

  • Reproduce under concurrency with a load test rather than reasoning about interleavings alone.
  • Capture a thread or task dump during the stall to see what each worker is blocked on.
  • Add a unique constraint temporarily to prove whether duplicates are occurring.

The method inside

  1. Map the artifact, actors, boundaries, and invariants relevant to goroutine leak detection.
  2. Trace concrete failure or abuse paths for channel design; do not report checklist items without a mechanism.
  3. Prioritize cancellation review findings by impact, likelihood, confidence, and cost of correction.
  4. Recommend the smallest defensible change, then define how an independent reviewer can verify it.

Deliverables

  • Goroutine leak detection assessment
  • Channel design decision and action plan
  • Cancellation review verification checklist

Evidence requirements

  • Functional and quality requirements
  • Scale, latency, consistency, cost, and compliance constraints
  • Current topology and alternatives considered

Quality gates

  • Every material claim traces to supplied evidence or is labeled as a hypothesis.
  • The response follows the declared deliverable contract.
  • No execution, access, measurement, or verification is invented.
  • Secrets and personal data are redacted rather than repeated.
  • The user receives a concrete independent verification step.
  • The relevant failure modes in this domain were considered rather than only the reported symptom.
  • No listed anti-pattern was recommended as a solution.

Example task

Input

Review this Go worker pool. Memory grows slowly and shutdown sometimes hangs forever.

Expected output

Workers range over a channel that is never closed, while producers ignore context cancellation. Give one owner responsibility for closing the channel and select on ctx.Done in every blocking send...

Boundaries and compatibility

Ideal for

  • Goroutine leak detection: produce a decision or artifact grounded in supplied evidence.
  • Channel design: produce a decision or artifact grounded in supplied evidence.
  • Cancellation review: produce a decision or artifact grounded in supplied evidence.

Out of scope

  • Producing a generic reference architecture without requirements
  • Hiding material trade-offs behind best-practice language

Agent compatibility

  • GitHub Copilot custom agents
  • Claude Agent Skills / SKILL.md
  • Any instruction-following chat model

Tool policy: Advisory by default. No tools are assumed. If the host provides tools, use read-only evidence gathering unless the user explicitly approves a scoped write or execution action.