lang-cs

Standardize C# code to match Google C# Style and modern .NET conventions.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-cs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-cs
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-cs
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-cs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes ambiguity from C# development by giving you a clear, opinionated standard for style, architecture, testing, and modern language use.

Core Features & Use Cases

  • Style Guidance: Follows Google C# Style and encourages readable, maintainable code.
  • Tooling Alignment: Recommends Roslyn analyzers, dotnet-format, xUnit, and Moq for consistent quality checks and testing.
  • Modern C# Practices: Promotes nullable reference types, record types for immutable DTOs, async naming conventions, and constructor injection.
  • Use Case: Use it when reviewing a feature branch, setting up a new service, or refactoring legacy code to ensure the codebase stays consistent and idiomatic.

Quick Start

Use the lang-cs skill to review my C# code and rewrite it to follow the listed style, async, and dependency injection conventions.

Frequently Asked Questions about lang-cs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize C# code to match Google C# Style and modern .NET conventions?

Standardize C# code by applying Google C# Style guidelines alongside modern .NET conventions for formatting, async patterns, and dependency injection. This ensures readable, maintainable, and consistent codebases across application, API, and library projects.

What is the best way to format and review a C# feature branch for consistent style?

Review a C# feature branch by checking against Google C# Style, utilizing Roslyn analyzers and dotnet-format for automated formatting checks. This removes ambiguity and enforces consistent standards during code reviews or refactoring tasks.

Does this C# style guidance require specific testing frameworks and dependency injection patterns?

Yes, the guidance aligns with xUnit and Moq for testing, and mandates constructor injection for dependency injection. It requires these tools alongside Roslyn analyzers and dotnet-format to enforce consistent quality checks and modern architecture.

How do I use record types and nullable reference types for immutable DTOs in C#?

Use record types for immutable DTOs and enable nullable reference types to promote modern C# practices. This approach is part of an opinionated standard that ensures your API services and application code remain idiomatic and maintainable.

Can I use this standard for refactoring legacy C# code to modern async patterns?

Yes, you can use this standard when refactoring legacy C# code to ensure the codebase adopts modern async naming conventions and consistent formatting. It provides a clear, opinionated standard for modernizing architecture and language use.