Gomega is a Go library for writing test assertions with matchers, including support for asynchronous checks and several specialized testing sub-libraries. It is used by Go developers, especially alongside the Ginkgo behavior-driven testing framework, to express and evaluate test expectations. The catalogue entries are Claude Code skills and a plugin that help agents use Gomega's matchers and testing idioms.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add onsi/gomega --skill custom-matchersgit clone --depth 1 https://github.com/onsi/gomegaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/onsi/gomega/custom-matchers)<a href="https://agentmods.dev/skills/onsi/gomega/custom-matchers"><img src="https://agentmods.dev/badge/skills/onsi/gomega/custom-matchers/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/onsi/gomega/custom-matchers"><img src="https://agentmods.dev/badge/skills/onsi/gomega/custom-matchers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.02305 |
| Opus 5 | $0.00048 | $0.01153 |
| Sonnet 5 | $0.00019 | $0.00461 |
| Haiku 4.5 | $0.00010 | $0.00231 |
Grade A, and why
custom-matchers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing your own matchers
When no built-in matcher fits and composition (And/Or/WithTransform/SatisfyAll — see gomega:composing-matchers) can't express it cleanly, write a custom matcher. Reach for gcustom.MakeMatcher first — it's the modern, low-boilerplate path. Drop to a hand-written type only when you need full control. Docs: https://onsi.github.io/gomega/#adding-your-own-matchers.
gcustom.MakeMatcher — the recommended path
gcustom.MakeMatcher(matchFunc, ...) builds a full types.GomegaMatcher from one function. The match function must be func(actual T) (bool, error):
import (
"github.com/onsi/gomega/gcustom"
"github.com/onsi/gomega/types"
"encoding/json"
"fmt"
"net/http"
"reflect"
)
func RepresentJSONifiedObject(expected any) types.GomegaMatcher {
return gcustom.MakeMatcher(func(response *http.Response) (bool, error) {
ptr := reflect.New(reflect.TypeOf(expected)).Interface()
if err := json.NewDecoder(response.Body).Decode(ptr); err != nil {
return false, fmt.Errorf("failed to decode JSON: %w", err)
}
decoded := reflect.ValueOf(ptr).Elem().Interface()
return reflect.DeepEqual(decoded, expected), nil
}).WithTemplate("Expected:\n{{.FormattedActual}}\n{{.To}} contain the JSON representation of\n{{format .Data 1}}").WithTemplateData(expected)
}
Then Expect(resp).To(RepresentJSONifiedObject(book)) just works.
Typed match funcs get free type-checking. Because the func takes *http.Response, gcustom rejects any other actual with a clear error before calling your code. Use func(actual any) (bool, error) only if you want to handle multiple types or do your own type checks.
Return (false, err) for bad input, not a panic. A non-nil error fails the assertion in both the To and NotTo directions — you can't accidentally pass a negated assertion by feeding garbage.
Messages: WithMessage vs WithTemplate
.WithMessage("contain the JSON representation")— simplest. RendersExpected:\n<actual>\nto contain the JSON representation(andnot towhen negated)..WithTemplate(tmpl, optionalData)— full control.WithTemplate(tmpl, data)is shorthand for.WithTemplate(tmpl).WithTemplateData(data).- Omit both and you get a generic
Custom matcher failed for:\n<actual>message.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 195 lines · 96 tokens per session scan A 94e480d4f1ce
custom-matchers is a skill published in the GitHub repository onsi/gomega (2,355 stars, last pushed 13d ago), licensed MIT. It adds 96 tokens to every session and 2,305 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.
testing-llm
LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.