Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add xxxryan/agent-skills --skill "go-concurrency-audit"
Install specific skill from multi-skill repository
# Description
Audit Go code for concurrency bugs: data races, goroutine leaks, deadlocks, channel misuse, and context leaks. Use when the user mentions goroutines, worker pools, timeouts, stuck requests, high CPU, or race detector failures.
# SKILL.md
name: go-concurrency-audit
description: "Audit Go code for concurrency bugs: data races, goroutine leaks, deadlocks, channel misuse, and context leaks. Use when the user mentions goroutines, worker pools, timeouts, stuck requests, high CPU, or race detector failures."
compatibility: Best with local repo access and ability to run go test -race. Can also operate on pasted code/diff.
metadata:
short-description: Find Go concurrency bugs
allowed-tools: "Bash(go:) Bash(git:) Read"
Go Concurrency Audit
What to look for
- Data races (shared state without sync)
- Goroutine leaks (missing cancel/close, infinite loops)
- Deadlocks (lock ordering, blocking sends/receives)
- Channel ownership confusion (who closes)
- Unbounded concurrency (fan-out without limits)
- Context misuse (not passed, not honored, missing deadlines)
Workflow
- Identify concurrency surfaces
-
goroutines, channels, mutexes, atomics, waitgroups, errgroup, pools
-
Static audit (from code)
- Map lifecycle: who creates, who cancels, who waits
- Ensure every goroutine has an exit path
- Check select loops: default cases, timers, tickers are stopped
-
Verify lock ordering and minimal critical sections
-
Dynamic checks (if available)
- Run targeted tests with race detector:
go test ./... -race
- Suggest reproducer / stress tests if missing
Output format
Findings (with severity)
- Blocker: ...
- High: ...
- Medium: ...
- Low: ...
Suggested fixes
- ...
Recommended tests
- ...
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.