dotnet
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Guidelines for .NET backend development with C#, ASP.NET Core, and Entity Framework Core
6 other projects use a version of this.
Adopted by
Most recently taken up by
- AterDev/Perigon.CLItheir own version, first seen Sep 3, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Postpartum-genushyacinthus29/dotnet-skillstheir own version, first seen Mar 16, 2026
- autohandai/community-skillstheir own version, first seen Mar 9, 2026
- Sorcha-Platform/Sorchatheir own version, first seen Jan 24, 2026
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Jul 31, 2021
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- AterDev/Perigon.CLI★ 54same name
- Postpartum-genushyacinthus29/dotnet-skills★ 12same name
- autohandai/community-skills★ 11same name
- rogue-dev-studio/ai-agents-rogue★ 2same name
- Sorcha-Platform/Sorcha★ 2same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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
- c-sharpSkill
- 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
- 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
39 rules. 0 are common, 34 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
34
Distinctive
This author's own choices. Worth a look.
5
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 conventions and best practices
- Distinctive: line 14
Use object-oriented programming with proper encapsulation
- Distinctive: line 15
Prefer LINQ for collection operations
- Distinctive: line 33
Use proper HTTP methods (GET, POST, PUT, PATCH, DELETE)
- Distinctive: line 35
Use plural nouns for resource endpoints
- Distinctive: line 37
Use query parameters for filtering and sorting
- Very specific: line 58
Use async/await for all I/O-bound operations
- Very specific: line 60
Don't block on async code (avoid .Result and .Wait())
- Very specific: line 61
Use CancellationToken for cancellation support
- Very specific: line 62
Prefer ValueTask for frequently-called methods
- Distinctive: line 67
Use Fluent API for entity configuration
- Distinctive: line 69
Use migrations for schema changes
- Very specific: line 73
Use AsNoTracking() for read-only queries
- Distinctive: line 75
Use Include/ThenInclude for eager loading
- Distinctive: line 76
Avoid N+1 query problems
- Distinctive: line 77
Use projections for optimized queries
- Distinctive: line 97
Use appropriate lifetimes (Scoped, Transient, Singleton)
- Distinctive: line 98
Create interfaces for service abstractions
- Distinctive: line 99
Use Options pattern for configuration
- Distinctive: line 108
Use IMemoryCache for in-memory caching
- Distinctive: line 109
Use IDistributedCache for distributed scenarios
- Distinctive: line 111
Use response caching for HTTP responses
- Distinctive: line 112
Consider Redis for production caching
- Distinctive: line 116
Use FluentValidation for complex validation
- Distinctive: line 117
Use Data Annotations for simple validation
- Distinctive: line 124
Use global exception handling middleware
- Distinctive: line 125
Create custom exception types
- Distinctive: line 128
Don't expose internal details
- Distinctive: line 133
Use JWT tokens for API authentication
- Distinctive: line 136
Use ASP.NET Core Identity when appropriate
- Distinctive: line 142
Use claims for fine-grained permissions
- Distinctive: line 146
Write unit tests with xUnit
- Distinctive: line 147
Use Moq for mocking dependencies
- Distinctive: line 148
Write integration tests with WebApplicationFactory
- Distinctive: line 149
Test API endpoints end-to-end
- Distinctive: line 150
Use in-memory database for testing
- Distinctive: line 154
Use Swagger/OpenAPI for API documentation
- Distinctive: line 155
Document all endpoints with XML comments
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Development Guidelines
You are an expert in .NET backend development with deep knowledge of C#, ASP.NET Core, Entity Framework Core, and modern .NET practices.
Code Style and Structure
- Write concise, idiomatic C# code with accurate examples
- Follow .NET conventions and best practices
- Use object-oriented programming with proper encapsulation
- Prefer LINQ for collection operations
- Structure code according to Clean Architecture principles
Project Structure
src/
Domain/ # Entities, value objects, domain logic
Application/ # Use cases, DTOs, interfaces
Infrastructure/ # Data access, external services
WebApi/ # Controllers, middleware, configuration
tests/
UnitTests/
IntegrationTests/RESTful API Design
- Use proper HTTP methods (GET, POST, PUT, PATCH, DELETE)
- Return appropriate status codes
- Use plural nouns for resource endpoints
- Implement proper pagination for collections
- Use query parameters for filtering and sorting
- Version APIs (URL path or header)
[ApiController]
[Route("api/v1/[controller]")]
public class UsersController : ControllerBase
{
[HttpGet]
public async Task<ActionResult<IEnumerable<UserDto>>> GetUsers([FromQuery] PaginationParams pagination)
[HttpGet("{id}")]
public async Task<ActionResult<UserDto>> GetUser(int id)
[HttpPost]
public async Task<ActionResult<UserDto>> CreateUser(CreateUserDto dto)
}Async/Await Patterns
- Use
async/awaitfor all I/O-bound operations - Suffix async methods with
Async - Don't block on async code (avoid
.Resultand.Wait()) - Use
CancellationTokenfor cancellation support - Prefer
ValueTaskfor frequently-called methods
Entity Framework Core
Configuration
- Use Fluent API for entity configuration
- Configure relationships explicitly
- Use migrations for schema changes
- Enable nullable reference types
Best Practices
- Use
AsNoTracking()for read-only queries - Implement the Repository pattern for data access
- Use Include/ThenInclude for eager loading
- Avoid N+1 query problems
- Use projections for optimized queries
public async Task<IEnumerable<UserDto>> GetUsersAsync()
{
return await _context.Users
.AsNoTracking()
.Select(u => new UserDto
{
Id = u.Id,
Name = u.Name
})
.ToListAsync();
}Dependency Injection
- Use constructor injection
- Register services in
Program.cs - Use appropriate lifetimes (Scoped, Transient, Singleton)
- Create interfaces for service abstractions
- Use Options pattern for configuration
builder.Services.AddScoped<IUserService, UserService>();
builder.Services.Configure<JwtSettings>(builder.Configuration.GetSection("Jwt"));Caching
- Use IMemoryCache for in-memory caching
- Use IDistributedCache for distributed scenarios
- Implement cache invalidation strategies
- Use response caching for HTTP responses
- Consider Redis for production caching
Validation
- Use FluentValidation for complex validation
- Use Data Annotations for simple validation
- Validate early in the request pipeline
- Return detailed validation errors
- Implement model state validation
Error Handling
- Use global exception handling middleware
- Create custom exception types
- Return consistent error responses
- Log exceptions with context
- Don't expose internal details
Security
Authentication
- Use JWT tokens for API authentication
- Implement refresh token rotation
- Store tokens securely
- Use ASP.NET Core Identity when appropriate
Authorization
- Use policy-based authorization
- Implement resource-based authorization
- Apply
[Authorize]attributes appropriately - Use claims for fine-grained permissions
Testing
- Write unit tests with xUnit
- Use Moq for mocking dependencies
- Write integration tests with WebApplicationFactory
- Test API endpoints end-to-end
- Use in-memory database for testing
Documentation
- Use Swagger/OpenAPI for API documentation
- Document all endpoints with XML comments
- Include request/response examples
- Generate client SDKs from OpenAPI spec
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.

