gmeasure

gmeasure is a skill for Claude Code from onsi/gomega. It costs 129 tokens per session (2,020 once invoked), scanned A, original, MIT.

A Go library for recording measurements in named experiments, such as execution times or numeric values. It calculates summaries including minimum, maximum, average, median, and standard deviation.

In plain words
What is it for?
Use it to measure Go code, compare repeated runs, record durations, and report benchmark results alone or through Ginkgo tests.
Why use it?
It organizes benchmark data and makes results easier to inspect. It does not decide whether a result passes; your code must set those checks separately.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the gomega plugin — 12 skills shipped together

Good fit Use it to measure Go code, compare repeated runs, record durations, and report benchmark results alone or through Ginkgo tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onsi/gomega/gmeasure
About the project

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.

onsi/gomega · 2,357 stars · on GitHub · onsi.github.io

Install

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.

Any agent
npx skills add onsi/gomega --skill gmeasure
Clone the repo
git clone --depth 1 https://github.com/onsi/gomega

Made for: Claude Code.

Or install gomega, the plugin that ships this one along with the rest of its 12 skills.

Wrote 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.

agentmods badge for gmeasure

README.md
[![agentmods](https://agentmods.dev/badge/skills/onsi/gomega/gmeasure/github.svg)](https://agentmods.dev/skills/onsi/gomega/gmeasure)
Your own site
<a href="https://agentmods.dev/skills/onsi/gomega/gmeasure"><img src="https://agentmods.dev/badge/skills/onsi/gomega/gmeasure/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.

agentmods 80×15 button for gmeasure

Your own site · 80×15
<a href="https://agentmods.dev/skills/onsi/gomega/gmeasure"><img src="https://agentmods.dev/badge/skills/onsi/gomega/gmeasure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00129 $0.02020
Opus 5.5 $0.00052 $0.00808
Sonnet 5.5 $0.00026 $0.00404
Haiku 4.5 $0.00013 $0.00202

Measured 1mo ago against content hash 5e07e47a5a4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gmeasure 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.

plugins/gomega/skills/gmeasure/SKILL.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gmeasure: benchmarking and measuring code

gmeasure records benchmarks as Experiments that hold one or more named Measurements. Use it standalone (fmt.Println(experiment)) or wire it into Ginkgo for rich report output. Docs: https://onsi.github.io/gomega/#gmeasure-benchmarking-code. For the broader library see gomega:overview.

import "github.com/onsi/gomega/gmeasure"

Mental model

  • An Experiment (gmeasure.NewExperiment(name)) groups related measurements for one system/context.
  • A Measurement is a named bag of data points plus a Type: MeasurementTypeValue (float64) or MeasurementTypeDuration (time.Duration). It is created on its first recorded data point; later records of the same name append.
  • Stats are statistical aggregates (min/max/mean/median/stddev) computed over a measurement's data points.

gmeasure does not fail tests by itself. It is a benchmarking/reporting tool. To gate on results you must pull Stats and write your own Expect(...) (or use RankStats(...).Winner()).

experiment := gmeasure.NewExperiment("My Experiment")
experiment.RecordDuration("runtime", 3*time.Second) // creates the "runtime" measurement
experiment.RecordDuration("runtime", 5*time.Second) // appends a data point

Recording values and durations

// Direct values / durations:
experiment.RecordValue("length", 3.141)
experiment.RecordDuration("runtime", 200*time.Millisecond)

// Callback-driven — gmeasure times MeasureDuration for you:
v := experiment.MeasureValue("length", func() float64 { return computeLength() })
d := experiment.MeasureDuration("save", func() { client.Save(model) })

Experiments are thread-safe — RecordX/MeasureX may be called from any goroutine.

Sampling: ensembles of data points

Run a callback repeatedly to build up many data points. Configure with SamplingConfig:

type SamplingConfig struct {
	N                   int           // cap on number of samples
	Duration            time.Duration // cap on total sampling time
	NumParallel         int           // run samples across this many goroutines (>1)
	MinSamplingInterval time.Duration // minimum gap between samples (incompatible with NumParallel)
}

Read the full file on GitHub · 189 lines

Changes

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.

  1. 1mo ago First seen · 189 lines · 129 tokens per session scan A 5e07e47a5a4d

Subscribe to this mod's changes

gmeasure is a skill published in the GitHub repository onsi/gomega (2,357 stars, last pushed 19d ago), licensed MIT. It adds 129 tokens to every session and 2,020 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.

Related

Other skills, from other repositories

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens

golang-uber-fx

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…

samber/cc-skills-golang · 122 tokens

ax-go-agent-optimize

Use when writing Go code with github.com/ax-llm/ax/packages/go for agent optimization, verified agent-playbook evolution, evaluators, judges, optimizer artifacts, BootstrapFewShot, and GEPA.

ax-llm/ax · 51 tokens