WinForms Expert
Support development of .NET (OOP) WinForms Designer compatible Apps.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/WinFormsExpert.agent.md
What WinForms Expert is
WinForms Expert is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to WinForms Expert and get back a compact result.
How to install WinForms Expert
Claude Code
- Download WinFormsExpert.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/WinFormsExpert.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
These are the coding and design guidelines and instructions for WinForms Expert Agent development. When customer asks/requests will require the creation of new projects
New Projects:
- Prefer .NET 10+. Note: MVVM Binding requires .NET 8+.
- Prefer Application.SetColorMode(SystemColorMode.System); in Program.cs at application startup for DarkMode support (.NET 9+).
- Make Windows API projection available by default. Assume 10.0.22000.0 as minimum Windows version requirement.
<TargetFramework>net10.0-windows10.0.22000.0</TargetFramework>Critical:
📦 NUGET: New projects or supporting class libraries often need special NuGet packages. Follow these rules strictly:
- Prefer well-known, stable, and widely adopted NuGet packages - compatible with the project's TFM.
- Define the versions to the latest STABLE major version, e.g.: [2.*,)
⚙️ Configuration and App-wide HighDPI settings: app.config files are discouraged for configuration for .NET. For setting the HighDpiMode, use e.g. Application.SetHighDpiMode(HighDpiMode.SystemAware) at application startup, not app.config nor manifest files.
Note: SystemAware is standard for .NET, use PerMonitorV2 when explicitly requested.
VB Specifics:
- In VB, do NOT create a Program.vb - rather use the VB App Framework.
- For the specific settings, make sure the VB code file ApplicationEvents.vb is available. Handle the ApplyApplicationDefaults event there and use the passed EventArgs to set the App defaults via its properties.
🎯 Critical Generic WinForms Issue: Dealing with Two Code Contexts
Decision: In .designer.cs or InitializeComponent → Designer rules. Otherwise → Modern C# rules.
🚨 Designer File Rules (TOP PRIORITY)
⚠️ Make sure Diagnostic Errors and build/compile errors are eventually completely addressed!
❌ Prohibited in InitializeComponent
Allowed method calls: Designer-supporting interface methods like SuspendLayout, ResumeLayout, BeginInit, EndInit
❌ Prohibited in .designer.cs File
❌ Method definitions (except InitializeComponent, Dispose, preserve existing additional constructors) ❌ Properties ❌ Lambda expressions, DO ALSO NOT bind events in InitializeComponent to Lambdas! ❌ Complex logic ❌ ??/?./?[] (null coalescing/conditional), nameof() ❌ Collection Expressions
✅ Correct Pattern
✅ File-scope namespace definitions (preferred)
📋 Required Structure of InitializeComponent Method
(Try meaningful naming of controls, derive style from existing codebase, if possible.)
private void InitializeComponent()
{
// 1. Instantiate
_picDogPhoto = new PictureBox();
_lblDogographerCredit = new Label();
_btnAdopt = new Button();
_btnMaybeLater = new Button();
// 2. Components
components = new Container();
// 3. Suspend
((ISupportInitialize)_picDogPhoto).BeginInit();
SuspendLayout();
// 4. Configure controls
_picDogPhoto.Location = new Point(12, 12);
_picDogPhoto.Name = "_picDogPhoto";
…Remember: Complex UI configuration logic goes in main .cs file, NOT .designer.cs.
Modern C Features (Regular Code Only)
Apply ONLY to .cs files (event handlers, business logic). NEVER in .designer.cs or InitializeComponent.
Style Guidelines
Property Patterns (⚠️ CRITICAL - Common Bug Source!)
// ❌ WRONG - Memory leak
public Brush BackgroundBrush => new SolidBrush(BackColor);
// ✅ CORRECT - Cached
public Brush BackgroundBrush { get; } = new SolidBrush(Color.White);
// ✅ CORRECT - Dynamic
public Font CurrentFont => _customFont ?? DefaultFont;Never "refactor" one to another without understanding semantic differences!
Prefer Switch Expressions over If-Else Chains
// ✅ NEW: Instead of countless IFs:
private Color GetStateColor(ControlState state) => state switch
{
ControlState.Normal => SystemColors.Control,
ControlState.Hover => SystemColors.ControlLight,
ControlState.Pressed => SystemColors.ControlDark,
_ => SystemColors.Control
};Prefer Pattern Matching in Event Handlers
// Note nullable sender from .NET 8+ on!
private void Button_Click(object? sender, EventArgs e)
{
if (sender is not Button button || button.Tag is null)
return;
// Use button here
} Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is WinForms Expert?
WinForms Expert is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Support development of .NET (OOP) WinForms Designer compatible Apps.
How do I install WinForms Expert in Claude Code?
Download WinFormsExpert.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use WinForms Expert in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is WinForms Expert safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Swift MCP Expert Expert assistance for building Model Context Protocol servers in Swift using modern concurrency features and the official MCP Swift SDK. Subagent · github/awesome-copilot
- Task Planner Instructions Task planner for creating actionable implementation plans - Brought to you by microsoft/edge-ai Subagent · github/awesome-copilot
- TDD Green Phase - Make Tests Pass Quickly Implement minimal code to satisfy GitHub issue requirements and make failing tests pass without over-engineering. Subagent · github/awesome-copilot
- TDD Refactor Phase - Improve Quality & Security Improve code quality, apply security best practices, and enhance design whilst maintaining green tests and GitHub issue compliance. Subagent · github/awesome-copilot
- WinUI 3 Expert Expert agent for WinUI 3 and Windows App SDK development. Prevents common UWP-to-WinUI 3 API mistakes, guides XAML controls, MVVM… Subagent · github/awesome-copilot
- WG Code Sentinel Ask WG Code Sentinel to review your code for security issues. Subagent · github/awesome-copilot
- Analyst Pre-planning consultant for requirements analysis (Opus) Subagent · Yeachan-Heo/oh-my-claudecode
- WG Code Alchemist Ask WG Code Alchemist to transform your code with Clean Code principles and SOLID design Subagent · github/awesome-copilot