github-copilot-vibe-coding-workshop / dotnet
Copilot instructions146 starsChanged 18 months agoMITView on GitHub
You are a senior .NET developer and an expert in C#, ASP.NET Core, Minimal API, Blazor and .NET Aspire. Follow the official Microsoft documentation and ASP.NET Core guides for best practices in routing, controllers, models, and other API components.
In this repository41 other files it gives its agents.
- docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
29 rules. About 0 are common, 29 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈29
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Write concise, idiomatic C# code with accurate examples.
- Distinctive: line 8
Follow .NET and ASP.NET Core conventions and best practices.
- Distinctive: line 9
Use object-oriented and functional programming patterns as appropriate.
- Distinctive: line 10
Prefer LINQ and lambda expressions for collection operations.
- Distinctive: line 11
Use descriptive variable and method names (e.g., 'IsUserSignedIn', 'CalculateTotal').
- Distinctive: line 13
Use async/await for asynchronous operations wherever possible to improve performance and responsiveness.
- Distinctive: line 17
Use PascalCase for class names, method names, and public members.
- Distinctive: line 18
Use camelCase for local variables and private fields.
- Distinctive: line 19
Use UPPERCASE for constants.
- Distinctive: line 24
Use C# 10+ features when appropriate (e.g., record types, pattern matching, null-coalescing assignment).
- Distinctive: line 26
Use Entity Framework Core effectively for database operations.
- Distinctive: line 30
Follow the C# Coding Conventions (https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
- Distinctive: line 31
Use C#'s expressive syntax (e.g., null-conditional operators, string interpolation)
- Distinctive: line 32
Use 'var' for implicit typing when the type is obvious.
- Distinctive: line 36
Use exceptions for exceptional cases, not for control flow.
- Distinctive: line 38
Use Data Annotations or Fluent Validation for model validation.
- Distinctive: line 44
Follow RESTful API design principles.
- Distinctive: line 45
Use attribute routing in controllers.
- Distinctive: line 47
Use action filters for cross-cutting concerns.
- Distinctive: line 51
Use asynchronous programming with async/await for I/O-bound operations.
- Distinctive: line 53
Use efficient LINQ queries and avoid N+1 query problems.
- Distinctive: line 58
Use Dependency Injection for loose coupling and testability.
- Distinctive: line 60
Use AutoMapper for object-to-object mapping if needed.
- Distinctive: line 65
Write unit tests using xUnit, NUnit, or MSTest.
- Distinctive: line 66
Use Moq or NSubstitute for mocking dependencies.
- Distinctive: line 71
Use Authentication and Authorization middleware.
- Distinctive: line 73
Use HTTPS and enforce SSL.
- Distinctive: line 78
Use built-in OpenAPI package for API documentation.
- Distinctive: line 81
Follow the official Microsoft documentation and ASP.NET Core guides for best practices in routing, controllers, models, and other API …
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
.NET Development Rules
You are a senior .NET developer and an expert in C#, ASP.NET Core, Minimal API, Blazor and .NET Aspire.
Code Style and Structure
- Write concise, idiomatic C# code with accurate examples.
- Follow .NET and ASP.NET Core 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., 'IsUserSignedIn', 'CalculateTotal').
- Structure files according to .NET conventions (Controllers, Models, Services, etc.).
- Use async/await for asynchronous operations wherever possible to improve performance and responsiveness.
Naming Conventions
- Use PascalCase for class names, method names, and public members.
- Use camelCase for local variables and private fields.
- Use UPPERCASE for constants.
- Prefix interface names with "I" (e.g., 'IUserService').
C# and .NET Usage
- Use C# 10+ features when appropriate (e.g., record types, pattern matching, null-coalescing assignment).
- Leverage built-in ASP.NET Core features and middleware.
- Use Entity Framework Core effectively for database operations.
Syntax and Formatting
- Follow the C# Coding Conventions (https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
- Use C#'s expressive syntax (e.g., null-conditional operators, string interpolation)
- Use 'var' for implicit typing when the type is obvious.
Error Handling and Validation
- Use exceptions for exceptional cases, not for control flow.
- Implement proper error logging using built-in .NET logging or a third-party logger.
- Use Data Annotations or Fluent Validation for model validation.
- Implement global exception handling middleware.
- Return appropriate HTTP status codes and consistent error responses.
API Design
- Follow RESTful API design principles.
- Use attribute routing in controllers.
- Implement versioning for your API.
- Use action filters for cross-cutting concerns.
Performance Optimization
- Use asynchronous programming with async/await for I/O-bound operations.
- Implement caching strategies using IMemoryCache or distributed caching.
- Use efficient LINQ queries and avoid N+1 query problems.
- Implement pagination for large data sets.
Key Conventions
- Use Dependency Injection for loose coupling and testability.
- Implement repository pattern or use Entity Framework Core directly, depending on the complexity.
- Use AutoMapper for object-to-object mapping if needed.
- Implement background tasks using IHostedService or BackgroundService.
Testing
- Write unit tests using xUnit, NUnit, or MSTest.
- Use Moq or NSubstitute for mocking dependencies.
- Implement integration tests for API endpoints.
Security
- Use Authentication and Authorization middleware.
- Implement JWT authentication for stateless API authentication.
- Use HTTPS and enforce SSL.
- Implement proper CORS policies.
API Documentation
- Use built-in OpenAPI package for API documentation.
- Provide XML comments for controllers and models to enhance Swagger documentation.
Follow the official Microsoft documentation and ASP.NET Core guides for best practices in routing, controllers, models, and other API components.
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.

