Source profileQuality 93/100Review permissions

johnqtcg/awesome-skills/skills/go-concurrency-review/SKILL.md

go-concurrency-review

Review Go code for concurrency safety and goroutine lifecycle issues including race conditions, deadlocks, goroutine leaks, mutex misuse, and context propagation. Trigger when code contains go func, channels, sync primitives, WaitGroup, errgroup, or goroutine lifecycle management. Use for concurrency-focused review of Go projects.

Source repository stars
30
Declared platforms
0
Static risk flags
1
Last source update
2026-08-22
Source checked
2026-08-25

Decision brief

What it does: where it fits

Review Go code for concurrency safety and goroutine lifecycle issues including race conditions, deadlocks, goroutine leaks, mutex misuse, and context propagation. Trigger when code contains go func, channels, sync primitives, WaitGroup, errgroup, or goroutine lifecycle management.

Best for

  • Code contains go func, goroutine creation
  • Code uses channels, sync primitives (Mutex, RWMutex, WaitGroup)
  • Code uses errgroup, singleflight

Not for

  • Security vulnerabilities → go-security-review
  • Performance optimization (lock contention as perf issue) → go-performance-review

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-concurrency-review"
Safe inspection promptEditorial

Inspect the Agent Skill "go-concurrency-review" from https://github.com/johnqtcg/awesome-skills/blob/d63cf368c1b106871b56454bd73c293701bef500/skills/go-concurrency-review/SKILL.md at commit d63cf368c1b106871b56454bd73c293701bef500. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Define scope — files/diff under review. Apply Generated Code Exclusion Gate. 2. Gather evidence — read changed files, identify concurrency patterns: go func, chan, sync., errgroup, context.WithCancel, select, time.After. 3. Load references — always load go-concurrency-pattern…

    Define scope — files/diff under review. Apply Generated Code Exclusion Gate.Gather evidence — read changed files, identify concurrency patterns: go func, chan, sync., errgroup, context.WithCancel, select, time.After.Load references — always load go-concurrency-patterns.md.
  2. 02

    Review Discipline

    Concurrency and lifecycle only — never comment on security, performance, style, tests, errors, or logic

    Concurrency and lifecycle only — never comment on security, performance, style, tests, errors, or logicExecute ALL 14 checklist items — High findings in one area do not excuse skipping othersAlways attempt go test -race — it is the most authoritative evidence source
  3. 03

    Purpose

    Identify concurrency defects and goroutine lifecycle issues in Go code. Scope: race conditions, deadlocks, goroutine leaks, mutex misuse, context propagation, and lifecycle management.

    Identify concurrency defects and goroutine lifecycle issues in Go code. Scope: race conditions, deadlocks, goroutine leaks, mutex misuse, context propagation, and lifecycle management.This skill does NOT cover: security vulnerabilities, performance optimization, code style, test quality, error handling patterns, or business logic — those belong to sibling vertical skills.
  4. 04

    When To Use

    Code contains go func, goroutine creation

    Code contains go func, goroutine creationCode uses channels, sync primitives (Mutex, RWMutex, WaitGroup)Code uses errgroup, singleflight
  5. 05

    When NOT To Use

    Security vulnerabilities → go-security-review

    Security vulnerabilities → go-security-reviewPerformance optimization (lock contention as perf issue) → go-performance-reviewCode style/lint → go-quality-review

Permission review

Static risk signals and limitations

Runs scripts

medium · line 26

The documentation asks the agent to run terminal commands or scripts.

Never claim `go test -race` ran unless it actually produced output. If not run: state reason + exact command.

Runs scripts

medium · line 130

The documentation asks the agent to run terminal commands or scripts.

`go test -race`: PASS | FAIL | Not run (reason + command)

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars30SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
johnqtcg/awesome-skills
Skill path
skills/go-concurrency-review/SKILL.md
Commit
d63cf368c1b106871b56454bd73c293701bef500
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Go Concurrency Review

Purpose

Identify concurrency defects and goroutine lifecycle issues in Go code. Scope: race conditions, deadlocks, goroutine leaks, mutex misuse, context propagation, and lifecycle management.

This skill does NOT cover: security vulnerabilities, performance optimization, code style, test quality, error handling patterns, or business logic — those belong to sibling vertical skills.

When To Use

  • Code contains go func, goroutine creation
  • Code uses channels, sync primitives (Mutex, RWMutex, WaitGroup)
  • Code uses errgroup, singleflight
  • Code involves context propagation and cancellation
  • Code contains graceful shutdown logic

When NOT To Use

  • Security vulnerabilities → go-security-review
  • Performance optimization (lock contention as perf issue) → go-performance-review
  • Code style/lint → go-quality-review
  • Error handling correctness → go-error-review
  • Business logic → go-logic-review

Mandatory Gates

1) Execution Integrity Gate

Never claim go test -race ran unless it actually produced output. If not run: state reason + exact command.

2) Go Version Gate

Read go.mod for go directive. Key version gates:

  • errgroup.SetLimit (Go 1.20+)
  • sync.OnceValue / sync.OnceFunc (Go 1.21+)
  • Loop variable fix (Go 1.22+) — do NOT flag loop variable capture in Go ≥ 1.22

3) Anti-Example Suppression Gate

MUST quote specific code evidence satisfying precondition. Category match alone insufficient.

Embedded anti-examples:

  • "Race condition on this map" — when map is created and consumed within single function scope or single goroutine. Cite the creation site and all access sites to confirm single-goroutine usage.
  • "Should use errgroup instead of WaitGroup" — when no error propagation is needed and goroutine count is small and fixed (e.g., 2-3 known goroutines).
  • "Missing context propagation" — when function is synchronous, short-lived, performs no I/O, and has no cancellable work.
  • "Loop variable capture bug" — when project uses Go ≥ 1.22 (check go.mod). The loop variable fix makes v := v unnecessary.
  • "Should add mutex" — when data structure is only written during initialization (before any goroutine launch) and only read afterward.

4) Generated Code Exclusion Gate

Exclude: *.pb.go, *_gen.go, mock_*.go. Note excluded files in Execution Status.

Workflow

  1. Define scope — files/diff under review. Apply Generated Code Exclusion Gate.
  2. Gather evidence — read changed files, identify concurrency patterns: go func, chan, sync.*, errgroup, context.WithCancel, select, time.After.
  3. Load references — always load go-concurrency-patterns.md.
  4. Run go test -race if feasible — report output. If not feasible, state reason + exact command.
  5. Evaluate ALL 14 checklist items → apply suppression gate → format output.

Grep-Gated Execution Protocol

This skill uses mechanical grep pre-scanning to guarantee zero missed checklist items. 13 of 14 items are grep-gated; 1 is semantic-only.

Execution Order

  1. Identify target files (from dispatch prompt, or write raw snippet to $TMPDIR/review_snippet.go)
  2. Run grep for all grep-gated checklist items against target files
  3. HIT → run semantic analysis to confirm or reject
  4. MISS → auto-mark NOT FOUND, skip semantic analysis
  5. For compound patterns: run all grep patterns, apply AND/AND NOT logic
  6. For semantic-only items (item 13): full model reasoning
  7. Report only FOUND items

Grep Audit Line

Include in Execution Status: Grep pre-scan: X/13 items hit, Z confirmed as findings (1 semantic-only)

Compound Pattern Protocol

Several items share the trigger go\s+func but have different secondary conditions:

  • Item 8 (Unrecovered panic): go\s+func HIT AND recover() NOT found in goroutine body
  • Item 12 (Loop variable capture): go\s+func HIT AND inside for loop AND Go version < 1.22
  • Item 14 (Unbounded goroutines): go\s+func HIT AND NONE of SetLimit|semaphore|maxConcurrency|worker.*pool|make(chan struct found in same scope

Run go\s+func grep ONCE, then apply all compound conditions to the results.

Concurrency Checklist (14 Items)

All High severity unless marked (Medium).

#ItemCode Pattern TriggersGrep Pattern
1Goroutine leakgo func without context cancel or channel close on return pathgo\s+func|go\s+\w+\(
2Data raceShared map/slice/var written from multiple goroutines without syncgo\s+func (compound: ALSO check shared variable write in closure — semantic confirmation required)
3Mutex misuseMissing defer mu.Unlock(), lock copying (value receiver on mutex-holding struct), inconsistent RWMutexsync\.Mutex|sync\.RWMutex
4Channel deadlockUnbuffered send without receiver, missing close(), select without default on full channelmake\(chan|<-chan|chan<-|<-\s*\w+
5Missing errgroupMultiple goroutines coordinated without error propagation — should use errgroup.Groupsync\.WaitGroup|wg\.
6Missing context propagationcontext.Background() where parent ctx available; context.Value for request-scoped datacontext\.Background\(\)|context\.TODO\(\)|context\.Value
7sync.Pool / sync.Once misusePool without Reset before Put; Once panic caching (Go < 1.21, use OnceValue after)sync\.Pool|sync\.Once
8Unrecovered goroutine panicSpawned goroutine without defer func() { recover() }() — unrecovered panic crashes processgo\s+func (compound: AND NOT recover\(\) in goroutine body — semantic confirmation required)
9Missing graceful shutdownNo shutdown sequence: stop accepting → drain in-flight → cleanup resourceshttp\.Server|ListenAndServe|Shutdown
10Timer/Ticker leaktime.After in loop (allocates each iteration), ticker.Stop() not calledtime\.After|time\.NewTicker|time\.NewTimer
11Misplaced WaitGroup.AddAdd inside goroutine instead of before go statement — must happen-beforewg\.Add|WaitGroup
12Loop variable capture (Go < 1.22)Missing v := v shadow in goroutine closure — check Go version firstgo\s+func (compound: check if inside for loop — version-gated by Go < 1.22)
13Missing singleflight (Medium)Concurrent identical requests without deduplication — cache stampede riskSemantic-Only (no grep pattern — requires understanding concurrent request patterns)
14Unbounded goroutine creationOne goroutine per request/item without semaphore, worker pool, or errgroup.SetLimitgo\s+func (compound: AND NOT SetLimit|semaphore|maxConcurrency|worker.*pool|make\(chan\s+struct)

Severity Rubric

High — Confirmed crash, data corruption, or resource leak: race condition, deadlock, goroutine leak, panic propagation.

Medium — Potential issue under specific conditions: unbounded goroutines under high load, missing singleflight for cache.

Evidence Rules

  • For races: identify the shared variable, the concurrent access points, and the missing synchronization
  • For goroutine leaks: identify creation point and the missing cancellation/close path
  • go test -race output is strongest evidence — run when feasible
  • Merge rule: same issue at ≥3 locations → one finding with location list

Output Format

Findings

[High|Medium] Short Title

  • ID: CONC-NNN
  • Location: path:line
  • Impact: Runtime consequence (panic, corruption, leak, deadlock)
  • Evidence: Concurrent access paths or missing synchronization
  • Recommendation: Specific fix (mutex, channel, errgroup, context)
  • Action: must-fix | follow-up

Suppressed Items

[Suppressed] Short Title

  • Reason: Anti-example matched + evidence cited

Execution Status

  • Go version: X.Y
  • Grep pre-scan: X/13 items hit, Z confirmed as findings (1 semantic-only)
  • go test -race: PASS | FAIL | Not run (reason + command)
  • Excluded (generated): list or None
  • References loaded: list

Summary

1-2 lines with finding count.

Example Output

### Findings

#### [High] Race Condition on Package-Level Map
- **ID:** CONC-001
- **Location:** `internal/cache/store.go:12,15`
- **Impact:** Concurrent HTTP handlers write to shared map — will panic with "concurrent map writes" under load
- **Evidence:** `var store = map[string]string{}` at L5; `store[k] = v` in Set() at L12 called from handler goroutines; no mutex protection
- **Recommendation:** Use `sync.RWMutex` to protect map access, or replace with `sync.Map` if read-heavy
- **Action:** must-fix

#### [Medium] Unbounded Goroutine Creation
- **ID:** CONC-002
- **Location:** `internal/worker/dispatch.go:34`
- **Impact:** Under high load, creates unbounded goroutines — OOM risk
- **Evidence:** `for _, item := range items { go processItem(item) }` — no semaphore or pool limiting concurrency
- **Recommendation:** Use `errgroup.SetLimit(N)` or bounded worker pool
- **Action:** follow-up

### Suppressed Items
#### [Suppressed] Map Race in Test Helper
- **Reason:** Map at test_helpers.go:20 is created in TestMain and only read during subtests (no concurrent writes). Anti-example: "map only accessed within single goroutine"

### Execution Status
- Go version: 1.21
- Grep pre-scan: 8/13 items hit, 2 confirmed as findings (1 semantic-only)
- go test -race: PASS
- Excluded (generated): None
- References loaded: go-concurrency-patterns.md

### Summary
1 High (race condition), 1 Medium (unbounded goroutines).

No-Finding Case

If no issues found: state No concurrency findings identified. Still output Execution Status.

Load References Selectively

ReferenceLoad When
references/go-concurrency-patterns.mdAlways
references/go-review-anti-examples.mdAlways

Review Discipline

  • Concurrency and lifecycle only — never comment on security, performance, style, tests, errors, or logic
  • Execute ALL 14 checklist items — High findings in one area do not excuse skipping others
  • Always attempt go test -race — it is the most authoritative evidence source
  • Check Go version before flagging loop variable capture (item 12)

Frequently asked questions

What to verify before installation and use

What does the go-concurrency-review source document cover?

Review Go code for concurrency safety and goroutine lifecycle issues including race conditions, deadlocks, goroutine leaks, mutex misuse, and context propagation. Trigger when code contains go func, channels, sync primitives, WaitGroup, errgroup, or goroutine lifecycle management.

How do I install go-concurrency-review?

The source record exposes this install command: npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-concurrency-review". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 100147

oaustegard/claude-skills

featuring

Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre