agentleFS
codewithmukeshcodewithmukesh/dotnet-claude-kit/.claude/rules/agents.md

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.

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
  1. Very specific:

    DO use Roslyn MCP tools (find_symbol, find_references, get_public_api, get_type_hierarchy) before reading source files.

    line 12
  2. Very specific:

    DO use get_project_graph before making any structural changes (new projects, moved references).

    line 15
  3. Very specific:

    DO use get_diagnostics after modifications instead of running dotnet build when possible.

    line 18
  4. Very specific:

    DON'T: read entire files to find a single method or type.

    line 21
  5. Distinctive:

    DO use subagents for parallel research, exploration, and independent tasks.

    line 26
  6. Distinctive:

    DON'T: use subagents for trivial, single-step tasks.

    line 35
  7. Distinctive:

    DO use Sonnet for routine tasks: formatting, simple refactors, test generation, boilerplate.

    line 40
  8. Distinctive:

    DO use Opus for complex architecture decisions, design reviews, and multi-system analysis.

    line 43
  9. Very specific:

    DO use model aliases (fable, opus, sonnet, haiku) in agent frontmatter and configs — never pinned version IDs.

    line 49
  10. Distinctive:

    DON'T: start implementation without checking if a relevant skill exists.

    line 57

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

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_graph before making any structural changes (new projects, moved references). Rationale: Understanding the dependency tree prevents circular references and misplaced code.
  • DO use get_diagnostics after modifications instead of running dotnet build when 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_symbol first. 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.

Download now (ZIP)

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.