benchmark-optimization-loop — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited benchmark-optimization-loop (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Turn "make it faster" into a recursive, measured loop. Every promoted change beats a recorded baseline on a real measurement and keeps correctness green. No baseline, no budget, no promotion.
@rules/sql/optimalize.mdc for any query change (N+1, eager loading, index usage, batching).@rules/code-testing/general.mdc — the correctness gate is the project test suite.@skills/benchmark/SKILL.md. This skill owns the loop and the gate, not the stopwatch.Do not use for first-time correctness (use @skills/test-driven-development/SKILL.md) or pure latency architecture without a comparison loop (@skills/latency-critical-systems/SKILL.md).
Before touching any code, write down all five. If any is missing, stop and define it.
@rules/code-testing/general.mdc). Identical output for identical input.@skills/benchmark/SKILL.md. Record the number and its variance.A baseline without variance is not a baseline — you cannot tell a win from noise.
Run per iteration. The current winner starts as the baseline.
@skills/benchmark/SKILL.md (identical inputs, warm-up, repeated runs).@skills/laravel-telescope/SKILL.md for per-request query/timing breakdown, EXPLAIN (@rules/sql/optimalize.mdc) for query plans, @skills/mysql-problem-solver/SKILL.md for schema/index issues, Horizon for queue lag. The bottleneck is usually one segment.with('items') removes the N+1"). One variable per variant or you cannot attribute the delta.whereIn/upsert; Cache::remember() a stable read; raise maxProcesses/chunk size for queue throughput.Always compare against the current accepted winner, not merely the previous run — a lucky run must not become the bar.
Keep a running ledger. Never discard rejected rows; they prevent re-testing dead ends.
| # | Hypothesis | Change | Metric (primary) | vs winner | Correctness | Decision | Note |
|---|---|---|---|---|---|---|---|
| 0 | baseline | none | 412 ms p95 | — | green | winner | variance ±18 ms |
| 1 | N+1 on items | with('items') | 96 ms p95 | -316 ms | green | promote | 51→2 queries |
| 2 | cache list 30 s | Cache::remember | 88 ms p95 | -8 ms | green | reject | within noise; adds staleness |
| 3 | covering index | add (user_id,created_at) | 71 ms p95 | -25 ms | green | promote | EXPLAIN: ref, no filesort |
A variant becomes the new default only when all hold:
@rules/code-testing/general.mdc).When you stop, the current winner is the result. Record why you stopped.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.