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.
gleak goroutine leak detection — capture a Goroutines() snapshot before a test, then Eventually(Goroutines).ShouldNot(HaveLeaked(snapshot)) to assert none leaked, with the…
$ npx skills add onsi/gomega --skill gleak -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install onsi/gomega gleak --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/onsi/gomega.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/gomega/skills/gleak .claude/skills/gleak && 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 "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .claude/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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/onsi/gomega/tree/master/plugins/gomega/skills/gleakType 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 onsi/gomega --skill gleak -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install onsi/gomega gleak --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/onsi/gomega.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/gomega/skills/gleak .agents/skills/gleak && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .agents/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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 onsi/gomega --skill gleak -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install onsi/gomega gleak --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/onsi/gomega.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/gomega/skills/gleak .cursor/skills/gleak && 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 "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .cursor/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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/onsi/gomega.git --path plugins/gomega/skills/gleak--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 onsi/gomega --skill gleak -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install onsi/gomega gleak --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/onsi/gomega.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/gomega/skills/gleak .gemini/skills/gleak && 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 "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .gemini/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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 onsi/gomega gleakInstalls 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 onsi/gomega --skill gleak -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/onsi/gomega.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/gomega/skills/gleak .github/skills/gleak && 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 "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .github/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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 onsi/gomega --skill gleak -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install onsi/gomega gleak --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/onsi/gomega.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/gomega/skills/gleak .opencode/skills/gleak && 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 "gleak" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/gleak into .opencode/skills/gleak/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gleak", 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.
gleakgleak goroutine leak detection — capture a Goroutines() snapshot before a test, then Eventually(Goroutines).ShouldNot(HaveLeaked(snapshot)) to assert none leaked, with the…
Gleak is an agent skill from onsi/gomega. gleak goroutine leak detection — capture a Goroutines() snapshot before a test, then Eventually(Goroutines).ShouldNot(HaveLeaked(snapshot)) to assert none leaked, with the BeforeEach/AfterEach/DeferCleanup pattern, ignoring matchers IgnoringTopFunction/IgnoringInBacktrace/IgnoringGoroutines/IgnoringCreator, well-known non-leaky goroutines, goroutine IDs, ReportFilenameWithPath, and the Ginkgo -p IgnoreGinkgoParallelClient gotcha. Use when a test must verify goroutines started during the test have all wound down…
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Async programming. The repository describes itself as: Ginkgo's Preferred Matcher Library. The licence is MIT.
Read from SKILL.md and the folder at commit 37fa900. 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):
onsi.github.ioFrom 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.
Gleak loads about 1.5k tokens when it runs. Until then it costs about 136 tokens; SKILL.md has 529 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 onsi/gomega at commit 37fa900, republished under its MIT licence (© onsi). 529 words, ~1,507 tokens.
.claude/skills/gleak/SKILL.md (or your agent's skills folder).gleak discovers all running goroutines and fails a test if any "leaked" — i.e. are still running after the test that aren't well-known framework/runtime goroutines and aren't on your ignore list. Docs: https://onsi.github.io/gomega/#gleak-finding-leaked-goroutines. Cross-refs: gomega:async, gomega:matchers.
gleak is an experimental Gomega package.
import (
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gleak" // often dot-imported too, for HaveLeaked/Goroutines/Ignoring*
)Capture a baseline snapshot before the test; assert no leak after. The cleanup runs Eventually(Goroutines).ShouldNot(HaveLeaked(snapshot)):
BeforeEach(func() {
goods := gleak.Goroutines() // snapshot of "good" goroutines, taken now
DeferCleanup(func() {
Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
})
})Equivalent BeforeEach/AfterEach form (carry the snapshot in a closure variable):
var goods []gleak.Goroutine
BeforeEach(func() { goods = gleak.Goroutines() })
AfterEach(func() { Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods)) })Simplest possible form — no snapshot, relies only on the built-in well-known list:
AfterEach(func() {
Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked())
})ALWAYS use Eventually, never Expect. Goroutines wind down asynchronously; a synchronous Expect races their shutdown and produces false positives. Eventually re-polls until they terminate or it times out (default 1s / 10ms poll — see gomega:async to tune).
Pass Goroutines, not Goroutines(). Note the missing (). Eventually must call it repeatedly on each poll. Writing Eventually(gleak.Goroutines()) snapshots once and defeats the retry. (Calling gleak.Goroutines() with parens is correct only when taking a baseline snapshot to pass into HaveLeaked.)
Capture the baseline at the right time — in BeforeEach, before the test spins anything up, so genuinely pre-existing goroutines are filtered out.
HaveLeaked succeeds when goroutines leaked. A success is a failure of your test — so it's almost always used with ShouldNot/NotTo. The built-in well-known list is always applied and cannot be disabled.
HaveLeaked([ignoring...])gleak.HaveLeaked(NONLEAKY1, NONLEAKY2, ...)After filtering out well-known goroutines and everything matched by the ignoring args, it matches if any goroutines remain. Each arg is either a goroutine matcher or a shorthand:
"foo.bar" → IgnoringTopFunction("foo.bar") (exact topmost-function name)"foo.bar..." → top function name starts with prefix foo.bar."foo.bar [chan receive]" → exact top function and goroutine state begins with chan receive[]Goroutine (a snapshot) → IgnoringGoroutines(snapshot), filtered by goroutine IDGomegaMatcher that operates on an actual of type gleak.Goroutine (e.g. HaveField, WithTransform)IgnoringTopFunction(name) — matches a goroutine whose topmost stack function is name; supports the "name", "prefix...", and "name [state]" forms above.IgnoringInBacktrace(substr) — matches if substr appears anywhere in the backtrace (lazy strings.Contains).IgnoringGoroutines(snapshot) — matches goroutines that are elements of snapshot, compared by goroutine ID.IgnoringCreator(name) — matches by the name of the function that created the goroutine; supports "name" and "prefix..." forms.Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(
gleak.IgnoringTopFunction("github.com/me/pkg.worker"),
gleak.IgnoringInBacktrace("github.com/some/dep.background"),
goods, // the snapshot, as IgnoringGoroutines shorthand
))-p (parallel)Running with ginkgo -p adds a background goroutine for Ginkgo↔package communication that will look leaked. Call gleak.IgnoreGinkgoParallelClient() at the start of each package's BeforeSuite so gleak adds it to the ignore list:
var _ = BeforeSuite(func() {
gleak.IgnoreGinkgoParallelClient()
})Always filtered, by topmost function name (or backtrace), so you don't list them:
os/signal.signal_recv, os/signal.loop, runtime.ensureSigMtesting: testing.RunTests, testing.(*T).Run, testing.(*T).Parallel (all [chan receive])(*Suite).runNode, the interrupt-handler/progress-signal goroutines, output-interceptor ResumeIntercepting, and the v1 spec-runner interrupt handlerruntime.ReadTrace in its backtraceOn a leak, gleak prints only the leaked goroutines (not all, unlike a panic), in a compact one-line-per-frame form. This output is not subject to format.MaxLength. By default locations show package + file + line (main.foo.func1() at foo/bar.go:123). Set gleak.ReportFilenameWithPath = true for full absolute paths.
gleak.Goroutine values carry a goroutine ID (goid) parsed from the runtime stack; IgnoringGoroutines matches snapshots by these IDs. IDs are not reused (barring 64-bit counter wraparound) but are not densely sequential. Use them for testing/debugging only — never for program logic.
© onsi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/gomega/skills/gleak of onsi/gomega.
Open the folder on GitHubat commit 37fa900
Gleak 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 |
|---|---|---|---|---|---|---|
| Gleak this skillonsi/gomega | 2.4k | — | ~1.5k | Automated safety check: Pass | MIT | |
| 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.
onsi/gomega
Write correct synchronous Gomega assertions — Expect/Ω notation, the To/NotTo/ToNot/Should/ShouldNot equivalences, the multi-return error idiom, Succeed vs HaveOccurred, the .Error() chaining form…
onsi/gomega
Polling assertions in Gomega — Eventually (poll until it passes) and Consistently (must keep passing), the func(g Gomega) callback idiom, WithTimeout/WithPolling/Within/ProbeEvery, WithContext and…
onsi/gomega
Build compound Gomega assertions by combining matchers — And/SatisfyAll (all pass), Or/SatisfyAny (any pass), Not (negate), WithTransform to map the actual before matching, Satisfy for an ad-hoc…
onsi/gomega
Writing your own Gomega matchers — the GomegaMatcher interface (Match/FailureMessage/NegatedFailureMessage), gcustom.MakeMatcher with message templates and template data, the format package helpers…
onsi/gomega
Testing streaming io buffers with gbytes — gbytes.NewBuffer() (an io.Writer also returned by gexec sessions), the Say(regexp) matcher that forward-scans from a moving read cursor, the canonical…
onsi/gomega
Testing external processes with gexec — compile binaries with Build/BuildWithEnvironment/BuildIn and CleanupBuildArtifacts, start them with Start returning a Session, await exit with the Exit…
Categories
gleak goroutine leak detection — capture a Goroutines() snapshot before a test, then Eventually(Goroutines).ShouldNot(HaveLeaked(snapshot)) to assert none leaked, with the…. Gleak is an agent skill from onsi/gomega.ShouldNot(HaveLeaked(snapshot)) to assert none leaked, with the BeforeEach/AfterEach/DeferCleanup pattern, ignoring matchers IgnoringTopFunction/IgnoringInBacktrace/IgnoringGoroutines/IgnoringCreator, well-known non-leaky goroutines, goroutine IDs, ReportFilenameWithPath, and the Ginkgo -p IgnoreGinkgoParallelClient gotcha.
Gleak fits situations like: A test must verify goroutines started during the test have all wound down and nothing leaked; tasks that involve Async programming.
Run `npx skills add onsi/gomega --skill gleak -a claude-code`. Or copy the skill folder (plugins/gomega/skills/gleak in onsi/gomega) into .claude/skills/gleak in your project. Claude Code loads it when a task matches its description.
Run `npx skills add onsi/gomega --skill gleak -a codex`. Or copy the skill folder (plugins/gomega/skills/gleak in onsi/gomega) into .agents/skills/gleak 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 onsi/gomega --skill gleak -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gleak, .gemini/skills/gleak, .github/skills/gleak and .opencode/skills/gleak in your project.
SKILL.md names no scripts, command-line tools or credentials: Gleak is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: onsi.github.io. 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.
Gleak is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Gleak: 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.
onsi (a GitHub user) maintains it in onsi/gomega, which has 2,357 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 24, 2026.
Source: onsi/gomega on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.