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.
npx skills add pekral/cursor-rules --skill benchmark-optimization-loopgit clone --depth 1 https://github.com/pekral/cursor-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pekral/cursor-rules/benchmark-optimization-loop)<a href="https://agentmods.dev/skills/pekral/cursor-rules/benchmark-optimization-loop"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/benchmark-optimization-loop/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pekral/cursor-rules/benchmark-optimization-loop"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/benchmark-optimization-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01579 |
| Opus 5.5 | $0.00021 | $0.00632 |
| Sonnet 5.5 | $0.00010 | $0.00316 |
| Haiku 4.5 | $0.00005 | $0.00158 |
Grade A, and why
benchmark-optimization-loop 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Benchmark Optimization Loop (Laravel/PHP)
Turn "make it faster" into a recursive, measured loop. Every promoted change beats a recorded baseline on a real measurement and keeps correctness green. No baseline, no budget, no promotion.
Constraints
- Apply
@rules/sql/optimalize.mdcfor any query change (N+1, eager loading, index usage, batching). - Apply
@rules/code-testing/general.mdc— the correctness gate is the project test suite. - Measure, never guess. Every win is a real readback, not a label or intuition.
- Never trade correctness for speed: a faster variant that changes output is rejected, not promoted.
- Defer all measurement mechanics (how to run, warm-up, repetitions, noise) to
@skills/benchmark/SKILL.md. This skill owns the loop and the gate, not the stopwatch.
Use when
- The goal is unquantified speed: "make it faster", "it's slow", "reduce p95".
- You are eliminating an N+1, tuning a query, choosing a cache strategy, or raising queue throughput.
- Multiple candidate fixes exist and you must pick the one that actually wins.
- A "faster" claim was made without a before/after number.
Do not use for first-time correctness (use @skills/test-driven-development/SKILL.md)
or pure latency architecture without a comparison loop (@skills/latency-critical-systems/SKILL.md).
Required baseline
Before touching any code, write down all five. If any is missing, stop and define it.
- Operation — the exact thing optimized (route, Action, job, query).
- Correctness gate — the tests that must stay green (per
@rules/code-testing/general.mdc). Identical output for identical input. - Metric — pick one primary: wall time, p95 latency, rows/sec, queries/request, cost/run, memory, queue throughput.
- Baseline value — measure the current code via
@skills/benchmark/SKILL.md. Record the number and its variance. - Budget — the stopping line, set up front:
- target (e.g. "p95 < 200 ms" or "≤ 5 queries/request"), AND
- cost cap (time/effort/iterations you will spend), AND
- noise threshold (smallest delta that counts as real, from the baseline variance).
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.
- 1mo ago First seen · 100 lines · 52 tokens per session scan A f0879660edac
benchmark-optimization-loop is a skill published in the GitHub repository pekral/cursor-rules (11 stars, last pushed 13d ago), licensed MIT. It adds 52 tokens to every session and 1,579 once invoked, about $0.0002 per session on Opus 5.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.
Other skills, from other repositories
create-powergrid-plugin
Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.
sentry-php-sdk
Full Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for PHP applications. Supports plain PHP, Laravel, and Symfony.
owl-admin-devtools-generator
A development guide for Owl Admin, a Laravel-based administration system, covering its code generator, API templates, relationships, and visual pages.
laravel
Use when building or extending a Laravel 11/12 app — Eloquent models, migrations and relationships, routing with controllers and Form Requests, queues and background jobs, framework-native security (validation, mass-assignment, policies, signed URLs, rate limiting), and Pest/PHPUnit feature tests. NOT pure PHP…
Laravel Dusk Testing
Expert-level Laravel Dusk browser testing skill for PHP/Laravel applications. Covers Chrome-based E2E testing, browser assertions, Page Objects, component testing, authentication helpers, and database integration.
php-expert
Expert-level PHP development with PHP 8+, Laravel, Composer, and modern best practices. Use when the user mentions Laravel, Composer, Symfony, PHPUnit, or PSR standards, or when the task involves PHP 8+ Features, Object-Oriented PHP, Modern PHP, or Constructor Property Promotion.