Skip to main content

Configure C# project files, SDK selection, analyzers, and warning policy without weakening a consumer's build. Use when editing .csproj/MSBuild settings, enabling analyzers such as CA2016/CA1851, or diagnosing nullable and multi-target build failures; defer language syntax, async, and test design.

  • New
  • v1.0.0
  • Reviewed Dec 4
  • No reviews yet

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.0

C# Tooling and Build Configuration

Priority: P1 (HIGH)

Project File Rules

  • SDK style: Use SDK-style projects with explicit TargetFramework(s). Do not add legacy ToolsVersion or packages.config.
  • SDK pinning: Add global.json only when the repository already pins an SDK; global.json alone is not proof of a C# project.
  • TFM floor: Choose the lowest TFM the shipped artifact must run on. Multi-target only for a real consumer split; keep conditional items narrow.
  • Central versions: Prefer Directory.Packages.props with ManagePackageVersionsCentrally over per-project versions.
  • Determinism: Enable Deterministic, ContinuousIntegrationBuild, and locked restore in CI where the repository already supports them.

Analyzer and Warning Policy

  • Enable once: EnableNETAnalyzers, AnalysisLevel, and TreatWarningsAsErrors belong in shared props, not one project.
  • CA2016: Forward an incoming CancellationToken to every cancellable call; see async.
  • CA1851: Avoid multiple enumeration of IEnumerable<T>; materialize once when the sequence is reused or the source is expensive.
  • Severity: Set .editorconfig severities deliberately. Do not blanket-disable categories to make a build green.
  • Suppression: Use a scoped #pragma warning disable or NoWarn with an issue link and owner; never suppress nullable or security analyzers across a project.

Build Hygiene

  • Generated files: Never edit obj/, bin/, or *.g.cs; regenerate instead.
  • Package trust: Do not disable NuGet signature validation or add unreviewed feeds to make restore pass.
  • Reproducibility: Keep packages.lock.json current when RestorePackagesWithLockFile is enabled.
  • CI parity: Run the same dotnet build and dotnet test configuration locally that CI runs.

Anti-Patterns

  • No warning carpet-bombing: Fix causes; do not lower AnalysisLevel to hide new diagnostics.
  • No TFM drift: Do not raise a TFM just to use one syntax feature.
  • No per-project version chaos: Centralize package versions.
  • No global.json as a C# signal: It configures the SDK, not the language.

References

  • Analyzers, MSBuild, and SDK selection

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

Verified copySLSA L1
Signed by
skills-hub.ai verified copy of https://github.com/HoangNguyen0403/agent-skills-standard
Method
Verified copy of the source repoPublished by a community repo, not by skills-hub.ai. We signed this exact version to vouch that its content matches what the repo published. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from Multi-Language Standards

View source →
typescript-best-practicesWrite idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic.32 installscavemanUltra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says…26 installsphp-securityPHP-only security standards for database access, password handling, and input validation. Use when securing PHP apps against SQL injection, XSS, or weak password storage; defer Laravel middleware and security questions in other languages.16 installscommon-security-auditProbe for hardcoded secrets, injection surfaces, unguarded routes, business logic flaws, and platform-specific weaknesses across backend (Node, Go, Java, Python, Rust), frontend (React, Angular, Vue), and mobile (iOS, Android, Flutter)…14 installsandroid-performanceOptimize Android app startup, UI rendering, frame stability, and benchmark performance with Baseline Profiles, Macrobenchmark, and lazy initialization. Use when reducing startup time, diagnosing jank, or measuring rendering; defer Compose…10 installsandroid-composeBuild high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to…9 installs

Frequently asked questions about csharp-tooling

What does the csharp-tooling skill do?

Configure C# project files, SDK selection, analyzers, and warning policy without weakening a consumer's build. Use when editing .csproj/MSBuild settings, enabling analyzers such as CA2016/CA1851, or diagnosing nullable and multi-target build failures; defer language syntax, async, and test design. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the csharp-tooling skill?

Run `npx @skills-hub-ai/cli install multi-language-standards-csharp-tooling` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/multi-language-standards-csharp-tooling/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does csharp-tooling work with?

csharp-tooling runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the csharp-tooling skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use csharp-tooling after installing it?

In Claude Code, type `/multi-language-standards-csharp-tooling` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the csharp-tooling skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/multi-language-standards-csharp-tooling)](https://skills-hub.ai/skills/multi-language-standards-csharp-tooling)
HTML
<a href="https://skills-hub.ai/skills/multi-language-standards-csharp-tooling"><img src="https://skills-hub.ai/api/badges/skill/multi-language-standards-csharp-tooling" alt="Install on Skills Hub"></a>

More options in the badge docs.