agentleFS
gufrancogufranco/claude-engineering-rules/skills/benchmark/SKILL.md

benchmark

Skill3 starsChanged 30 days agoMITView on GitHub

Measure API latency, bundle size, and database query time, and compare them against saved baselines to catch performance regressions.

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

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 16 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 81 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run before and after a change that can move latency, bundle size, or query time, and save a baseline from a known-good commit first, since …

    line 15
  2. Very specific:

    When .claude/benchmarks/<project>.json exists, compare per Comparison and flag regressions against the threshold table.

    line 31
  3. Distinctive:

    Detect available tools: Check for load testing tools in order of preference:

    line 38
  4. Very specific:

    If none is installed, name the supported tools and ask whether to install one, per Rules.

    line 43
  5. Distinctive:

    Identify endpoints: Read route files or API documentation to find endpoints.

    line 45
  6. Distinctive:

    Build the project: Run the build command from the project's scripts.

    line 60
  7. Distinctive:

    Identify slow queries: Look for query logging configuration in the ORM or database config.

    line 73
  8. Distinctive:

    Run the test suite with query timing: If the ORM supports query logging, enable it and capture execution times.

    line 75
  9. Distinctive:

    When a baseline exists, compare every measurement against it:

    line 105
  10. Very specific:

    When --save is passed:

    line 131
  11. Distinctive:

    Run all requested measurements.

    line 133
  12. Very specific:

    Write results to .claude/benchmarks/<project>.json.

    line 134
  13. Very specific:

    Create the .claude/benchmarks/ directory if it does not exist.

    line 135
  14. Distinctive:

    If a baseline already exists, show the diff before overwriting.

    line 136
  15. Distinctive:

    When no load testing tool is installed, state which tools are supported and ask whether to install one.

    line 143
  16. Distinctive:

    All timestamps in GMT.

    line 145
  17. Distinctive:

    Never modify source code during benchmarking.

    line 146
  18. Distinctive:

    Stop and ask for a staging or local URL when the only reachable target is production.

    line 159
  19. Distinctive:

    Stop and rebuild when the build directory predates the last source change.

    line 160
  20. Distinctive:

    Stop and ask which endpoints to measure when the route files list more than 10.

    line 161
  21. Distinctive:

    Stop and revert when a source file changed during the run, since this skill measures only.

    line 162
  22. Very specific:

    Every metric with a baseline carries a delta and an OK or REGRESSION status.

    line 167

“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

Overview

Establishes performance baselines and detects regressions by comparing current measurements against stored reference values.

When to Use

Run before and after a change that can move latency, bundle size, or query time, and save a baseline from a known-good commit first, since a comparison needs one.

InvocationAction
/benchmarkRun all available measurement categories
/benchmark apiMeasure API endpoint latency only
/benchmark bundleMeasure JS bundle size only
/benchmark dbMeasure database query time only
/benchmark --saveRun all and save results as the new baseline
/benchmark api --saveRun API latency and save as baseline

Process

  1. Parse the invocation into categories and the --save flag; with no category, run all three.
  2. Confirm the target is local or staging, then record the runtime version, tool version, and date in GMT.
  3. Measure each requested category per Measurement Categories below.
  4. When .claude/benchmarks/<project>.json exists, compare per Comparison and flag regressions against the threshold table.
  5. With --save, write the new baseline per Saving Baselines.

Measurement Categories

API Latency

  1. Detect available tools. Check for load testing tools in order of preference:
    • which k6
    • which wrk
    • which hey
    • which ab
    • If none is installed, name the supported tools and ask whether to install one, per Rules. Never fall back to curl timing, which yields no p95 or p99.
  2. Identify endpoints. Read route files or API documentation to find endpoints. Ask the user which endpoints to benchmark if the project has more than 10.
  3. Run measurements. For each endpoint, measure:
    • p50 latency in milliseconds.
    • p95 latency in milliseconds.
    • p99 latency in milliseconds.
    • Requests per second.
  4. Report per endpoint:

    Endpointp50p95p99RPS

Bundle Size

  1. Build the project. Run the build command from the project's scripts.
  2. Measure output. For each output file in the build directory:
    • Raw size in bytes.
    • Gzipped size in bytes.
  3. Report:

    FileRawGzipped

Database Query Time

  1. Identify slow queries. Look for query logging configuration in the ORM or database config.
  2. Run the test suite with query timing. If the ORM supports query logging, enable it and capture execution times.
  3. Report queries exceeding 100ms:

    QueryDurationLocation

Baselines

Baselines are stored in .claude/benchmarks/<project>.json relative to the project root.

{
  "timestamp": "2026-04-04T12:00:00Z",
  "api": {
    "GET /api/users": {"p50": 12, "p95": 45, "p99": 120, "rps": 850},
    "POST /api/orders": {"p50": 25, "p95": 80, "p99": 200, "rps": 420}
  },
  "bundle": {
    "main.js": {"raw": 245000, "gzipped": 78000},
    "vendor.js": {"raw": 890000, "gzipped": 210000}
  },
  "db": {
    "findUserById": {"p50": 2, "p95": 8}
  }
}

Comparison

When a baseline exists, compare every measurement against it:

  1. Compute deltas. For each metric, calculate the percentage change from baseline.
  2. Flag regressions. A regression is any metric that worsened beyond the threshold:

    MetricRegression threshold
    API p50> 20% slower
    API p95> 30% slower
    API p99> 50% slower
    Bundle raw size> 10% larger
    Bundle gzipped size> 10% larger
    DB query time> 25% slower
  3. Report with deltas:

    MetricBaselineCurrentDeltaStatus
    GET /api/users p5012ms15ms+25%REGRESSION
    main.js gzipped78KB76KB-2.6%OK
  4. Summary. State total regressions found, total improvements, and unchanged metrics.

Saving Baselines

When --save is passed:

  1. Run all requested measurements.
  2. Write results to .claude/benchmarks/<project>.json.
  3. Create the .claude/benchmarks/ directory if it does not exist.
  4. If a baseline already exists, show the diff before overwriting.
  5. Confirm the save to the user.

Rules

  • Benchmarks must run against a local or staging environment, never production.
  • Report median, not mean. See the Benchmark Methodology section of ../../standards/testing.md.
  • When no load testing tool is installed, state which tools are supported and ask whether to install one. Do not silently fall back to inaccurate methods.
  • Bundle size measurements require a fresh build. Do not measure stale build artifacts.
  • All timestamps in GMT.
  • Never modify source code during benchmarking. This is a measurement-only skill.
  • Include the runtime version, tool version, and measurement date in every report.

Common Rationalizations

  • "Staging is down, production is close enough": production load skews every percentile and the run adds load to real users. Wait for staging or run locally.
  • "The build output from earlier is fine": a stale bundle measures the previous code. Rebuild, then measure.
  • "curl timing is good enough without k6": a single-request timer has no p95 or p99. Name the supported tools and ask before installing one.
  • "Mean latency reads cleaner": one outlier moves the mean. Report the median per the testing rule.
  • "Just overwrite the baseline": saving over a regression hides it for every later run. Show the diff first.

Red Flags

  • Stop and ask for a staging or local URL when the only reachable target is production.
  • Stop and rebuild when the build directory predates the last source change.
  • Stop and ask which endpoints to measure when the route files list more than 10.
  • Stop and revert when a source file changed during the run, since this skill measures only.

Verification

  • A report table exists for every requested category, with runtime version, tool version, and a GMT date.
  • Every metric with a baseline carries a delta and an OK or REGRESSION status.
  • The summary states the counts of regressions, improvements, and unchanged metrics.
  • With --save, .claude/benchmarks/<project>.json holds the new timestamp, and the diff against the old baseline was shown.
  • git status shows no source file changed by the run.

Related Skills

  • /profile -- Find the bottleneck behind a regression this skill flags.
  • /test -- Run the test suite, which may include performance tests.
  • /ship checks -- Check CI pipeline, which may include performance gates.

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.