Skill
C# Code Review Skill for GitHub Copilot
A GitHub Copilot custom skill that performs structured code reviews of C# source code, checking naming conventions, performance, security, and .NET best practices.

- Sample type
- Skill
- Products
- GitHub Copilot
- Created
- Updated
Sample documentation
How to use this sample
Summary
A GitHub Copilot custom skill that performs structured code reviews of C# source code. When activated, Copilot analyzes your code for naming conventions, performance pitfalls, security vulnerabilities, and .NET best practices â then produces a prioritized report with actionable suggestions. Ideal for teams that want consistent, thorough code reviews directly in their editor.
Skill đĄ
The full skill definition is in SKILL.md. To use it, copy the SKILL.md file into your repository's .github/skills/code-review-csharp/ folder.
Trigger Phrases
Say any of these to GitHub Copilot to activate the skill:
- "Review this C# code"
- "Check my C# for best practices"
- "Analyze this C# class"
- "Find issues in my C# code"
Description âšī¸
This skill teaches GitHub Copilot to act as a C# code reviewer. It follows a structured multi-step process:
- Analyze code structure â checks class organization, dependencies, and SRP adherence
- Verify naming conventions â validates PascalCase, camelCase, and .NET naming rules
- Evaluate performance â identifies common pitfalls like string concat in loops, unnecessary allocations, and sync-over-async
- Assess security â flags SQL injection, hardcoded secrets, missing input validation
- Review readability â checks method length, complexity, magic numbers, and modern C# usage
The output is a Markdown report with an issues table (severity-sorted), positive pattern acknowledgments, and prioritized recommendations.
Contributors đ¨âđģ
Version history
| Version | Date | Comments |
|---|---|---|
| 1.0 | February 18, 2026 | Initial release |
Instructions đ
- Copy the
SKILL.mdfile into your repository at.github/skills/code-review-csharp/SKILL.md - Open a C# file in VS Code
- Open GitHub Copilot Chat
- Say: "Review this C# code" or "Check my C# for best practices"
- Copilot will ask for any missing details (review focus, target framework) and then produce a structured review report
Customization đ
- Narrow the focus: Ask for specific review areas â "Review this C# code for security issues only"
- Set the framework: Specify your .NET version â "Review this C# code targeting .NET 6"
- Adjust severity: Only see critical issues â "Review this C# code, only show critical issues"
- Extend the skill: Fork the
SKILL.mdand add your team's custom coding standards to the Rules section
Prerequisites
Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
You can try looking at issues related to this sample to see if anybody else is having the same issues.
If you encounter any issues using this sample, create a new issue.
Finally, if you have an idea for improvement, make a suggestion.
Disclaimer
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Learn more
References
Background and supporting resources provided by the contributor.