agentleFS
tomimortomimor/skills/skills/benchmark/SKILL.md

benchmark

Skill2 starsChanged 5 months agoMITView on GitHub

Adapted from garrytan/gstack's /benchmark skill. Restructured for this repo's conventions and swapped from gstack's proprietary browse daemon to Chrome MCP / Lighthouse / Playwright (whichever is available). Original credit to Garry Tan and contributors. Measure page performance, save it as a baseline, and detect regressions on later runs. Do not optimize blindly -- measure first, then change one thing, then measure again. 1. Capture a baseline before changing anything. A benchmark without a baseline is just a number. 2. Single-variable…

95 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ios-clean, ios-fix and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Saqlain-811Skill

    ios-clean

    Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)

    Also in 5 projects that use this

  • Saqlain-811Skill

    ios-fix

    Autonomous iOS bug fixer. (gstack)

    Also in 5 projects that use this

  • seek888Skill

    pair-agent

    Pair a remote AI agent with your browser. One command generates a setup key and prints instructions the other agent can follow to connect. Works with OpenClaw, Hermes, Codex, Cursor, or any agent that can make HTTP requests. The remote agent gets its own tab with scoped access (read+write by default, admin on request). Use when asked to "pair agent", "connect agent", "share browser", "remote browser", "let another agent use my browser", or "give browser access". (gstack) Voice triggers (speech-to-text aliases): "pair agent", "connect agent", "share my browser", "remote browser access".

    Also in 11 projects that use this

  • ShreyRaviSkill

    landing-report

    Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

    Also in 8 projects that use this

  • timurgaleevSkill

    document-generate

    Generate missing docs for a feature, module or project as tutorials, how-tos, reference and explanation.

    Also in 7 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 8 projects that use this

  • +1 more from Saqlain-811

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 81 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If none are available, stop and tell the user which to install.

    line 73
  2. Very specific:

    If --baseline was passed, also write .benchmark-reports/baseline.json (overwriting the previous baseline).

    line 91
  3. Very specific:

    If --trend was passed, also emit a 3-line trend per metric across the last N runs in .benchmark-reports/: direction (up/down/flat), slope, …

    line 122
  4. Very specific:

    Do NOT benchmark localhost dev servers and present the result as Core Web Vitals.

    line 127
  5. Distinctive:

    Do NOT report a single-run number.

    line 128
  6. Distinctive:

    Do NOT include unrelated metrics in the same change ("we sped up images _and_ rewrote auth").

    line 129
  7. Very specific:

    Do NOT overwrite an old baseline silently.

    line 130
  8. Distinctive:

    Do NOT chase a sub-threshold warning if the user is in shipping mode.

    line 131

“Common” is measured: kept by at least 6 in 10 of the 81 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Benchmark

Adapted from garrytan/gstack's /benchmark skill. Restructured for this repo's conventions and swapped from gstack's proprietary browse daemon to Chrome MCP / Lighthouse / Playwright (whichever is available). Original credit to Garry Tan and contributors.

Measure page performance, save it as a baseline, and detect regressions on later runs. Do not optimize blindly -- measure first, then change one thing, then measure again.

Critical Rules

  1. Capture a baseline before changing anything. A benchmark without a baseline is just a number.
  2. Single-variable rule. Compare runs that differ in one change only. Otherwise the diff is noise.
  3. Multiple runs per measurement. Median of 3-5 runs, not a single shot. Cold cache and warm cache are separate measurements.
  4. Don't report Core Web Vitals from a local dev server. Dev bundles, dev middleware, and HMR distort everything. Build production assets or hit a deployed URL.
  5. Reports go to .benchmark-reports/ at the repo root and are gitignored by default.

What Gets Measured

  • Timing: TTFB, FCP, LCP, DOM Interactive, DOM Complete, Full Load, INP if interactive.
  • Bundles: total transferred bytes, JS bytes, CSS bytes, image bytes, font bytes.
  • Network: request count, slowest 5 resources by duration.
  • Layout: CLS (cumulative layout shift).

Regression Thresholds

Flag a regression (must-fix) if any of:

  • A timing metric increases by >50% OR >500ms absolute
  • Bundle size increases by >25%
  • Request count increases by >30%
  • CLS increases by >0.05 absolute

Flag a warning (should-investigate) if any of:

  • Timing metric increases by >20%
  • Bundle size increases by >10%
  • Request count increases by >15%

Invocation Patterns

/benchmark <url>                    # full audit + compare to last baseline
/benchmark <url> --baseline         # capture baseline (overwrites previous)
/benchmark <url> --quick            # single-pass timing only, no bundle analysis
/benchmark <url> --pages /,/about   # multiple pages in one run
/benchmark --diff                   # only re-measure pages whose code changed
/benchmark --trend                  # show historical trend across runs

Workflow

Step 1: Pick the measurement tool

In order of preference (use the first one available):

  1. Chrome MCP -- if the mcp__claude-in-chrome__* tools are present, drive a real Chrome via navigate + javascript_tool reading performance.getEntriesByType('navigation') and performance.getEntriesByType('resource').
  2. Lighthouse CLI -- lighthouse <url> --output=json --quiet --chrome-flags="--headless". Best for Core Web Vitals.
  3. Playwright -- npx playwright test with a perf script. Use when neither of the above is available.

If none are available, stop and tell the user which to install.

Step 2: Collect

For each page in scope, run 5 cold-cache loads (clear cache between each) and 3 warm-cache loads. Take the median per metric. Discard the slowest single run as an outlier if it is >2x the median.

For bundles, capture: full network log, total transferred bytes by content-type, and the 5 slowest resources by duration.

Step 3: Persist

Save to .benchmark-reports/<timestamp>-<branch>/:

  • metrics.json -- raw per-run data, medians, environment (Node version, OS, viewport).
  • report.md -- human-readable summary with a table per page.
  • summary.txt -- one-line per page for grepping in CI logs.

If --baseline was passed, also write .benchmark-reports/baseline.json (overwriting the previous baseline). Commit baseline.json so it travels with the repo; gitignore the timestamped run directories.

Step 4: Compare and flag

Diff the current medians against baseline.json. For each metric on each page, classify as: improvement, no change, warning, regression. Apply the thresholds above.

Step 5: Report

Output a markdown report with this structure:

### Summary
One line: PASS / WARN / FAIL, with the headline number (e.g. "LCP regressed 38% on /pricing").

### Regressions (must-fix)
Per metric: page, baseline value, current value, delta, likely cause if obvious.

### Warnings
Same shape, below threshold.

### Improvements
Briefly. Worth knowing what got faster too.

### Environment
URL, tool used, run count, branch, timestamp.

Step 6: Trend (optional)

If --trend was passed, also emit a 3-line trend per metric across the last N runs in .benchmark-reports/: direction (up/down/flat), slope, and the date the trend started.

Anti-Patterns

  • Do NOT benchmark localhost dev servers and present the result as Core Web Vitals.
  • Do NOT report a single-run number. Variance is real.
  • Do NOT include unrelated metrics in the same change ("we sped up images and rewrote auth"). Split it.
  • Do NOT overwrite an old baseline silently. If --baseline is implicit, confirm with the user first.
  • Do NOT chase a sub-threshold warning if the user is in shipping mode. Note it and move on.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.