Skip to content
Back to skills

Benchcheck

ASecurity

Use when a performance claim is about to be made or checked — «is it faster now», «did this optimisation help», «compare these benchmark runs», before/after timings, throughput or latency numbers — decides the claim with a statistics script before any number is reported

  • 33 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added December 1, 2026
ai-agentspythongoperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add chrono-meta/forge-harness --skill benchcheck --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Benchcheck?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Benchcheck
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chrono-meta-benchcheck/badge)](https://www.skillsdirectory.com/skills/chrono-meta-benchcheck)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: benchcheck
description: Use when a performance claim is about to be made or checked — «is it faster now», «did this optimisation help», «compare these benchmark runs», before/after timings, throughput or latency numbers — decides the claim with a statistics script before any number is reported
---

# A speed claim is a statistics claim

«12% faster» from one run before and one run after is a guess: repeated runs of the same code differ by that much.
So the order is fixed: **samples first, the script decides, you report its verdict.**

## 1. Get samples, not a number

- Each side (before / after) needs **at least 5 runs, 10 or more is better**, on the same machine, same input, same build mode.
  Run them interleaved where you can (before, after, before, after …) so drift hits both sides alike.
- Save one number per line, one file per side (`before.txt`, `after.txt`). A `hyperfine --export-json` file also works.
- If you cannot run the benchmark (no access, too slow, needs hardware you do not have), **say so and stop.**
  Do not write «expected» or «typical» numbers in place of measurements, and do not estimate a speedup from reading the code.

## 2. Let the script decide

```
python3 <this plugin>/scripts/bench_compare.py before.txt after.txt [--higher-is-better] [--unit ms]
```

Use `--higher-is-better` for throughput (ops/s, req/s); the default is lower-is-better (time, latency, memory).
The first line of its output is the verdict:

- `VERDICT: FASTER` / `SLOWER` (or `BETTER` / `WORSE`), rc 0: the change is real at p < 0.05 and at least 1%. Report the
  median change and the p-value from that line.
- `VERDICT: NO-DIFFERENCE (~ …)`, rc 0: the data does not show a change. Say «no measurable change». **Do not report the
  percentage** in that line as a gain or a loss, not even as «slightly faster» or «a small improvement».
- `VERDICT: TOO-FEW`, rc 1: not enough runs. Get more runs, or tell the user there is no verdict yet.
- `HARNESS-ERROR`, rc 2: the input could not be read. Fix the input. Never fall back to comparing the averages yourself.

A `NOISE:` line means the spread on one side is large. Name it next to the verdict. Do not use it to override the verdict.

## 3. Report

- Quote the verdict line exactly. Report only numbers that the script printed. For FASTER/SLOWER/BETTER/WORSE that is the
  medians, n per side and p. For NO-DIFFERENCE it is the medians and n, with no percentage given as a change. For
  TOO-FEW it is n per side. Never compute a p-value, a mean or a percentage yourself.
- Say what the percentage is a change of: «median time 100 → 50 ms (−50%)». A −50% time is not «50% faster» (that is a
  2× speedup). Do not convert between the two in your head.
- One number per claim: a reported change must come from a FASTER/SLOWER (BETTER/WORSE) verdict for that exact comparison. If you compare several
  benchmarks, run the script once per pair and report each verdict on its own line. Do not pool or average them.
- If the user's own claim disagrees with the verdict (they say faster, the script says `~`), say so plainly.

## Before you say it is done

- Every performance number you report has a script verdict behind it, and the verdict line is quoted.
- No `~` result is described as a gain or a loss.
- Missing measurements are named as missing, not filled in.

## Method

The method follows Go's benchstat (1.5×IQR outlier rule, Mann-Whitney U, `~` for no significant change). The decision is a script, the
model reports only its verdict, and missing runs are never replaced by expected numbers.

Files in this skill

  • SKILL.md3.5 KB
  • fh-module.yaml738 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.