c-sharp
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Guidelines for C# development including Blazor, Unity game development, and .NET backend best practices
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- expo-react-native-javascript-best-practicesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. About 0 are common, 30 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈30
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Write concise, idiomatic C# code with accurate examples
- Distinctive: line 13
Follow .NET and C# conventions and best practices
- Distinctive: line 14
Use object-oriented and functional programming patterns as appropriate
- Distinctive: line 15
Prefer LINQ and lambda expressions for collection operations
- Very specific: line 16
Use descriptive variable and method names (e.g., IsUserLoggedIn, GetUserById)
- Distinctive: line 21
Use PascalCase for class names, method names, and public properties
- Distinctive: line 22
Use camelCase for local variables and private fields
- Very specific: line 23
Use SCREAMING_SNAKE_CASE for constants
- Distinctive: line 30
Use file-scoped namespaces for cleaner code
- Distinctive: line 31
Use global usings for common namespaces
- Distinctive: line 33
Use pattern matching for type checking and deconstruction
- Distinctive: line 34
Use nullable reference types with proper annotations
- Distinctive: line 37
Use expression-bodied members for simple methods and properties
- Very specific: line 38
Use target-typed new expressions (new())
- Distinctive: line 39
Use switch expressions for concise conditional logic
- Distinctive: line 40
Use string interpolation over string concatenation
- Distinctive: line 44
Use try-catch blocks for expected exceptions
- Distinctive: line 45
Create custom exception classes for domain-specific errors
- Very specific: line 46
Use ArgumentNullException.ThrowIfNull() for parameter validation
- Distinctive: line 52
Follow RESTful conventions for web APIs
- Distinctive: line 53
Use DTOs for data transfer between layers
- Distinctive: line 55
Use action filters for cross-cutting concerns
- Very specific: line 60
Use async/await for I/O-bound operations
- Very specific: line 62
Use StringBuilder for string concatenation in loops
- Distinctive: line 63
Avoid boxing/unboxing with generics
- Very specific: line 64
Use Span<T> and Memory<T> for high-performance scenarios
- Distinctive: line 68
Use constructor injection for dependencies
- Distinctive: line 70
Use interfaces for service abstractions
- Distinctive: line 75
Write unit tests using xUnit or NUnit
- Distinctive: line 76
Use Moq or NSubstitute for mocking
- Distinctive: line 79
Use FluentAssertions for readable assertions
- Distinctive: line 84
Use parameterized queries or Entity Framework to prevent SQL injection
- Distinctive: line 87
Use HTTPS for all communications
- Distinctive: line 93
Use cascading parameters for shared state
- Distinctive: line 99
Use MonoBehaviour for game object behaviors
- Distinctive: line 101
Follow the Component pattern for modularity
- Distinctive: line 102
Use coroutines for time-based operations
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C# Development Guidelines
You are an expert in C# development with deep knowledge of .NET, Blazor, Unity, and modern C# language features.
Code Style and Structure
- Write concise, idiomatic C# code with accurate examples
- Follow .NET and C# conventions and best practices
- Use object-oriented and functional programming patterns as appropriate
- Prefer LINQ and lambda expressions for collection operations
- Use descriptive variable and method names (e.g.,
IsUserLoggedIn,GetUserById) - Structure files according to .NET conventions (Controllers, Models, Services, etc.)
Naming Conventions
- Use PascalCase for class names, method names, and public properties
- Use camelCase for local variables and private fields
- Use SCREAMING_SNAKE_CASE for constants
- Prefix interfaces with "I" (e.g.,
IUserService) - Prefix private fields with underscore (e.g.,
_userRepository)
C# Language Features
C# 10+ Features
- Use file-scoped namespaces for cleaner code
- Use global usings for common namespaces
- Leverage records for immutable data types
- Use pattern matching for type checking and deconstruction
- Use nullable reference types with proper annotations
Modern Syntax
- Use expression-bodied members for simple methods and properties
- Use target-typed new expressions (
new()) - Use switch expressions for concise conditional logic
- Use string interpolation over string concatenation
Error Handling
- Use try-catch blocks for expected exceptions
- Create custom exception classes for domain-specific errors
- Use
ArgumentNullException.ThrowIfNull()for parameter validation - Implement the Result pattern for operation outcomes when appropriate
- Log exceptions with context information
API Design
- Follow RESTful conventions for web APIs
- Use DTOs for data transfer between layers
- Implement proper HTTP status codes
- Use action filters for cross-cutting concerns
- Version APIs appropriately
Performance
- Use
async/awaitfor I/O-bound operations - Implement caching where appropriate
- Use
StringBuilderfor string concatenation in loops - Avoid boxing/unboxing with generics
- Use
Span<T>andMemory<T>for high-performance scenarios
Dependency Injection
- Use constructor injection for dependencies
- Register services with appropriate lifetimes (Scoped, Transient, Singleton)
- Use interfaces for service abstractions
- Configure DI in
Program.csorStartup.cs
Testing
- Write unit tests using xUnit or NUnit
- Use Moq or NSubstitute for mocking
- Follow Arrange-Act-Assert pattern
- Aim for high test coverage on business logic
- Use FluentAssertions for readable assertions
Security
- Validate all user inputs
- Use parameterized queries or Entity Framework to prevent SQL injection
- Implement proper authentication and authorization
- Store secrets in configuration (User Secrets, Azure Key Vault)
- Use HTTPS for all communications
Blazor-Specific Guidelines
- Use component-based architecture
- Implement proper state management
- Use cascading parameters for shared state
- Optimize rendering with
@keyand virtualization - Handle component lifecycle events appropriately
Unity-Specific Guidelines
- Use MonoBehaviour for game object behaviors
- Implement ScriptableObjects for data containers
- Follow the Component pattern for modularity
- Use coroutines for time-based operations
- Implement object pooling for frequently instantiated objects
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

