microsoft/winforms-feature-adoption
> Adopts modern WinForms features in .NET 8+ applications including dark mode (Application.SetColorMode, SystemColors), async APIs (Control.InvokeAsync, Form.ShowDialogAsync, TaskDialog.ShowDialogAsync), and MVVM patterns (ViewModels, INotifyPropertyChanged, Commands, DataContext). Use when user requests "modernize WinForms", "add dark mode to WinForms", "implement WinForms MVVM", "add async to WinForms", "use InvokeAsync", "adopt modern WinForms features", or as a post-upgrade enhancement after dotnet-version-upgrade scenario completes. Also triggers for "Application.SetColorMode", "WinForms dark theme", "WinForms async patterns", "WinForms MVVM architecture", already target .NET 8+ (dark mode and async require .NET 9+).
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill winforms-feature-adoption
Modernize WinForms applications with framework features introduced in .NET 8+ — dark mode support, modern async APIs, and MVVM data binding patterns.
Prerequisite: Projects must already target .NET 8+ (use dotnet-version-upgrade scenario first if needed).
Goal: Enhance existing WinForms applications with modern features that improve user experience, code quality, and maintainability.
| Feature | .NET Version | Impact | Scope |
|---------|--------------|--------|-------|
| Dark Mode | 9.0+ | UI appearance | Application-level + per-control adjustments |
| Async APIs | 9.0+ | Code quality | Per-form/control async patterns |
| MVVM | 8.0+ | Architecture | Form-by-form or application-wide |
feature-selection.md.plan.md, scenario-instructions.md.Step 1: Validate environment:
get_solution_path() to identify solution.csproj files with <UseWindowsForms>true</UseWindowsForms>)<TargetFramework>:net8.0 or higherStep 2: Present feature availability based on detected TFMs:
If all WinForms projects are net9.0+:
Available Features:
- ✅ Dark Mode Support (.NET 9+)
- ✅ Modern Async APIs (.NET 9+)
- ✅ MVVM Pattern (.NET 8+)
If all WinForms projects are net8.0:
Available Features:
- ❌ Dark Mode Support (requires .NET 9+ — upgrade first)
- ❌ Modern Async APIs (requires .NET 9+ — upgrade first)
- ✅ MVVM Pattern (.NET 8+)
If mixed TFMs (some net8.0, some net9.0+):
Available Features (varies by project):
- ⚠️ Dark Mode: available for net9.0+ projects only
- ⚠️ Async APIs: available for net9.0+ projects only
- ✅ MVVM Pattern: available for all .NET 8+ projects
Step 3: Ask user which features to adopt:
When entering this stage, load: feature-selection.md
Determines which features to apply and to which forms/controls:
When entering this stage, load: planning.md
Creates the execution plan:
When entering this stage, load: execution.md
Applies the features using lazy-loaded WinForms skills:
building-winforms-applications skill for Application.SetColorMode(), control color adjustmentsmanaging-winforms-async-apis skill for InvokeAsync patterns, async event handlersmanaging-winforms-mvvm skill for ViewModel setup, data binding, Command patternsApplication.SetColorMode() called in Program.csSystemColors used for automatic themingControl.Invoke replaced with Control.InvokeAsyncDesigner compatibility breaks:
Build errors after MVVM adoption:
Take microsoft/winforms-feature-adoption from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.