dotnet-claude-kit / rules
AGENTS.md808 starsChanged 4 months agoMITView on GitHub
Enforces MCP-first tool usage, subagent routing for parallel work, and agent selection guidance for .NET projects.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/dotnet-rules.mdCursor rule
- api-versioningSkill
- arch-checkSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- avaloniaSkill
- build-fixSkill
- cachingSkill
- checkpointSkill
- ci-cdSkill
- clean-architectureSkill
- code-reviewSkill
- configurationSkill
- console-cliSkill
- container-publishSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- desktop-mvvmSkill
- de-sloppifySkill
- dockerSkill
- dotnet-initSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- loggingSkill
- messagingSkill
- migrateSkill
- minimal-apiSkill
- modern-csharpSkill
- native-aotSkill
- openapiSkill
- opentelemetrySkill
- outdatedSkill
- planSkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scaffoldSkill
- scalarSkill
- security-scanSkill
- serilogSkill
- specSkill
- tddSkill
- testingSkill
- token-reportSkill
- verifySkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-upSkill
The file
We split this agents.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
DO use Roslyn MCP tools (find_symbol, find_references, get_public_api, get_type_hierarchy) before reading source files.
- Very specific: line 15
DO use get_project_graph before making any structural changes (new projects, moved references).
- Very specific: line 18
DO use get_diagnostics after modifications instead of running dotnet build when possible.
- Very specific: line 21
DON'T: read entire files to find a single method or type.
- Distinctive: line 26
DO use subagents for parallel research, exploration, and independent tasks.
- Distinctive: line 35
DON'T: use subagents for trivial, single-step tasks.
- Distinctive: line 40
DO use Sonnet for routine tasks: formatting, simple refactors, test generation, boilerplate.
- Distinctive: line 43
DO use Opus for complex architecture decisions, design reviews, and multi-system analysis.
- Very specific: line 49
DO use model aliases (fable, opus, sonnet, haiku) in agent frontmatter and configs — never pinned version IDs.
- Distinctive: line 57
DON'T: start implementation without checking if a relevant skill exists.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent & Tool Usage Rules
MCP Tools Before File Reading
- DO use Roslyn MCP tools (
find_symbol,find_references,get_public_api,get_type_hierarchy) before reading source files. Rationale: MCP tools return focused, token-efficient results. Reading full files wastes context window. - DO use
get_project_graphbefore making any structural changes (new projects, moved references). Rationale: Understanding the dependency tree prevents circular references and misplaced code. - DO use
get_diagnosticsafter modifications instead of runningdotnet buildwhen possible. Rationale: Roslyn diagnostics are faster and return structured data without build artifacts. - DON'T read entire files to find a single method or type. Use
find_symbolfirst. Rationale: A 500-line file costs tokens. A symbol lookup costs almost nothing.
Subagent Routing
- DO use subagents for parallel research, exploration, and independent tasks. Rationale: Subagents keep the main context window clean and enable concurrent work.
- DO assign one task per subagent for focused execution. Rationale: Mixed-task subagents produce unfocused results and harder-to-review outputs.
- DO route to specialist agents for domain-specific work. Check AGENTS.md for the routing table. Rationale: Specialist agents carry pre-loaded skills and domain context that generalists lack.
- DON'T use subagents for trivial, single-step tasks. The overhead is not worth it. Rationale: Spawning a subagent for a one-liner adds latency without benefit.
Model Selection
- DO use Sonnet for routine tasks: formatting, simple refactors, test generation, boilerplate. Rationale: Sonnet is faster and cheaper for well-defined, low-ambiguity work.
- DO use Opus for complex architecture decisions, design reviews, and multi-system analysis. Rationale: Opus handles nuance, trade-offs, and large context better for high-stakes decisions.
- DO escalate to Fable for the highest-stakes work: greenfield architecture for long-lived systems, or problems that resisted an Opus pass. Rationale: Fable is the frontier tier above Opus. Reserve it for decisions where a mistake is very expensive.
- DO use model aliases (
fable,opus,sonnet,haiku) in agent frontmatter and configs — never pinned version IDs. Rationale: Aliases track the latest version of each tier; pinned IDs rot when new versions ship.
Skill Loading
- DO load relevant skills before starting work. Check AGENTS.md skill maps for the current task domain. Rationale: Skills carry opinionated patterns and anti-patterns that prevent common mistakes.
- DON'T start implementation without checking if a relevant skill exists. Rationale: Re-discovering best practices wastes time when they are already codified.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

