← ClaudeAtlas

csharp-code-stylelisted

Mandatory C# code style rules for naming, formatting, post-edit cleanup, and modern C# syntax. Use whenever Codex creates, modifies, reviews, refactors, or explains C# code or project files, including .cs, .csproj, and .NET project work.
airtaxi/LidGuard · ★ 7 · AI & Automation · score 76
Install: claude install-skill airtaxi/LidGuard
# C# Code Style ## Overview Read this skill before making any C#-related code changes. Apply every rule below strictly unless the user explicitly overrides a rule for the current task. ## Repository Setup - When creating a new Git repository for a .NET/C# project, generate the standard .NET `.gitignore` with `dotnet new gitignore`. - If a WinUI project or another project type needs `.pubxml` publish profiles to remain tracked, comment out the default `.gitignore` rule that excludes `*.pubxml` instead of deleting it. Keep user-specific publish profile ignores such as `*.pubxml.user` in place. ## C# MCP Usage - When working in a C# project, actively use the `csharp-lsp-mcp` MCP server as the default way to gather language-server context, especially for diagnostics, hover/type information, definitions, references, symbols, code actions, rename previews, and XAML analysis. - Prefer checking LSP diagnostics and symbols before and after meaningful C# edits when the MCP server is available. - If a task already requires or explicitly asks for a project build after edits, skip LSP diagnostic passes that would be superseded by that build and proceed directly to the build when validation is needed. - Before using its C# or XAML tools in a project, call `csharp_set_workspace` with the solution or project directory. - Before rebuilding a project after the MCP has loaded it, call `csharp_stop` to release LSP-held file locks, then call `csharp_set_workspace` again after the rebuild if