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/solution-managementgit 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.00000 | $0.01277 |
| Opus 5 | $0.00000 | $0.00639 |
| Sonnet 5 | $0.00000 | $0.00255 |
| Haiku 4.5 | $0.00000 | $0.00128 |
Grade A, and why
solution-management 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 — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules File: Best Practices for .NET Solution Management
Role Definition:
- .NET Solution Architect
- Build System Expert
- Package Management Specialist
General: Description: > .NET solutions must be configured with explicit SDK versioning, shared build properties, and centralized package management to ensure consistency, maintainability, and security across all projects within the solution. Requirements: - Maintain a global.json for SDK version control - Use Directory.Build.props for shared metadata - Implement centralized package management - Configure secure and reliable package sources
SDK Version Management:
- Maintain a global.json file in the solution root:
- Specify exact SDK version to ensure consistent builds
- Include rollForward policy for patch version flexibility
- Example:
{ "sdk": { "version": "8.0.100", "rollForward": "patch" } }
- Update SDK versions through controlled processes:
- Test new SDK versions in development/CI before updating
- Document SDK version changes in source control
- Consider implications for CI/CD pipelines
Shared Build Properties:
- Implement Directory.Build.props in solution root:
- Define common metadata:
- Company/Author information
- Copyright details
- Project URL
- License information
- Version prefix/suffix strategy
- Example structure:
<Project> <PropertyGroup> <Authors>Your Company</Authors> <Company>Your Company</Company> <Copyright>© $([System.DateTime]::Now.Year) Your Company</Copyright> <PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageProjectUrl>https://github.com/your/project</PackageProjectUrl> <VersionPrefix>1.0.0</VersionPrefix> </PropertyGroup> </Project>
- Define common metadata:
- Consider environment-specific overrides:
- Use Directory.Build.targets for overrides
- Support CI/CD pipeline customization
Package Management:
- Enable centralized package management:
- Create Directory.Packages.props:
- Define package versions once
- Enforce consistent versions across projects
- Example:
<Project> <PropertyGroup> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> </PropertyGroup> <ItemGroup> <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> </ItemGroup> </Project>
- Create Directory.Packages.props:
- Configure nuget.config:
- Enable package source mapping
- Define trusted package sources
- Example:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSourceMapping> <packageSource key="nuget.org"> <package pattern="*" /> </packageSource> </packageSourceMapping> <packageSources> <clear /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> </packageSources> </configuration>
Maintenance:
- Regular auditing:
- Review SDK versions for security updates
- Validate package versions for vulnerabilities
- Update shared metadata as needed
- Version control:
- Commit all configuration files
- Document changes in commit messages
- Consider using git hooks for validation
Compilation:
- Use dotnet CLI for builds:
- Prefer
dotnet buildover IDE builds for consistency - Use
dotnet build -c Releasefor release builds - Enable deterministic builds with
/p:ContinuousIntegrationBuild=true
- Prefer
- Enforce code quality:
- Enable
TreatWarningsAsErrorsin Directory.Build.props:<PropertyGroup> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <!-- Optionally allow specific warnings --> <WarningsNotAsErrors>CS1591</WarningsNotAsErrors> </PropertyGroup> - Address warnings properly:
- Fix the underlying issue rather than suppressing
- Document any necessary warning suppressions
- Use
#pragma warning disablesparingly and only with comments
- Enable
- Build configuration:
- Use conditional compilation symbols purposefully
- Define debug/release-specific behavior clearly
- Example:
<PropertyGroup> <DefineConstants>TRACE</DefineConstants> <DefineConstants Condition="'$(Configuration)'=='Debug'">$(DefineConstants);DEBUG</DefineConstants> </PropertyGroup>
- Performance:
- Enable incremental builds by default
- Use
dotnet build --no-incrementalonly when needed - Consider using Fast Up-to-Date Check:
<PropertyGroup> <DisableFastUpToDateCheck>false</DisableFastUpToDateCheck> </PropertyGroup>
- Build output:
- Set consistent output paths
- Configure deterministic output:
<PropertyGroup> <Deterministic>true</Deterministic> <ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild> </PropertyGroup>
- Error handling:
- Log build errors comprehensively
- Use MSBuild binary log for detailed diagnostics:
dotnet build -bl:build.binlog - Configure error reporting in CI/CD:
- name: Build run: dotnet build --configuration Release /p:ContinuousIntegrationBuild=true env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: 1
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 · 174 lines · 1,277 tokens per session scan A d2141490cbed
solution-management is a cursor rule published in the GitHub repository Aaronontheweb/dotnet-cursor-rules (134 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,277 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-30.
Other cursor rules, from other repositories
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.
cross-tool-config
Cross-tool AI config: what transfers between Cursor, Claude Code, Copilot, Windsurf, Gemini, and Codex.
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.