{"id":26249871,"url":"https://github.com/nikiforovall/dotnet-copilot-rules","last_synced_at":"2025-06-12T06:41:13.288Z","repository":{"id":281332180,"uuid":"944920592","full_name":"NikiforovAll/dotnet-copilot-rules","owner":"NikiforovAll","description":"A collection of GitHub Copilot AI rules for .NET development best practices.","archived":false,"fork":false,"pushed_at":"2025-03-08T10:24:46.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T11:24:54.787Z","etag":null,"topics":["ai","copilot","github-copilot","prompts"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NikiforovAll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-08T08:32:59.000Z","updated_at":"2025-03-08T10:24:49.000Z","dependencies_parsed_at":"2025-03-08T11:25:38.334Z","dependency_job_id":null,"html_url":"https://github.com/NikiforovAll/dotnet-copilot-rules","commit_stats":null,"previous_names":["nikiforovall/dotnet-copilot-rules"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdotnet-copilot-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdotnet-copilot-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdotnet-copilot-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdotnet-copilot-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikiforovAll","download_url":"https://codeload.github.com/NikiforovAll/dotnet-copilot-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437978,"owners_count":20290863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","copilot","github-copilot","prompts"],"created_at":"2025-03-13T15:50:25.296Z","updated_at":"2025-06-12T06:41:13.282Z","avatar_url":"https://github.com/NikiforovAll.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 .NET GitHub Copilot Rules\n\nA collection of [GitHub Copilot AI rules](https://code.visualstudio.com/docs/copilot/copilot-customization) for .NET development best practices.\n\n\u003e [!TIP]\n\u003e You can enhance Copilot's chat responses by providing it with contextual details about your team's workflow, tools, or project specifics.\n\n## 📚 Customizations: Instructions, Prompts, MCPs, etc.\n\nThis set of rules is a good starting point and should be customized to fit your specific needs. You can add or remove rules as necessary.\n\n### 💻 .NET Development\n\nRules for writing clean, maintainable C# code:\n- ✨ Modern C# coding patterns\n- 🧪 Testing best practices\n- 📁 Code organization\n- 🛡️ Error handling\n- 🔌 Dependency management\n\n* Code-generation instructions - [csharp/coding-guidelines.md](.vscode/instructions/coding-guidelines.instructions.md), [csharp/coding-style.md](.vscode/instructions/coding-style.instructions.md)\n* Test-generation instructions -  [csharp/testing-xunit.md](.vscode/instructions/testing-xunit.instructions.md)\n\n### ⏳ [Git](.vscode/git-message.instructions.md)\n\n* Commit message generation instructions - [git-message.md](.vscode/git-message.instructions.md)\n\n### Tools\n\nHere is my top content extraction tools for GitHub Copilot:\n\n* `#fetch` - fetch web page\n* `#githubRepo` - fetch remote GitHub repository\n* `#context7` - fetch docs\n* `#codebase` - work with the code base\n\n## How to Use This Repository\n\nCopy the relevant instructions you want to use into your project's `.vscode/instructions` directory and configure `github.copilot.chat.codeGeneration.instructions` if needed.\n\nHere is an example of how to set up your `.vscode/settings.json` file:\n\n```json\n{\n  \"chat.promptFiles\": true,\n  \"chat.promptFilesLocations\": {\n    \".vscode/prompts\": true\n  },\n  \"chat.instructionsFilesLocations\": {\n    \".vscode/instructions\": true\n  },\n  \"github.copilot.chat.codeGeneration.instructions\": [],\n  \"github.copilot.chat.commitMessageGeneration.instructions\": [\n    {\n      \"file\": \".vscode/git-message.instructions.md\"\n    }\n  ],\n  \"github.copilot.chat.reviewSelection.enabled\": true,\n  \"github.copilot.chat.reviewSelection.instructions\": [\n    {\n      \"file\": \".vscode/instructions/coding-guidelines.instructions.md\"\n    },\n    {\n      \"file\": \".vscode/instructions/coding-style.instructions.md\"\n    }\n  ],\n  \"github.copilot.chat.testGeneration.instructions\": [\n    {\n      \"file\": \".vscode/instructions/testing-xunit.instructions.md\"\n    }\n  ]\n}\n```\n\n## 🚀 Motivation\n\n### Productivity\n\nYou can create reusable instructions and prompts for your team to handle common tasks and GenAI scenarios effectively.\n\n### Coding with Agents in Mind\n\nShift your mindset from being a code typist to an AI operator when appropriate. Start with an instruction prompt and gather as much context as possible. Once you clearly understand the task, determine the level of AI assistance needed.\n\n💡 To stay in the \"Productivity Zone\", gain experience with various AI models.\n\n### Treat AI as a Teammate\n\nBuilding a successful, maintainable project requires clean, idiomatic, and consistent code. This is where *coding guidelines* are essential. They:\n- Promote consistency, readability, and maintainability.\n- Streamline collaboration and reduce technical debt.\n- Provide context for AI tools, ensuring generated code aligns with project standards.\n\nWithout clear guidelines, AI contributions may introduce inconsistencies, increasing maintenance overhead.\n\n### Documentation\n\nDocument your coding guidelines so it can be consumed by AI tools. Not only can it be used for additional context for code generation, but also now you can chat with LLMs about your coding guidelines. It becomes integral part of your project.\n\n💡 For example, you can ask Copilot to review your code, and it will refer to the guidelines you provided.\n\n### Agent Mode\n\nWith the introduction of [Agent Mode](https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode), clear guidelines are crucial. They ensure consistency and independence in AI-generated contributions.\n\n## Changelog:\n\n* New release \u003chttps://code.visualstudio.com/updates/v1_100\u003e introduces a better way to provide context to Copilot. \n  * Custom Instructions (user/workspace)\n  * Custom Prompts (user/workspace)\n\n## Blogs\n\n* https://nikiforovall.blog/productivity/2025/03/08/github-copilot-instructions-for-dotnet.html\n* https://nikiforovall.blog/productivity/2025/04/19/github-copilot-prompt-engineering.html\n* https://nikiforovall.blog/productivity/2025/05/03/github-copilot-prompt-engineering-code-review.html\n\n## 💳 Credits\n\nInspired by \u003chttps://github.com/Aaronontheweb/dotnet-cursor-rules\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fdotnet-copilot-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikiforovall%2Fdotnet-copilot-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fdotnet-copilot-rules/lists"}