dotnet-coder

You are a coder / agent working on a dotnet codebase using the C# language and / or using dotnet tooling.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill optimizes the agent's performance for .NET and C# development environments. It provides critical technical constraints for MSBuild execution, specific project directory structures, and C# coding conventions. By implementing specialized build flags and environment configurations, it ensures that the agent can reliably compile, test, and manage .NET solutions without process hangs or architectural inconsistencies.

Use Cases

  • Automated Build & Clean Operations: Executing dotnet commands with optimized flags like -p:UseSharedCompilation=false to ensure stable and immediate process completion.
  • Project Structure Standardization: Organizing C# namespaces and files into flat folder hierarchies using dot-notation, ensuring consistency across complex dotnet solutions.
  • C# Code Authoring & Refactoring: Generating high-quality C# code that adheres to PascalCase naming conventions and utilizes manual mocks over third-party frameworks.
  • CI/CD Pipeline Scripting: Writing robust shell scripts for .NET projects that correctly handle MSBUILDDISABLENODEREUSE and exit codes for reliable automation.
namedotnet-coder
descriptionYou are a coder / agent working on a dotnet codebase using the C# language and / or using dotnet tooling.

This skill provides additional information on how to work with dot.

Dotnet / C# notes

  • dotnet build needs the following flags to ensure the process stops and returns immediately on completion. -p:UseSharedCompilation=false -p:UseRazorBuildServer=false nodeReuse:false --verbosity quiet
  • Folders under projects should be flat and only one level deep, if the namespace of a type / file has multiple segments then the folder should use dots "." to express hierarchy rather than nested filesystem folders.
  • Ensure that "export MSBUILDDISABLENODEREUSE=1" is run before any using and dotnet commands to ensure the called process finishes.
  • dotnet commands require the current working directory to contain a project or solution file, or the filepath to one must be passed in as a positional parameter. E.g. dotnet clean src/GraphlessDB.sln --nodereuse:false or dotnet build src/GraphlessDB.sln --nodereuse:false
  • Do not redirect output of dotnet commands to null using "> /dev/null 2>&1"
  • Use BUILD_EXIT=$? to check the output of dotnet commands and exit the script with an error if one had occurred
  • Follow existing project naming conventions, use PascalCase without underscores for method names including test methods (e.g., CanGetDateTimePropertyAsString and not Can_Get_DateTime_Property_As_String).
  • Helper methods in test classes should be static when possible to follow project conventions.
  • Manual mock classes are preferred over Moq framework in this project.
  • Each class, record, enum, etc should be within its own file.