{"slug":"dotnet-modern-csharp","title":"dotnet-modern-csharp","summary":"Write modern, version-aware C# for .NET repositories. Use when choosing language features across C# versions, especially C# 13 and C# 14, while staying compatible with the repo's target framework and `LangVersion`.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-27T21:00:37.036441Z","repo":{"url":"https://github.com/Postpartum-genushyacinthus29/dotnet-skills","stars":12,"forks":1,"license":"MIT","updatedAt":"2026-09-27T19:34:14Z"},"bodyHtml":"<hr>\n<h2>name: dotnet-modern-csharp\nversion: \"1.0.0\"\ncategory: \"Code Quality\"\ndescription: \"Write modern, version-aware C# for .NET repositories. Use when choosing language features across C# versions, especially C# 13 and C# 14, while staying compatible with the repo's target framework and <code>LangVersion</code>.\"\ncompatibility: \"Requires a C# or .NET repository; respects explicit <code>LangVersion</code> and target framework settings.\"</h2>\n<h1>Modern C# for .NET</h1>\n<h2>Trigger On</h2>\n<ul>\n<li>the repo wants more modern idiomatic C# code</li>\n<li>a change depends on language-version compatibility</li>\n<li>the team is upgrading or reviewing C# feature usage across versions</li>\n<li>you need to know whether a C# 13 or C# 14 feature is safe to use</li>\n</ul>\n<h2>Value</h2>\n<ul>\n<li>produce a concrete project delta: code, docs, config, tests, CI, or review artifact</li>\n<li>reduce ambiguity through explicit planning, verification, and final validation skills</li>\n<li>leave reusable project context so future tasks are faster and safer</li>\n</ul>\n<h2>Do Not Use For</h2>\n<ul>\n<li>non-C# .NET languages such as F# or VB</li>\n<li>analyzer-only or formatter-only setup with no language feature choice</li>\n</ul>\n<h2>Inputs</h2>\n<ul>\n<li>target <code>TFM</code> or <code>TFMs</code></li>\n<li>explicit <code>LangVersion</code>, if any</li>\n<li>current SDK version</li>\n<li>team style rules in <code>.editorconfig</code> and <code>AGENTS.md</code></li>\n</ul>\n<h2>Quick Start</h2>\n<ol>\n<li>Read the nearest <code>AGENTS.md</code> and confirm scope and constraints.</li>\n<li>Run this skill's <code>Workflow</code> through the <code>Ralph Loop</code> until outcomes are acceptable.</li>\n<li>Return the <code>Required Result Format</code> with concrete artifacts and verification evidence.</li>\n</ol>\n<h2>Workflow</h2>\n<ol>\n<li>Detect the real language ceiling from the repo's target framework and explicit <code>LangVersion</code>.</li>\n<li>Prefer stable features that the current repo actually supports.</li>\n<li>Use modern syntax when it reduces ceremony, improves correctness, or makes invariants clearer.</li>\n<li>Do not mass-rewrite a codebase into newer syntax unless the repo wants that churn.</li>\n<li>Treat preview features as opt-in only. Never assume preview because the current machine has a newer SDK.</li>\n<li>Pay special attention to C# 13 and C# 14:\n<ul>\n<li>C# 13 is the stable language for <code>.NET 9</code></li>\n<li>C# 14 is the stable language for <code>.NET 10</code></li>\n</ul>\n</li>\n<li>When feature selection changes architecture, style rules, or generated-code patterns, coordinate with:\n<ul>\n<li><code>dotnet</code></li>\n<li><code>dotnet-analyzer-config</code></li>\n<li><code>dotnet-architecture</code></li>\n</ul>\n</li>\n<li>After feature-driven refactors, run the repo's .NET quality pass through <code>dotnet</code>.</li>\n</ol>\n<h2>Bootstrap When Missing</h2>\n<p>If the requested C# feature depends on SDK or language support the repo does not have yet:</p>\n<ol>\n<li>Detect current state:\n<ul>\n<li><code>dotnet --list-sdks</code></li>\n<li><code>rg -n \"TargetFramework|LangVersion|TargetFrameworks\" -g '*.csproj' -g 'Directory.Build.*' .</code></li>\n</ul>\n</li>\n<li>Confirm whether the repo wants to stay on the current stable language level or intentionally upgrade.</li>\n<li>If the feature requires a newer supported SDK or target framework, upgrade the repo toolchain deliberately instead of relying on the local machine by accident.</li>\n<li>If the repo needs explicit <code>LangVersion</code>, record it in project or shared MSBuild config.</li>\n<li>Run <code>dotnet build SOLUTION_OR_PROJECT</code> after the feature or toolchain change and return <code>status: configured</code> or <code>status: improved</code>.</li>\n<li>If the repo intentionally stays below the required language level, return <code>status: not_applicable</code>.</li>\n</ol>\n<h2>Deliver</h2>\n<ul>\n<li>modern C# code that fits the repo's real language version</li>\n<li>fewer obsolete patterns when a newer stable feature is clearer</li>\n<li>no accidental preview or unsupported-language drift</li>\n</ul>\n<h2>Validate</h2>\n<ul>\n<li>the chosen syntax is supported by the repo's <code>TFM</code> and <code>LangVersion</code></li>\n<li>the feature improves clarity, correctness, or maintainability</li>\n<li>preview-only features are used only when the repo explicitly opted in</li>\n<li>style and analyzer rules still agree with the new syntax</li>\n</ul>\n<h2>Ralph Loop</h2>\n<p>Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.</p>\n<ol>\n<li>Plan first (mandatory):\n<ul>\n<li>analyze current state</li>\n<li>define target outcome, constraints, and risks</li>\n<li>write a detailed execution plan</li>\n<li>list final validation skills to run at the end, with order and reason</li>\n</ul>\n</li>\n<li>Execute one planned step and produce a concrete delta.</li>\n<li>Review the result and capture findings with actionable next fixes.</li>\n<li>Apply fixes in small batches and rerun the relevant checks or review steps.</li>\n<li>Update the plan after each iteration.</li>\n<li>Repeat until outcomes are acceptable or only explicit exceptions remain.</li>\n<li>If a dependency is missing, bootstrap it or return <code>status: not_applicable</code> with explicit reason and fallback path.</li>\n</ol>\n<h3>Required Result Format</h3>\n<ul>\n<li><code>status</code>: <code>complete</code> | <code>clean</code> | <code>improved</code> | <code>configured</code> | <code>not_applicable</code> | <code>blocked</code></li>\n<li><code>plan</code>: concise plan and current iteration step</li>\n<li><code>actions_taken</code>: concrete changes made</li>\n<li><code>validation_skills</code>: final skills run, or skipped with reasons</li>\n<li><code>verification</code>: commands, checks, or review evidence summary</li>\n<li><code>remaining</code>: top unresolved items or <code>none</code></li>\n</ul>\n<p>For setup-only requests with no execution, return <code>status: configured</code> and exact next commands.</p>\n<h2>Load References</h2>\n<ul>\n<li><code>references/patterns.md</code></li>\n<li><code>references/migration.md</code></li>\n<li><code>references/csharp-modern-features.md</code></li>\n</ul>\n<h2>Example Requests</h2>\n<ul>\n<li>\"Make this C# code more modern.\"</li>\n<li>\"Which features can we use on .NET 9?\"</li>\n<li>\"Review this repo for C# 13 or C# 14 opportunities.\"</li>\n</ul>\n","files":[{"path":"references/csharp-modern-features.md","sizeBytes":5769,"isText":true},{"path":"references/migration.md","sizeBytes":15518,"isText":true},{"path":"references/patterns.md","sizeBytes":12819,"isText":true},{"path":"SKILL.md","sizeBytes":5226,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-27T21:02:57.964656Z","sha256":"3E4DE7AA601122B787195E10B71E826327EBF8463501CEBFC83D4698DC13165D","sizeBytes":14157},"review":null,"source":{"repositoryUrl":"https://github.com/Postpartum-genushyacinthus29/dotnet-skills","path":"skills/dotnet-modern-csharp","license":"MIT","commit":"bfa4ebd86f6bd674800f209ebf72ca770c2f026b","subtreeSha":"09FC48B9DB85057502CC8C1A8C87720B7AF5E93CB87ADEF6E1831F3D1286ED61","lastSyncedAt":"2026-09-27T21:00:28.368219Z"},"reviewedAt":"2026-09-27T21:12:46.704205Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills/tree/main/skills/dotnet-modern-csharp"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install postpartum-genushyacinthus29-dotnet-skills@llmmart"},{"target":"git","command":"git clone https://github.com/Postpartum-genushyacinthus29/dotnet-skills.git"}]}