YugabyteDB ASH Instrumentation
yugabyte/yugabyte-db
Procedure for adding or changing YugabyteDB Active Session History wait states in TServer and DocDB C++ code, including the macro to use for sync and async paths.
A skill your agent uses when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees.
$ npx skills add cxuu/golang-skills --skill go-concurrency -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cxuu/golang-skills go-concurrency --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/go-concurrency .claude/skills/go-concurrency && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .claude/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrencyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cxuu/golang-skills --skill go-concurrency -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cxuu/golang-skills go-concurrency --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/go-concurrency .agents/skills/go-concurrency && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .agents/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cxuu/golang-skills --skill go-concurrency -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cxuu/golang-skills go-concurrency --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/go-concurrency .cursor/skills/go-concurrency && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .cursor/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cxuu/golang-skills.git --path skills/go-concurrency--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cxuu/golang-skills --skill go-concurrency -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cxuu/golang-skills go-concurrency --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/go-concurrency .gemini/skills/go-concurrency && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .gemini/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cxuu/golang-skills go-concurrencyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cxuu/golang-skills --skill go-concurrency -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/go-concurrency .github/skills/go-concurrency && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .github/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cxuu/golang-skills --skill go-concurrency -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cxuu/golang-skills go-concurrency --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cxuu/golang-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/go-concurrency .opencode/skills/go-concurrency && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "go-concurrency" agent skill from https://github.com/cxuu/golang-skills/tree/main/skills/go-concurrency into .opencode/skills/go-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-concurrency", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
go-concurrencyA skill your agent uses when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees.
Go Concurrency is an agent skill from cxuu/golang-skills. Use when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees. Also use when parallelizing work, fixing data races, or protecting shared state, even if the user doesn't explicitly mention concurrency primitives. Does not cover context.Context patterns (see go-context).
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/ADVANCED-PATTERNS.md`, `references/BUFFER-POOLING.md` and `references/GOROUTINE-PATTERNS.md`).
It sits in Development, covering Async programming. The repository describes itself as: AI Agent Skills for idiomatic, production-ready Go code, distilled from Google, Uber, Community. The licence is Apache-2.0.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 91f0c2e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are go).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
pkg.go.devdave.cheney.netyoutube.comchangelog.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Go Concurrency loads about 1.8k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 664 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from cxuu/golang-skills at commit 91f0c2e, republished under its Apache-2.0 licence (© cxuu). 664 words, ~1,775 tokens.
.claude/skills/go-concurrency/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Compatibility: Atomic examples may use standard-library typed atomics where available or
go.uber.org/atomicwhere a project already depends on it.
references/GOROUTINE-PATTERNS.md - Read when starting, stopping, or waiting for goroutines.references/SYNC-PRIMITIVES.md - Read when choosing between mutexes, atomics, channels, and once-like primitives.references/BUFFER-POOLING.md - Read when considering channel-backed or sync.Pool-style reuse.references/ADVANCED-PATTERNS.md - Read for worker pools, pipelines, errgroup, and cancellation-heavy patterns.Normative: When you spawn goroutines, make it clear when or whether they exit.
Goroutines can leak by blocking on channel sends/receives. The GC will not terminate a blocked goroutine even if no other goroutine holds a reference to the channel. Even non-leaking in-flight goroutines cause panics (send on closed channel), data races, memory issues, and resource leaks.
init() — expose lifecycle methods (Close, Stop,
Shutdown) instead// Good: Clear lifetime with WaitGroup.Go (Go 1.25+)
var wg sync.WaitGroup
for item := range queue {
item := item
wg.Go(func() { process(ctx, item) })
}
wg.Wait()// Bad: No way to stop or wait
go func() { for { flush(); time.Sleep(delay) } }()Test for leaks with go.uber.org/goleak.
Principle: Never start a goroutine without knowing how it will stop.
"Do not communicate by sharing memory; instead, share memory by communicating."
This is Go's foundational concurrency design principle. Use channels for ownership transfer and orchestration — when one goroutine produces a value and another consumes it. Use mutexes when multiple goroutines access shared state and channels would add unnecessary complexity.
Default to channels. Fall back to sync.Mutex / sync.RWMutex when the
problem is naturally about protecting a shared data structure (e.g., a cache or
counter) rather than passing data between goroutines.
Normative: Prefer synchronous functions over asynchronous ones.
| Benefit | Why |
|---|---|
| Localized goroutines | Lifetimes easier to reason about |
| Avoids leaks and races | Easier to prevent resource leaks and data races |
| Easier to test | Check input/output without polling |
| Caller flexibility | Caller adds concurrency when needed |
Advisory: It is quite difficult (sometimes impossible) to remove unnecessary concurrency at the caller side. Let the caller add concurrency when needed.
The zero-value of sync.Mutex and sync.RWMutex is valid — almost never need
a pointer to a mutex.
// Good: Zero-value is valid // Bad: Unnecessary pointer
var mu sync.Mutex mu := new(sync.Mutex)Don't embed mutexes — use a named mu field to keep Lock/Unlock as
implementation details, not exported API.
Normative: Specify channel direction where possible.
Direction prevents errors (compiler catches closing a receive-only channel), conveys ownership, and is self-documenting.
func produce(out chan<- int) { /* send-only */ }
func consume(in <-chan int) { /* receive-only */ }
func transform(in <-chan int, out chan<- int) { /* both */ }Channels should have size zero (unbuffered) or one. Any other size requires justification for:
c := make(chan int) // unbuffered — Good
c := make(chan int, 1) // size one — Good
c := make(chan int, 64) // arbitrary — needs justificationUse atomic.Bool, atomic.Int64, etc. (stdlib sync/atomic since Go 1.19, or
go.uber.org/atomic) for type-safe
atomic operations. Raw int32/int64 fields make it easy to forget atomic
access on some code paths.
// Good: Type-safe // Bad: Easy to forget
var running atomic.Bool var running int32 // atomic
running.Store(true) atomic.StoreInt32(&running, 1)
running.Load() running == 1 // race!Advisory: Document thread-safety when it's not obvious from the operation type.
Go users assume read-only operations are safe for concurrent use, and mutating operations are not. Document concurrency when:
Lookup that mutates LRU stateFor context.Context guidance (parameter placement, struct storage, custom types, derivation patterns), see the dedicated go-context skill.
Use a buffered channel as a free list to reuse allocated buffers. This "leaky
buffer" pattern uses select with default for non-blocking operations.
© cxuu, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in skills/go-concurrency of cxuu/golang-skills.
Open the folder on GitHubat commit 91f0c2e
Go Concurrency next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Go Concurrency this skillcxuu/golang-skills | 173 | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| YugabyteDB ASH Instrumentationyugabyte/yugabyte-db | 11k | — | ~4.5k | Automated safety check: Pass | Custom licence | |
| Mirage VFS Adapter Authoringstrukto-ai/mirage | 3.7k | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| Golang Patternsantoniopaya22/go-rest-template | 172 | 9 repos | ~3.5k | Automated safety check: Pass | None | |
| Rust Async Patternsdiodeme/Gold-Band | 143 | 10 repos | ~3.1k | Automated safety check: Pass | AGPL-3.0 | |
| Swift Concurrencyhenrypldev/react-native-nitro-mlx | 100 | 3 repos | ~3.1k | Automated safety check: Pass | MIT |
yugabyte/yugabyte-db
Procedure for adding or changing YugabyteDB Active Session History wait states in TServer and DocDB C++ code, including the macro to use for sync and async paths.
strukto-ai/mirage
Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.
antoniopaya22/go-rest-template
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
diodeme/Gold-Band
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.
henrypldev/react-native-nitro-mlx
Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or…
farm-fe/farm
Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions.
cxuu/golang-skills
A skill your agent uses when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff.
cxuu/golang-skills
A skill your agent uses when reviewing Go code or checking code against community style standards.
cxuu/golang-skills
A skill your agent uses when optimizing Go code, investigating slow performance, or writing performance-critical sections.
cxuu/golang-skills
A skill your agent uses when writing or reviewing documentation for Go packages, types, functions, or methods.
cxuu/golang-skills
A skill your agent uses when writing Go code that returns, wraps, or handles errors — choosing between sentinel errors, custom types, and fmt.Errorf (%w vs %v), structuring error flow, or deciding…
cxuu/golang-skills
A skill your agent uses when defining or implementing Go interfaces, designing abstractions, creating mockable boundaries for testing, or composing types through embedding.
Categories
A skill your agent uses when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees. Go Concurrency is an agent skill from cxuu/golang-skills. Use when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees.
Go Concurrency fits situations like: writing concurrent Go code — goroutines; thread-safety guarantees; parallelizing work; fixing data races.
Run `npx skills add cxuu/golang-skills --skill go-concurrency -a claude-code`. Or copy the skill folder (skills/go-concurrency in cxuu/golang-skills) into .claude/skills/go-concurrency in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cxuu/golang-skills --skill go-concurrency -a codex`. Or copy the skill folder (skills/go-concurrency in cxuu/golang-skills) into .agents/skills/go-concurrency in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cxuu/golang-skills --skill go-concurrency -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-concurrency, .gemini/skills/go-concurrency, .github/skills/go-concurrency and .opencode/skills/go-concurrency in your project.
SKILL.md names no scripts, command-line tools or credentials: Go Concurrency is instructions for the agent only.
SKILL.md names 4 domains. As links in the text: pkg.go.dev, dave.cheney.net, youtube.com and changelog.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Go Concurrency is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Go Concurrency: YugabyteDB ASH Instrumentation (yugabyte/yugabyte-db, 11k stars), Mirage VFS Adapter Authoring (strukto-ai/mirage, 3.7k stars), Golang Patterns (antoniopaya22/go-rest-template, 172 stars) and Rust Async Patterns (diodeme/Gold-Band, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cxuu (a GitHub user) maintains it in cxuu/golang-skills, which has 173 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on June 20, 2026.
Source: cxuu/golang-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.