Custom Agents for .NET Developers: C# Expert and WinForms Expert
Wendy Breiding presents experimental custom GitHub Copilot agents for .NET developers—C# Expert and WinForms Expert—designed to enhance code quality, architecture, and workflow in C# and WinForms projects.
Custom Agents for .NET Developers: C# Expert and WinForms Expert
Author: Wendy Breiding
GitHub Copilot has introduced experimental custom agents to further automate and streamline .NET development. Specifically, the new C# Expert and WinForms Expert agents enhance Copilot’s ability to provide best-in-class support for C# and Windows Forms applications.
C# Expert Agent
- Core C# Development: Adheres to modern, idiomatic C# coding standards, taking into account repository preferences.
- Code Integrity: Suggests efficient, minimal code changes, prioritizing async/await usage, reliable cancellation, and exception handling.
- Testing Support: Encourages behavior-driven unit testing, integration tests, and TDD workflows.
WinForms Expert Agent
- UI Design Patterns: Implements proven UI architectures like MVVM and MVP, promoting maintainability.
- Event Handling: Assists with complex event management and robust state management.
- Tool Integrity: Protects
.Designer.csfiles, ensuring continued compatibility with Visual Studio Designer after Copilot’s changes.
Getting Started
- Download
CSharpExpert.agent.mdandWinFormsExpert.agent.mdfrom @github/awesome-copilot. - Add them to your repository’s
.github/agentsfolder.
How to Use Custom Agents
- Assigning Tasks: Use Copilot’s issue assignment to select the C# or WinForms Expert agent for specialized advice.
- Copilot CLI: Support for
/agentcommand (coming soon). - Visual Studio Code: Available in Insiders edition under the Agent dropdown.
- Visual Studio: Automatic agent suggestions for your project (coming in v17.14.21, behind a feature flag).
Improvements and Developer Feedback
- Reduced Unused Code: C# Expert reduces unnecessary interfaces and parameters, cutting down on technical debt.
- Designer File Safety: WinForms Expert guards against breaking
.Designer.csfiles, preserving workflow with the Visual Studio Designer.
Learn More
Explore more sample agents and provide feedback via @github/awesome-copilot and GitHub Community. Official documentation is available at gh.io/customagents.
This post appeared first on “Microsoft .NET Blog”. Read the entire article here