Skills DirectoryCurated open-source Skills from GitHub

benchmark-optimization-loopcommit 0765f7aSKILL.md · Performance

Benchmark Optimization Loop

Turns speed-up requests into a bounded, measured loop: baseline first, one-hypothesis variants, a correctness gate, and the fastest safe variant wins.

npx skills add affaan-m/ECC --skill benchmark-optimization-loop
Permissions
  • read-repo
  • write-files
  • shell
  • network
Compatible with
Claude Code, Codex, Cursor, Copilot, OpenCode
GitHub
294.3k
Source
Community · Affaan Mustafa
Status
Scan passed
License
MIT
Category
Performance

Core rule

Do not optimize until the operation, correctness gate, metric, baseline and search budget are defined.

Execution Phases

  1. Phase 01Define the baseline

    Fix the operation, the correctness gate that must stay green, the metric, the current baseline and the budget for variants, time, spend and data impact.

  2. Phase 02Measure and find bottlenecks

    Measure the baseline and identify bottlenecks from evidence.

  3. Phase 03Run one-hypothesis variants

    Each variant tests one hypothesis on the same input shape and goes in a variant table; for recursive search, log every run and compare against the prior accepted winner.

  4. Phase 04Promote through the gate

    Reject variants that fail correctness, safety or reproducibility; promote the fastest safe one only when tests pass, the delta repeats and rollback is obvious.

  5. Phase 05Codify and confirm

    Encode the winner in a script, command, test, config or doc, rerun baseline and winner to confirm the delta, and report exact commands and measurements.

Permissions (summarised from SKILL.md)

CapabilityNeededDetails
File writesRequiredEdits code and codifies the winning path in scripts, tests, configs or docs.
Command executionRequiredRuns benchmarks for the baseline and each variant, plus correctness tests.
Network outboundNot requiredThe skill does not call for network access.

SKILL.md frontmatter (YAML)

SKILL.md frontmatter (YAML)commit 0765f7a
---
name: benchmark-optimization-loop
description: Convert 'make it faster' requests into a bounded measured optimization loop — baseline first, generate one-hypothesis variants, benchmark each against a correctness gate, and promote the fastest safe variant with reproducible commands. Use when asked to speed something up, try many variants, run recursive optimization, benchmark latency/throughput/cost, or pick the best implementation by repeated measured tests.
license: MIT
metadata:
  origin: ECC
tools: Read, Write, Edit, Bash, Grep, Glob
---

Related skills

A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.