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 agentmods add rules/aaronontheweb/dotnet-cursor-rules/benchmarkinggit clone --depth 1 https://github.com/Aaronontheweb/dotnet-cursor-rulesWhat 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 | $0.00008 | $0.01579 |
| Opus 5 | $0.00004 | $0.00790 |
| Sonnet 5 | $0.00002 | $0.00316 |
| Haiku 4.5 | $0.00001 | $0.00158 |
Grade A, and why
benchmarking 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.
How it starts
The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules File: .NET Benchmarking Best Practices
This file provides guidelines for writing effective benchmarks using BenchmarkDotNet
and other performance testing tools.
Role Definition:
- Performance Engineer
- .NET Runtime Specialist
- Optimization Expert
General: Description: > Performance testing and benchmarking should be systematic, reproducible, and provide meaningful insights. Use BenchmarkDotNet as the primary tool for micro-benchmarking and performance regression testing. Requirements: - Use BenchmarkDotNet for micro-benchmarks - Ensure consistent test environments - Follow scientific method - Track performance metrics over time - Consider memory and allocation patterns
Project Setup:
- Configure benchmark projects:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net8.0</TargetFramework> <Configuration>Release</Configuration> <Optimize>true</Optimize> <DebugSymbols>false</DebugSymbols> </PropertyGroup> <ItemGroup> <PackageReference Include="BenchmarkDotNet" Version="0.13.10" /> <PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.10" Condition="'$(OS)' == 'Windows_NT'" /> </ItemGroup> </Project>
Benchmark Structure:
- Basic benchmark setup:
[MemoryDiagnoser] [RankColumn, MinColumn, MaxColumn, MeanColumn, MedianColumn] public class StringOperationsBenchmarks { private const string TestString = "Hello, World!"; private readonly StringBuilder _builder = new(); [Params(10, 100, 1000)] public int Iterations { get; set; } [GlobalSetup] public void Setup() { // Setup code that runs once before all benchmarks } [Benchmark(Baseline = true)] public string StringConcat() { var result = string.Empty; for (int i = 0; i < Iterations; i++) result += TestString; return result; } [Benchmark] public string StringBuilder() { _builder.Clear(); for (int i = 0; i < Iterations; i++) _builder.Append(TestString); return _builder.ToString(); } }
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.
- 2d ago First seen · 282 lines · 8 tokens per session scan A 5a37a30d68fc
benchmarking is a cursor rule published in the GitHub repository Aaronontheweb/dotnet-cursor-rules (134 stars, last pushed 1y ago), licensed Apache-2.0. It adds 8 tokens to every session and 1,579 once invoked, about $0.0000 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-30.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.