github-copilot-vibe-coding-workshop / dotnet
Copilot instructions146 starsChanged 18 months agoMITView on GitHub
Você é um desenvolvedor .NET sênior e especialista em C#, ASP.NET Core, API Mínima, Blazor e .NET Aspire. Siga a documentação oficial da Microsoft e guias do ASP.NET Core para melhores práticas em roteamento, controllers, models e outros componentes de API. Aviso: Este documento foi localizado pelo GitHub Copilot. Portanto, pode conter erros. Se você encontrar alguma tradução inadequada ou incorreta, por favor crie um issue.
In this repository41 other files it gives its agents.
- docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/dotnet/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/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
22 rules. About 0 are common, 22 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
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 9
Use padrões de programação orientada a objetos e funcional conforme apropriado.
- Distinctive: line 11
Use nomes descritivos para variáveis e métodos (ex: 'IsUserSignedIn', 'CalculateTotal').
- Distinctive: line 13
Use async/await para operações assíncronas sempre que possível para melhorar performance e responsividade.
- Distinctive: line 17
Use PascalCase para nomes de classe, nomes de método e membros públicos.
- Distinctive: line 18
Use camelCase para variáveis locais e campos privados.
- Distinctive: line 19
Use UPPERCASE para constantes.
- Distinctive: line 24
Use recursos do C# 10+ quando apropriado (ex: record types, pattern matching, null-coalescing assignment).
- Distinctive: line 26
Use Entity Framework Core efetivamente para operações de banco de dados.
- Distinctive: line 31
Use sintaxe expressiva do C# (ex: operadores null-conditional, interpolação de string)
- Distinctive: line 32
Use 'var' para tipagem implícita quando o tipo for óbvio.
- Distinctive: line 36
Use exceções para casos excepcionais, não para fluxo de controle.
- Distinctive: line 38
Use Data Annotations ou Fluent Validation para validação de modelo.
- Distinctive: line 45
Use roteamento por atributo em controllers.
- Distinctive: line 47
Use filtros de ação para concerns transversais.
- Distinctive: line 51
Use programação assíncrona com async/await para operações I/O-bound.
- Distinctive: line 53
Use consultas LINQ eficientes e evite problemas de consulta N+1.
- Distinctive: line 58
Use Injeção de Dependência para baixo acoplamento e testabilidade.
- Distinctive: line 60
Use AutoMapper para mapeamento objeto-para-objeto se necessário.
- Distinctive: line 66
Use Moq ou NSubstitute para mock de dependências.
- Distinctive: line 71
Use middleware de Autenticação e Autorização.
- Distinctive: line 73
Use HTTPS e force SSL.
- Distinctive: line 78
Use pacote OpenAPI integrado para documentação de 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
Regras de Desenvolvimento .NET
Você é um desenvolvedor .NET sênior e especialista em C#, ASP.NET Core, API Mínima, Blazor e .NET Aspire.
Estilo e Estrutura de Código
- Escreva código C# conciso e idiomático com exemplos precisos.
- Siga convenções e melhores práticas do .NET e ASP.NET Core.
- Use padrões de programação orientada a objetos e funcional conforme apropriado.
- Prefira LINQ e expressões lambda para operações de coleção.
- Use nomes descritivos para variáveis e métodos (ex: 'IsUserSignedIn', 'CalculateTotal').
- Estruture arquivos de acordo com convenções .NET (Controllers, Models, Services, etc.).
- Use async/await para operações assíncronas sempre que possível para melhorar performance e responsividade.
Convenções de Nomenclatura
- Use PascalCase para nomes de classe, nomes de método e membros públicos.
- Use camelCase para variáveis locais e campos privados.
- Use UPPERCASE para constantes.
- Prefixe nomes de interface com "I" (ex: 'IUserService').
Uso de C# e .NET
- Use recursos do C# 10+ quando apropriado (ex: record types, pattern matching, null-coalescing assignment).
- Aproveite recursos integrados do ASP.NET Core e middleware.
- Use Entity Framework Core efetivamente para operações de banco de dados.
Sintaxe e Formatação
- Siga as Convenções de Codificação C# (https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
- Use sintaxe expressiva do C# (ex: operadores null-conditional, interpolação de string)
- Use 'var' para tipagem implícita quando o tipo for óbvio.
Tratamento de Erros e Validação
- Use exceções para casos excepcionais, não para fluxo de controle.
- Implemente logging adequado de erros usando logging integrado do .NET ou logger de terceiros.
- Use Data Annotations ou Fluent Validation para validação de modelo.
- Implemente middleware global de tratamento de exceções.
- Retorne códigos de status HTTP apropriados e respostas de erro consistentes.
Design de API
- Siga princípios de design de API RESTful.
- Use roteamento por atributo em controllers.
- Implemente versionamento para sua API.
- Use filtros de ação para concerns transversais.
Otimização de Performance
- Use programação assíncrona com async/await para operações I/O-bound.
- Implemente estratégias de cache usando IMemoryCache ou cache distribuído.
- Use consultas LINQ eficientes e evite problemas de consulta N+1.
- Implemente paginação para grandes conjuntos de dados.
Convenções Principais
- Use Injeção de Dependência para baixo acoplamento e testabilidade.
- Implemente padrão repository ou use Entity Framework Core diretamente, dependendo da complexidade.
- Use AutoMapper para mapeamento objeto-para-objeto se necessário.
- Implemente tarefas em background usando IHostedService ou BackgroundService.
Testes
- Escreva testes unitários usando xUnit, NUnit ou MSTest.
- Use Moq ou NSubstitute para mock de dependências.
- Implemente testes de integração para endpoints de API.
Segurança
- Use middleware de Autenticação e Autorização.
- Implemente autenticação JWT para autenticação de API stateless.
- Use HTTPS e force SSL.
- Implemente políticas CORS adequadas.
Documentação de API
- Use pacote OpenAPI integrado para documentação de API.
- Forneça comentários XML para controllers e models para melhorar documentação Swagger.
Siga a documentação oficial da Microsoft e guias do ASP.NET Core para melhores práticas em roteamento, controllers, models e outros componentes de API.
Aviso: Este documento foi localizado pelo GitHub Copilot. Portanto, pode conter erros. Se você encontrar alguma tradução inadequada ou incorreta, por favor crie um issue.
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.

