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 composing-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/composing-matchers)<a href="https://agentmods.dev/skills/onsi/gomega/composing-matchers"><img src="https://agentmods.dev/badge/skills/onsi/gomega/composing-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/composing-matchers"><img src="https://agentmods.dev/badge/skills/onsi/gomega/composing-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.00136 | $0.01534 |
| Opus 5.5 | $0.00054 | $0.00614 |
| Sonnet 5.5 | $0.00027 | $0.00307 |
| Haiku 4.5 | $0.00014 | $0.00153 |
Grade A, and why
composing-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 1mo 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 — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Composing and transforming matchers
Gomega matchers are values, so you can wrap and nest them to express several requirements in a single Expect/Eventually. Start with gomega:matchers for the catalog; reach here when one assertion needs to do more. Docs: https://onsi.github.io/gomega/#composing-matchers.
Logical combinators
Expect(n).To(And(BeNumerically(">", 0), BeNumerically("<", 10))) // all must pass
Expect(msg).To(Or(Equal("Success"), MatchRegexp(`^Error .+$`))) // any may pass
Expect(s).To(Not(BeEmpty())) // negate
And(ms ...GomegaMatcher)/SatisfyAll(...)— identical; succeeds only if every matcher passes. Short-circuits on the first failure.Or(ms ...GomegaMatcher)/SatisfyAny(...)— identical; succeeds if any matcher passes. Short-circuits on the first success.Not(matcher GomegaMatcher)— logical negation; usually clearer than the.NotTo(...)form when nested.
These are the building blocks for lightweight named matchers:
func BeBetween(min, max int) GomegaMatcher {
return SatisfyAll(BeNumerically(">", min), BeNumerically("<", max))
}
Expect(n).To(BeBetween(0, 10))
WithTransform — map the actual, then match
WithTransform(transform any, matcher GomegaMatcher) applies transform to ACTUAL and matches the result.
Expect(element).To(WithTransform(func(e Element) Color { return e.Color }, Equal(BLUE)))
Transform-function rules: it must take exactly one argument (the actual) and return either one value, or (value, error). Returning an error fails the assertion gracefully instead of panicking — useful for transforms that accept several input types:
func HaveSprocketName(name string) GomegaMatcher {
return WithTransform(func(actual any) (string, error) {
switch s := actual.(type) {
case *Sprocket: return s.Name, nil
case Sprocket: return s.Name, nil
default: return "", fmt.Errorf("expected a Sprocket, got %T", actual)
}
}, Equal(name))
}
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.
- 1mo ago First seen · 120 lines · 136 tokens per session scan A 8e6bca4aa1ff
composing-matchers is a skill published in the GitHub repository onsi/gomega (2,357 stars, last pushed 16d ago), licensed MIT. It adds 136 tokens to every session and 1,534 once invoked, about $0.0005 per session on Opus 5.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
rust-testing
Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.
cpp-testing
Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.
write-vibe-tests
Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/appserver, vibe/acp, tools, config, sessions, skills…
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
spec-driven-tests
Rebuild a package's unit test suite around a behavior specification (SPEC.md) derived from the implementation, with every test citing a numbered rule ID. Use when asked to do a spec-driven test rebuild, write a SPEC.md for a package, repeat the state or store spec process (PRs.
JavaScript Testing Patterns
Modern JavaScript testing strategies with Jest, Mocha, and testing best practices covering unit testing, integration testing, mocking, async patterns, and DOM testing.