make-wpf-project
Scaffolds a complete WPF project structure with MVVM, DI, and best practices. Use when starting a new WPF application, creating a WPF solution from scratch, or setting up project structure with CommunityToolkit.Mvvm or Prism. Usage: /wpf-dev-pack:make-wpf-project <ProjectName> [--minimal|--full|--prism]
What this skill does
# WPF Project Scaffolder
**If `$0` is empty, use the AskUserQuestion tool to ask: "Enter the WPF project name (e.g., MyApp, Dashboard)". Do NOT proceed until a valid name is provided. Use the response as the ProjectName for all subsequent steps.**
Scaffold a WPF project named `$0` with MVVM, DI, and best practices.
## Usage
```bash
# Default project (recommended) - CommunityToolkit.Mvvm + GenericHost
/wpf-dev-pack:make-wpf-project $0
# Minimal structure
/wpf-dev-pack:make-wpf-project $0 --minimal
# Full structure (all layers separated)
/wpf-dev-pack:make-wpf-project $0 --full
# Prism framework (module-based architecture)
/wpf-dev-pack:make-wpf-project $0 --prism
```
### Framework Options
| Option | Framework | Features |
|--------|-----------|----------|
| (default) | CommunityToolkit.Mvvm | Lightweight, Source Generator, GenericHost DI |
| `--prism` | Prism.DryIoc | Region Navigation, Module, Dialog Service |
> **Prism details**: See [PRISM.md](PRISM.md) for complete Prism project structure and examples.
> **Project naming (consistency contract)**: the WPF application project is
> suffixed **`.WpfApp`**. The `make-wpf-viewmodel` and `make-wpf-service`
> generators locate the app project by this suffix to place Views and register
> DI. Keep `.WpfApp` so the whole `make-wpf-*` family wires into one solution.
---
## Project Structures
### Default Structure
```
$0/
├── $0.sln
├── $0.WpfApp/ # WPF Application (entry point + Views)
│ ├── App.xaml # merges Mappings.xaml
│ ├── App.xaml.cs # GenericHost + DI
│ ├── MainWindow.xaml # shell: ContentControl nav host
│ ├── MainWindow.xaml.cs
│ ├── GlobalUsings.cs
│ ├── Mappings.xaml # ViewModel→View DataTemplate map
│ ├── Views/
│ ├── Converters/
│ └── $0.WpfApp.csproj
├── $0.ViewModels/ # ViewModel (pure C#, no System.Windows)
│ ├── MainViewModel.cs
│ ├── GlobalUsings.cs
│ └── $0.ViewModels.csproj
└── $0.Core/ # Business logic + service interfaces
├── Models/
├── Services/
└── $0.Core.csproj
```
### Minimal Structure
```
$0/
├── $0.sln
└── $0/
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Mappings.xaml
├── ViewModels/
│ └── MainViewModel.cs
├── Views/
├── Models/
├── Services/
└── $0.csproj
```
### Full Structure
```
$0/
├── $0.slnx
├── src/
│ ├── $0.Abstractions/ # Interfaces, abstract classes
│ ├── $0.Core/ # Business logic
│ ├── $0.ViewModels/ # ViewModel
│ ├── $0.WpfServices/ # WPF services (CollectionView etc.)
│ ├── $0.UI/ # CustomControl library (Themes/Generic.xaml)
│ └── $0.WpfApp/ # WPF Application
└── tests/
├── $0.Core.Tests/
└── $0.ViewModels.Tests/
```
### Prism Structure (`--prism`)
See [PRISM.md](PRISM.md) for complete structure.
---
## Composition Style (CommunityToolkit.Mvvm)
This scaffold establishes **ViewModel First Composition + Stateful ViewModel**
from the start:
- the shell `MainViewModel` exposes `CurrentViewModel`,
- the shell `MainWindow` hosts it in a `ContentControl`, and
- `Mappings.xaml` resolves the View from the ViewModel type via an implicit
`DataTemplate` (no `x:Key`).
Add screens with `/wpf-dev-pack:make-wpf-viewmodel <Name> --with-view`, which
appends one `DataTemplate` to `Mappings.xaml` and registers DI.
`ViewModelLocator`, code-behind `DataContext = new VM()`, and inline XAML
`DataContext` are prohibited (see `prohibitions.md`).
---
## Generated Files
### $0.WpfApp.csproj
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<!-- Assembly is $0.WpfApp but root namespace is $0, so View/ViewModel
namespaces ($0.Views / $0.ViewModels) line up across projects. -->
<RootNamespace>$0</RootNamespace>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\$0.ViewModels\$0.ViewModels.csproj" />
<ProjectReference Include="..\$0.Core\$0.Core.csproj" />
</ItemGroup>
</Project>
```
### App.xaml (merges Mappings.xaml)
```xml
<Application x:Class="$0.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Mappings.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
```
> No `StartupUri` — the host resolves and shows `MainWindow` from DI in `OnStartup`.
### App.xaml.cs (with DI)
```csharp
namespace $0;
public partial class App : Application
{
private readonly IHost _host;
public App()
{
_host = Host.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
// Services — add with /wpf-dev-pack:make-wpf-service
// (that generator adds the registration + the GlobalUsings entry)
// ViewModels
services.AddSingleton<MainViewModel>();
// Windows
services.AddSingleton<MainWindow>();
})
.Build();
}
protected override async void OnStartup(StartupEventArgs e)
{
await _host.StartAsync();
var mainWindow = _host.Services.GetRequiredService<MainWindow>();
mainWindow.DataContext = _host.Services.GetRequiredService<MainViewModel>();
mainWindow.Show();
base.OnStartup(e);
}
protected override async void OnExit(ExitEventArgs e)
{
await _host.StopAsync();
_host.Dispose();
base.OnExit(e);
}
}
```
### MainWindow.xaml (shell — ContentControl nav host)
```xml
<Window x:Class="$0.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding Title}" Height="600" Width="800">
<!-- CurrentViewModel is resolved to its View by Mappings.xaml (ViewModel First). -->
<ContentControl Content="{Binding CurrentViewModel}" />
</Window>
```
```csharp
namespace $0;
public partial class MainWindow : Window
{
public MainWindow() => InitializeComponent();
}
```
### Mappings.xaml (ViewModel → View)
```xml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:$0.ViewModels;assembly=$0.ViewModels"
xmlns:views="clr-namespace:$0.Views">
<!-- /wpf-dev-pack:make-wpf-viewmodel appends one entry per screen, e.g.:
<DataTemplate DataType="{x:Type vm:HomeViewModel}">
<views:HomeView />
</DataTemplate>
-->
</ResourceDictionary>
```
### MainViewModel.cs (shell)
```csharp
namespace $0.ViewModels;
public sealed partial class MainViewModel : ObservableObject
{
[ObservableProperty] private string _title = "$0";
// ViewModel First: assign a screen ViewModel to CurrentViewModel and
// Mappings.xaml resolves the matching View into the shell ContentControl.
// Set this once you add a screen with /wpf-dev-pack:make-wpf-viewmodel.
[ObservableProperty] private object? _currentViewModel;
}
```
### GlobalUsings.cs (WpfApp)
```csharp
global using System;
global using System.Collections.Generic;
global using System.Collections.ObjectModel;
global using System.Linq;
global using System.TRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.