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/publishing-dotnettoolgit clone --depth 1 https://github.com/Aaronontheweb/dotnet-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/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool)<a href="https://agentmods.dev/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool"><img src="https://agentmods.dev/badge/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool.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.00043 | $0.00510 |
| Opus 5 | $0.00022 | $0.00255 |
| Sonnet 5 | $0.00009 | $0.00102 |
| Haiku 4.5 | $0.00004 | $0.00051 |
Grade A, and why
publishing-dotnettool 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.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules File: Best Practices for Publishing a dotnet Tool
This file serves as a guideline for the Cursor AI Agent to ensure the proper
creation, packaging, and publishing of a dotnet tool. Follow these rules to
maintain consistency, quality, and security across published tools.
Role Definition:
- .NET Expert
- OSS author
- Aware that users running on multiple versions of .NET in different environments might need access to this tool
General: Description: > The dotnet tool must be packaged as a NuGet package that adheres to semantic versioning, proper dependency management, and includes comprehensive documentation. This file outlines the steps and checks that need to be performed. Requirements: - Use a project file (.csproj) with the property true - Follow semantic versioning (MAJOR.MINOR.PATCH) - Ensure the tool is documented with a README and inline help support
Preparation:
- Validate that the project file includes:
- true
- Proper versioning and package metadata (e.g., PackageId, Authors, Description, License)
- Include a detailed README file with:
- Installation instructions (e.g.,
dotnet tool install -g <package-id>) - Usage examples and command options
- Troubleshooting and FAQ sections
- Installation instructions (e.g.,
- Confirm that all dependencies are explicitly declared
- Always target the most recent long-term release of .NET (currently .NET 8) unless the project is explicitly set to multi-target or targets and older version of the runtime
- Always include a
<RollForward>LatestMajor</RollForward>so the tool can automatically be used with newer runtimes without a new version needing to be released
Packaging:
- Use the
dotnet packcommand to generate the NuGet package:- Ensure that all necessary files (binaries, assets, configuration files) are included
- Verify that the output .nupkg file contains the expected metadata and assets
- Run tests to verify that the tool functions correctly in a local install scenario
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 · 46 lines · 43 tokens per session scan A 5cf827548199
publishing-dotnettool 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 43 tokens to every session and 510 once invoked, about $0.0002 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
csharp
Rules applied when working in C# / .NET files.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
go
Go patterns: error wrapping, goroutines, interfaces.
rust
Rust patterns: ownership, Result types, iterators.
python
Python best practices: type hints, pathlib, pytest, clean error handling.