csharp-style

Codify C# 8.0, nullable reference types, and project layout guidelines.

2|4|Updated Jun 30, 2021
One-click install
npx skills add https://github.com/contentstack/contentstack-management-dotnet --skill csharp-style-contentstack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-style
Source: https://github.com/contentstack/contentstack-management-dotnet/tree/main/skills/csharp-style
Command: npx skills add https://github.com/contentstack/contentstack-management-dotnet --skill csharp-style-contentstack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a standardized set of guidelines for C# language level, nullable usage, and project structure to ensure consistency across Contentstack.Management.Core and related projects.

Core Features & Use Cases

  • Defines the target C# version (C# 8.0) and enables nullable reference types for public APIs to improve reliability.
  • Guides folder layout (Services/, Models/, Runtime/, Exceptions/, Abstractions/, etc.) and naming patterns to align with existing code.
  • Helps teams write maintainable, testable code and reduces PR churn by enforcing consistent conventions across the SDK.
  • Use this during PR reviews and onboarding to ensure new code follows established conventions across the SDK.

Quick Start

Follow the guidelines when creating or updating code under Contentstack.Management.Core to align with existing structure and patterns.

Frequently Asked Questions about csharp-style

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

FAQPage Schema
How do I enforce consistent C# coding standards in a dotnet SDK project?

You can enforce consistent C# coding standards by codifying the language version, nullable reference types, and project structure. This ensures maintainable code across SDK core libraries and tests while reducing PR review churn.

What C# version and nullable settings should I use for Contentstack SDK development?

C# 8.0 should be used as the target language version with nullable reference types enabled for public APIs. This combination improves reliability and maintains alignment with existing Contentstack.Management.Core conventions.

How do I structure folders for a C# SDK to align with existing project conventions?

Standardize your C# SDK folder layout using Services/, Models/, Runtime/, Exceptions/, Abstractions/, and Utils/ directories. This structure guides naming patterns and ensures new code aligns with the established core library organization.

How do I use C# style guidelines during PR reviews and onboarding?

Apply standardized C# style guidelines during PR reviews and onboarding to verify new code follows established conventions. This helps teams write testable code and reduces review cycles by ensuring consistent patterns across the SDK.

Can I use these C# style guidelines for projects outside the Contentstack core library?

These guidelines are designed for Contentstack.Management.Core and related projects. They ensure consistency across new feature development, PR reviews, and onboarding within the core library and its associated test suites.

Why does enforcing nullable reference types matter for C# SDK public APIs?

Enabling nullable reference types for public APIs in C# 8.0 improves reliability by making nullability explicit. This reduces runtime NullReferenceExceptions and ensures consistent null-handling conventions across the SDK.