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…

51 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-deploy, cso 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.
  • ayudaySkill

    setup-deploy

    Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".

    Also in 9 projects that use this

  • ayudaySkill

    cso

    Chief Security Officer mode. Performs OWASP Top 10 audit, STRIDE threat modeling, attack surface analysis, auth flow verification, secret detection, dependency CVE scanning, supply chain risk assessment, and data classification review. Use when: "security audit", "threat model", "pentest review", "OWASP", "CSO review".

    Also in 8 projects that use this

  • AICreator-WindSkill

    document-release

    技术作家工具。更新项目文档。

    Also in 9 projects that use this

  • Kit4SomeSkill

    unfreeze

    Also in 9 projects that use this

  • seek888Skill

    design-html

    Design finalization: generates production-quality Pretext-native HTML/CSS. Works with approved mockups from /design-shotgun, CEO plans from /plan-ceo-review, design review context from /plan-design-review, or from scratch with a user description. Text actually reflows, heights are computed, layouts are dynamic. 30KB overhead, zero deps. Smart API routing: picks the right Pretext patterns for each design type. Use when: "finalize this design", "turn this into HTML", "build me a page", "implement this design", or after any planning skill. Proactively suggest when user has approved a design or has a plan ready. (gstack) Voice triggers (speech-to-text aliases): "build the design", "code the mockup", "make it real".

    Also in 5 projects that use this

  • CodeWithBehnamSkill

    setup-browser-cookies

    Import cookies from your real browser (Comet, Chrome, Arc, Brave, Edge) into the headless browse session. Opens an interactive picker UI where you select which cookie domains to import. Use before QA testing authenticated pages.

    Also in 8 projects that use this

  • +2 more from ayuday

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 45 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 45 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.