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/inboxpraveen/minimize-cursor-cost/csharpgit clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-CostWrote 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/rules/inboxpraveen/minimize-cursor-cost/csharp)<a href="https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/csharp"><img src="https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/csharp.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.00361 |
| Opus 5 | $0.00000 | $0.00180 |
| Sonnet 5 | $0.00000 | $0.00072 |
| Haiku 4.5 | $0.00000 | $0.00036 |
Grade A, and why
csharp 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 3d 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.
What it actually says
C# / .NET Rules
Style
- Match existing style: file-scoped namespaces vs block,
varvs explicit types. - Match existing nullable-reference convention (
#nullable enableor not). - Match existing async naming (
Asyncsuffix). - Don't reformat unrelated lines.
Output
- Single method change → show only the method.
- Class change → show only the changed members. Use
// ... rest of class unchanged. - Don't reprint
usingdirectives unless adding new ones.
Async
- Don't convert sync methods to async unless asked.
- Match existing
ConfigureAwait(false)usage exactly. - Don't introduce
Task.Runto make sync code "look async".
LINQ vs Loops
- Match existing style. Don't rewrite a
foreachas LINQ unless asked. - Don't add
.ToList()unless required for materialization.
DI / Patterns
- Don't add new abstractions (interfaces, factories) unless the codebase uses them.
- Don't change DI container registrations as a side-effect of a feature.
ASP.NET / EF
- Match existing API style: minimal APIs vs controllers.
- Match existing EF tracking style; don't add
.AsNoTracking()unless the existing code does. - Don't change connection strings or
appsettings.jsonschema unless asked.
Never
- Don't add
partial classdeclarations unless asked. - Don't introduce
dynamictypes. - Don't add
recordtypes to a non-record codebase. - Don't change
internal↔publicvisibility unless asked.
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.
- 3d ago First seen · 43 lines · 0 tokens per session scan A 2db59b7bb1b8
csharp is a cursor rule published in the GitHub repository inboxpraveen/Minimize-Cursor-Cost (7 stars, last pushed 18d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 361 tokens. 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 cursor rules, from other repositories
c#
Cursor rule "c#" from flyeric0212/cursor-rules, covering c# 开发规则与最佳实践, 1. 代码生成行为准则 (behavior guidelines), 1.1 核心原则, 2. 通用 c# 编程规范 (general guidelines) and 2.1 命名约定 (naming conventions).
dotnet-build
Rules and best practices for .NET build systems.
coding-style
his file provides guidelines for writing clean, maintainable, and idiomatic C# code with a focus on functional patterns and proper abstraction.
benchmarking
Designing benchmarks for measuring .NET performance.
solution-management
This file provides guidelines for maintaining .NET solutions with consistent SDK versions, shared metadata, and centralized package management.
consuming-dotnettool
This tool is used for helping manage and organize the installation of dotnet tool instances that are used for .NET projects.