benchmark

A performance-measurement method for Laravel, a PHP web framework. It records real timing baselines for pages, APIs, builds, tests, and database queries, then compares results after changes.

In plain words
What is it for?
Use it to measure page speed, API response-time percentiles, build or test speed, and database query timing before and after a change.
Why use it?
It shows whether a change actually makes an application faster or slower instead of relying on guesses. Repeated measurements help separate real regressions from normal variation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pekral/cursor-rules/benchmark
Any agent
npx skills add pekral/cursor-rules --skill benchmark
Clone the repo
git clone --depth 1 https://github.com/pekral/cursor-rules

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.01711
Opus 5 $0.00026 $0.00856
Sonnet 5 $0.00011 $0.00342
Haiku 4.5 $0.00005 $0.00171

Measured 2d ago against content hash b5c50cf640d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

benchmark scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/benchmark/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Benchmark (Laravel)

Measure real performance baselines for a Laravel app and detect regressions by comparing before/after a change. This skill measures — it produces honest numbers and verdicts. For design guidance on hot paths, defer to @skills/latency-critical-systems/SKILL.md; to act on a regression with an optimization loop, hand off to @skills/benchmark-optimization-loop/SKILL.md.

Constraints

  • Apply @rules/sql/optimalize.mdc when reading or interpreting query timing (N+1, index usage, SARGable filters).
  • Apply @rules/code-testing/general.mdc if you add or touch any benchmark test (Pest, no describe()).
  • Measure, never guess — every number must be a real readback from a running system, command, or tool.
  • Control for noise: separate warm vs cold, run repeats (≥5), report median plus p95, fix one variable at a time.
  • Same machine, same dataset, same config for before and after — note the environment so a teammate can reproduce.
  • Keep secrets and private payloads out of baseline JSON and logs.

Use when

  • You need a performance baseline for a page, API route, build step, or query.
  • A change (PR, dependency bump, query rewrite, config change) may have caused a regression and you must prove it either way.
  • You are comparing two implementations or stack options on the same workload.
  • Someone claims "it's faster/slower" without a measured before/after.

Do not use for live design advice (use latency-critical-systems) or for diagnosing one Telescope request (use @skills/laravel-telescope/SKILL.md).

Execution

Pick the modes that match the change. Always record environment first: app URL, commit SHA, APP_ENV, dataset size, cache/opcache state, and whether the run is cold (first hit, caches cleared) or warm (steady state).

Mode A — Page performance (Core Web Vitals)

Measure against the running Laravel app (php artisan serve or the real host).

  • Run Lighthouse: npx lighthouse <url> --output=json --output-path=./lh.json --only-categories=performance --chrome-flags="--headless".
  • Capture: LCP (target < 2.5s), CLS (< 0.1), INP (< 200ms), FCP (< 1.8s), TTFB (< 0.8s).
  • Capture resource weight: total transfer, JS/CSS bytes (post-Vite build), render-blocking resources, request count.
  • Run 3–5 times; report median. Lighthouse is noisy — discard the first (cold) run unless cold is the metric you want.

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 119 lines · 53 tokens per session scan A b5c50cf640d1

Subscribe to this mod's changes

benchmark is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It adds 53 tokens to every session and 1,711 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

migrate-radix-to-base

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.

shadcn-ui/ui · 61 tokens

ponytail-help

Quick reference for ponytail's modes, skills, and commands. One-shot display.

DietrichGebert/ponytail · 22 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

laravel/boost · 114 tokens

parse-table

Parse table definition to extract module name, model name, table name, and field definitions. First step of CRUD generation.

JaguarJack/catch-admin · 27 tokens

owl-admin-ops-commands

Use this skill for Owl Admin installation, publishing assets, upgrades, diagnostics, database inspection, menu maintenance, user creation, password reset, route generation, IDE helper, admin:publish, admin:install, admin:update, admin:doctor, admin:db, admin:menu, admin:create-user, or deployment troubleshooting.

slowlyo/owl-admin · 71 tokens

octane-development

Use this skill when working with Laravel Octane, a long-running PHP worker server (Swoole, FrankenPHP, RoadRunner) where the application boots once and serves many requests instead of rebooting for each request like PHP-FPM. Trigger when installing Octane or starting its server; configuring or detecting the active…

liberusoftware/real-estate-laravel · 120 tokens