Bench

From Esposter/Esposter · View interactive version

Bench is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when adding or editing benchmarks, timing how long anything takes, measuring what a type costs the compiler, or changing what a *.bench.md or *.typebench.md contains. Esposter benchmarking.

How to use this skill

Skill file

Benchmarking Conventions

A benchmark is a test. bench comes from the test context, each registration is a value, and one bench.compare(...) runs the group and is what the report reads — so a bench file carries no bench-only API beyond that fixture, and there is no separate bench runner, bin, or direct tinybench dependency in a bench (tinybench is underneath, reached through Vitest; the smoke provider in @esposter/shared-node is the one module that constructs it).

A reporter writes each bench file's results to colocated *.bench.{json,md} you commit and diff — the offline gate; how a run is started from a package, from the root and on CI is references/running-benchmarks.md.

Settled — do not re-propose

Deep dive

Writing benchmarks

Running

pnpm bench in a package, or from the root one member at a time (--workspace-concurrency=1); a slow bench measuring the toolchain is switched off once committed, and one that destroys what CI restored skips on CI (references/running-benchmarks.md).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.