Vercel Composition Patterns
supabase/supabase
React composition patterns that scale. An agent skill from supabase/supabase.
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…
$ npx skills add onsi/gomega --skill assertions -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install onsi/gomega assertions --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/assertions .claude/skills/assertions && 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 "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .claude/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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/assertionsType 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 assertions -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install onsi/gomega assertions --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/assertions .agents/skills/assertions && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .agents/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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 assertions -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install onsi/gomega assertions --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/assertions .cursor/skills/assertions && 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 "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .cursor/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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/assertions--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 assertions -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install onsi/gomega assertions --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/assertions .gemini/skills/assertions && 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 "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .gemini/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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 assertionsInstalls 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 assertions -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/assertions .github/skills/assertions && 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 "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .github/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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 assertions -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 assertions --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/assertions .opencode/skills/assertions && 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 "assertions" agent skill from https://github.com/onsi/gomega/tree/master/plugins/gomega/skills/assertions into .opencode/skills/assertions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertions", 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.
assertionsWrite 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…
Assertions is an agent skill from 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, annotating assertions (format-string and func()string), tuning failure output via the format subpackage (MaxLength/MaxDepth/UseStringerRepresentation/GomegaStringer/TruncatedDiff/RegisterCustomFormatter/format.Object), and asserting inside helper functions with GinkgoHelper/WithOffset/ExpectWithOffset, NewWithT(t) for…
Its SKILL.md is about 2.1k 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. 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.
Assertions loads about 2.1k tokens when it runs. Until then it costs about 161 tokens; SKILL.md has 660 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). 660 words, ~2,051 tokens.
.claude/skills/assertions/SKILL.md (or your agent's skills folder).The core mechanics of asserting now (vs. polling — see gomega:async). Assumes a dot-import (. "github.com/onsi/gomega"). Narrative docs: https://onsi.github.io/gomega/#making-assertions. For the big picture and skill map see gomega:overview.
Expect(ACTUAL).To(Equal(EXPECTED)) // Expect notation
Expect(ACTUAL).NotTo(Equal(EXPECTED))
Expect(ACTUAL).ToNot(Equal(EXPECTED)) // ToNot == NotTo
Ω(ACTUAL).Should(Equal(EXPECTED)) // Ω notation (⌥z on macOS)
Ω(ACTUAL).ShouldNot(Equal(EXPECTED))To == Should, and NotTo == ToNot == ShouldNot — pure syntactic sugar. ACTUAL (left) is anything; the matcher (right) must satisfy GomegaMatcher. Pick one notation per codebase and stay consistent. Matchers are values — see gomega:matchers.
Expect/Ω accept multiple arguments. The matcher runs against the first; the assertion fails unless every trailing argument is nil or zero-valued. This collapses Go's (value, error) pattern:
// instead of:
result, err := DoSomethingHard()
Expect(err).NotTo(HaveOccurred())
Expect(result).To(Equal("foo"))
// write:
Expect(DoSomethingHard()).To(Equal("foo")) // passes only if return is ("foo", nil)For a function returning only error, use Succeed:
Expect(DoSomethingSimple()).To(Succeed()) // func() error
Expect(DoSomethingSimple()).NotTo(Succeed())For an error value you already hold, use HaveOccurred:
err := DoSomethingSimple()
Expect(err).NotTo(HaveOccurred())
Expect(err).To(HaveOccurred())Use Succeed when calling the function inline; use HaveOccurred when you have an err variable. To assert on the error's content (not just its presence), reach for MatchError and friends in gomega:matchers.
Don't use Succeed with a multi-return function. The matcher only sees the first return value; the rest are consumed by the multi-return idiom above. Expect(DoSomethingHard()).To(Succeed()) matches against the string, not the error, and Expect(DoSomethingHard()).NotTo(Succeed()) can never pass.
To assert on the trailing error of a multi-return function while ignoring the other returns, chain .Error():
Expect(MultipleReturnValuesFunc()).Error().To(HaveOccurred())
Expect(MultipleReturnValuesFunc()).Error().NotTo(HaveOccurred()).Error() retargets the assertion at the last return value (the error). The To(HaveOccurred()) form additionally asserts that all the other returns are zero-valued; the NotTo(HaveOccurred()) form lets the other returns be anything. The plain alternative is to capture and assert manually:
_, _, _, err := MultipleReturnValuesFunc()
Expect(err).To(HaveOccurred())Pass a format string (with fmt.Sprintf args) or a func() string after the matcher. It's printed alongside the failure message to add context:
Expect(ACTUAL).To(Equal(EXPECTED), "my annotation %d", foo)
Expect(ACTUAL).To(Equal(EXPECTED), func() string { return expensive() })The func() string form is lazily evaluated — only called if the assertion fails — so use it for any annotation that's expensive to build.
On failure Gomega prints a recursive rendering of the objects involved, produced by the format subpackage. Tune it via package-level globals (set once, e.g. in a test helper or TestMain):
import "github.com/onsi/gomega/format"
format.MaxLength = 4000 // truncate rendered output to N chars; 0 disables truncation
format.MaxDepth = 10 // max recursion depth into nested structures
format.TruncatedDiff = true // for long strings, show only where they differ (false = full strings)
format.UseStringerRepresentation = false // true => call String()/GoString() on Stringer/GoStringer types
format.PrintContextObjects = false // true => print contents of context.Context objectsUseStringerRepresentation defaults to false on purpose: a String() method often hides fields you need to diagnose a failure. Leave it off unless you know the stringer is complete.
GomegaStringer interface. Implement GomegaString() string on a type and Gomega always uses it for that type's rendering, regardless of UseStringerRepresentation. Best practice: define it in a _test.go helper file so you don't leak it into your package's exported API.
func (w Widget) GomegaString() string { return fmt.Sprintf("Widget<%s>", w.id) }Custom formatters. Register a format.CustomFormatter (func(value any) (string, bool)) — return (rendered, true) to handle a value, or ("", false) to pass. Custom formatters take precedence over GomegaStringer and UseStringerRepresentation, and their output is not truncated:
key := format.RegisterCustomFormatter(myFormatter)
defer format.UnregisterCustomFormatter(key)format.Object. Reuse Gomega's renderer directly (the int is indentation depth):
fmt.Println(format.Object(theThing, 1))Factoring assertions into a helper reduces boilerplate, but a naive helper reports failures at the line inside the helper, not the caller. Fix the reported line number with one of these.
With Ginkgo — GinkgoHelper() (recommended). Call it first thing in the helper; Ginkgo then attributes failures to the call site. It nests cleanly across multiple helper layers:
func expectComponents(te TurboEncabulator, components ...string) {
GinkgoHelper()
got, err := te.GetComponents()
Expect(err).NotTo(HaveOccurred())
Expect(got).To(ConsistOf(components))
}Without Ginkgo — WithOffset / ExpectWithOffset. The offset is how many stack frames to skip; 1 points at the helper's caller. These are equivalent:
Expect(err).WithOffset(1).NotTo(HaveOccurred())
ExpectWithOffset(1, err).NotTo(HaveOccurred())(Eventually/Consistently have the same WithOffset / …WithOffset forms — see gomega:async.)
Plain testing — NewWithT(t). Wrap a *testing.T to get a *WithT carrying Expect, Eventually, and Consistently. Create a fresh one per test (no global fail handler needed):
func TestFarmHasCow(t *testing.T) {
g := NewWithT(t)
f := farm.New([]string{"Cow", "Horse"})
g.Expect(f.HasCow()).To(BeTrue(), "farm should have a cow")
}The g Gomega callback pattern. A helper can accept a Gomega and assert through it, decoupling the helper from how failures are reported:
func expectValidWidget(g Gomega, w Widget) {
g.Expect(w.ID).NotTo(BeEmpty())
g.Expect(w.Size).To(BeNumerically(">", 0))
}
g := NewWithT(t) // or the g passed into an Eventually callback
expectValidWidget(g, w)This is the same g Gomega that Eventually(func(g Gomega) {...}) passes into polled callbacks (gomega:async) — so a g Gomega helper works in both synchronous and polled contexts. To build a Gomega wired to your own fail handler, use NewGomega(failHandler).
Don't call the global Expect/Ω inside an Eventually/Consistently callback — those failures won't be intercepted by the poller. Always assert through the passed-in g Gomega there. See gomega:async.
For richer, reusable assertions consider a real matcher instead of a helper — see gomega:custom-matchers.
© 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/assertions of onsi/gomega.
Open the folder on GitHubat commit 37fa900
Assertions 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 |
|---|---|---|---|---|---|---|
| Assertions this skillonsi/gomega | 2.4k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Vercel Composition Patternssupabase/supabase | 111k | 59 repos | ~726 | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Typescript Advanced Typesrolling-scopes/rsschool-app | 10k | 25 repos | ~4.2k | Automated safety check: Pass | MPL-2.0 | |
| PR Babysitteropeninterpreter/openinterpreter | 69k | 3 repos | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Code Review ChecklistshareAI-lab/learn-claude-code | 78k | 5 repos | ~1.1k | Automated safety check: Pass | MIT |
supabase/supabase
React composition patterns that scale. An agent skill from supabase/supabase.
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
rolling-scopes/rsschool-app
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.
openinterpreter/openinterpreter
Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.
shareAI-lab/learn-claude-code
Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.
onyx-dot-app/onyx
Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.
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…
onsi/gomega
The ghttp test HTTP server for testing HTTP clients — NewServer/NewTLSServer, AppendHandlers, the Verify assertions (VerifyRequest/VerifyHeader/VerifyHeaderKV/VerifyJSON/VerifyForm/VerifyBasicAuth/Ve…
Categories
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…. Assertions is an agent skill from onsi/gomega.
Assertions fits situations like: reviewing synchronous (non-polling) Gomega assertions.
Run `npx skills add onsi/gomega --skill assertions -a claude-code`. Or copy the skill folder (plugins/gomega/skills/assertions in onsi/gomega) into .claude/skills/assertions in your project. Claude Code loads it when a task matches its description.
Run `npx skills add onsi/gomega --skill assertions -a codex`. Or copy the skill folder (plugins/gomega/skills/assertions in onsi/gomega) into .agents/skills/assertions 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 assertions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/assertions, .gemini/skills/assertions, .github/skills/assertions and .opencode/skills/assertions in your project.
SKILL.md names no scripts, command-line tools or credentials: Assertions 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.
Assertions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.2k 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 Assertions: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k 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.