dotnet-wpf-modern — Claude Code skill: WPF on .NET 8+
A skill that steers your coding agent through modern WPF: generic host, MVVM Toolkit, Fluent theme, current C# features.
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a claude-codeWhat dotnet-wpf-modern does
The skill covers WPF as it looks on .NET 8 and later. Dependency injection through the generic host, MVVM built on CommunityToolkit.Mvvm source generators, faster rendering, and newer language features such as records and primary constructors all get worked examples. Fluent theming and system theme detection are marked as .NET 9 territory.
The baseline is .NET 8.0 with net8.0-windows as the target framework. Projects are SDK-style, so there is no packages.config and no AssemblyInfo.cs; nullable reference types and implicit usings are on. Sample code pulls in CommunityToolkit.Mvvm and Microsoft.Extensions.Hosting.
Scope is narrow on purpose. Moving an existing app off .NET Framework belongs to dotnet-wpf-migration, desktop testing to dotnet-ui-testing-core, and picking a UI framework to dotnet-ui-chooser. If your job is the migration itself, look elsewhere — this one stays on .NET 8+.
What it helps with
- wire up a WPF app with the generic host and dependency injection
- drop ViewModel boilerplate using CommunityToolkit.Mvvm generators
- apply the Fluent theme and detect the system theme
- use records, primary constructors and pattern matching in C#
- see what changed between .NET Framework WPF and .NET 8
Example prompts for the agent
- Set up
App.xaml.cswith a host builder and register my services and ViewModels - Rewrite this ViewModel with CommunityToolkit.Mvvm:
[ObservableProperty]for state,[RelayCommand]for actions - Add Fluent theming and system theme detection to my .NET 9 app
How to install dotnet-wpf-modern
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a claude-code2Manually: put the files in place
~/.claude/skills/dotnet-wpf-modern/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dotnet-wpf-modern/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a codex2Manually: put the files in place
.agents/skills/dotnet-wpf-modern/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a cursor2Manually: put the files in place
.cursor/skills/dotnet-wpf-modern/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills dotnet-wpf-modern2Manually: put the files in place
.github/skills/dotnet-wpf-modern/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/dotnet-wpf-modernManually: put the files in place
.devin/skills/dotnet-wpf-modern/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about dotnet-wpf-modern
How do I install dotnet-wpf-modern in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill dotnet-wpf-modern -a claude-code. The skill lands at ~/.claude/skills/dotnet-wpf-modern/SKILL.md.
What does dotnet-wpf-modern do?
It gives the agent WPF guidance for .NET 8+: host builder, MVVM Toolkit, performance, modern C# and theming. It also spells out the differences from .NET Framework WPF.
Can it help migrate a .NET Framework project?
No. Migration lives in a separate skill, dotnet-wpf-migration. This one sticks to .NET 8 and newer.