viewmodel-generator

Generate C# MVVM WPF ViewModel scaffolding with INotifyPropertyChanged and RelayCommand.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kongliuli/VibeSkills --skill viewmodel-generator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: viewmodel-generator
Source: https://github.com/kongliuli/VibeSkills/tree/main/Skills/C%23/mvvm-wpf/viewmodel-generator
Command: npx skills add https://github.com/kongliuli/VibeSkills --skill viewmodel-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ViewModel boilerplate in C# MVVM WPF projects is repetitive and error-prone. This skill automates the boilerplate scaffolding to ensure consistent INotifyPropertyChanged implementation, ObservableCollection management, and command wiring across ViewModels.

Core Features & Use Cases

  • Automated INotifyPropertyChanged: standard base class and property change notifications.
  • ObservableCollection handling: patterns for managing collections and selection.
  • RelayCommand generation: support for both parameterless and parameterized commands with proper CanExecute wiring.
  • Property change propagation: mechanisms to refresh dependent properties when others change.
  • Reusable templates: ready-to-use ViewModelBase and sample patterns for common UI scenarios.

Quick Start

Create a minimal ViewModel by wiring a ViewModelBase, a sample ProductViewModel with Name and Price, and a Save/Cancel RelayCommand to illustrate the patterns.

Frequently Asked Questions about viewmodel-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate MVVM ViewModel boilerplate for WPF without manual INotifyPropertyChanged coding?▼

MVVM ViewModel boilerplate generation automates creating a reusable ViewModelBase with INotifyPropertyChanged, ObservableCollection handling, and RelayCommand wiring to eliminate repetitive manual coding in WPF projects.

What's the best way to wire RelayCommand with CanExecute in a C# WPF ViewModel?▼

Wiring RelayCommand with CanExecute is handled by generating functional command templates that support both parameterless and parameterized commands, ensuring proper CanExecute logic is automatically scaffolded within your ViewModel.

How do I propagate property changes to dependent properties in a WPF MVVM ViewModel?▼

Property change propagation in a WPF MVVM ViewModel is achieved by applying functional templates that automatically refresh dependent properties when their source properties trigger the INotifyPropertyChanged event.

Can I use this ViewModel scaffolding for managing ObservableCollection selections in WPF?▼

Yes, the ViewModel scaffolding includes specific patterns for managing ObservableCollection handling, including collection updates and selection tracking, ensuring consistent MVVM data binding across common WPF UI scenarios.

Do I need any external libraries or dependencies to scaffold ViewModels with this approach?▼

No external libraries or dependencies are required to scaffold ViewModels, as the approach uses functional templates and a reusable ViewModelBase built entirely on standard C# WPF MVVM mechanisms like INotifyPropertyChanged.

How do I create a sample ViewModel with Save and Cancel commands in C# WPF?▼

Creating a sample ViewModel with Save and Cancel commands involves wiring a ViewModelBase with RelayCommand generation, illustrated by a ProductViewModel containing Name and Price properties to demonstrate the scaffolding patterns.