[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADWJGSFHXE7JM9S6SB22DZ":3,"skill-same:01M6ADWJGSFHXE7JM9S6SB22DZ":102},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6ADWJGSFHXE7JM9S6SB22DZ","mvvm-toolkit","MVVM Toolkit 核心开发","CommunityToolkit.Mvvm (the MVVM Toolkit) core: source generators ([ObservableProperty], [RelayCommand], [NotifyPropertyChangedFor], [NotifyCanExecuteChangedFor], [NotifyDataErrorInfo]), base classes (ObservableObject \u002F ObservableValidator \u002F ObservableRecipient), commands (RelayCommand \u002F AsyncRelayCommand), and validation. Companion skills: mvvm-toolkit-messenger for pub\u002Fsub, mvvm-toolkit-di for Microsoft.Extensions.DependencyInjection wiring. Works across WPF, WinUI 3, MAUI, Uno, and Avalonia.","CommunityToolkit.Mvvm（MVVM 工具包）核心：源代码生成器（[ObservableProperty]、[RelayCommand]、[NotifyPropertyChangedFor]、[NotifyCanExecuteChangedFor]、[NotifyDataErrorInfo]）、基类（ObservableObject \u002F ObservableValidator \u002F ObservableRecipient）、命令（RelayCommand \u002F AsyncRelayCommand）以及数据验证。配套技能：mvvm-toolkit-messenger 用于发布\u002F订阅，mvvm-toolkit-di 用于 Microsoft.Extensions.DependencyInjection 接线。适用于 WPF、WinUI 3、MAUI、Uno 和 Avalonia。","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41162,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"toolkit","mvvm toolkit","mvvm","commands","di","wiring","source","for","extensions","messenger","companion","maui","avalonia","microsoft","across","base","validation","wpf","winui","core","2026-11-10 10:12:30",false,"---\nname: mvvm-toolkit\ndescription: 'CommunityToolkit.Mvvm (the MVVM Toolkit) core: source generators ([ObservableProperty], [RelayCommand], [NotifyPropertyChangedFor], [NotifyCanExecuteChangedFor], [NotifyDataErrorInfo]), base classes (ObservableObject \u002F ObservableValidator \u002F ObservableRecipient), commands (RelayCommand \u002F AsyncRelayCommand), and validation. Companion skills: mvvm-toolkit-messenger for pub\u002Fsub, mvvm-toolkit-di for Microsoft.Extensions.DependencyInjection wiring. Works across WPF, WinUI 3, MAUI, Uno, and Avalonia.'\n---\n\n# CommunityToolkit.Mvvm (core)\n\nUse this skill when authoring or reviewing ViewModels, properties,\ncommands, or validation in apps that use `CommunityToolkit.Mvvm` 8.x.\n\n> **Companion skills.** Load **`mvvm-toolkit-messenger`** for `IMessenger`\n> pub\u002Fsub patterns. Load **`mvvm-toolkit-di`** for\n> `Microsoft.Extensions.DependencyInjection` integration.\n\n> **Quick recap.** `[ObservableProperty]` on private fields in `partial`\n> classes; `[RelayCommand]` on instance methods; inherit from\n> `ObservableObject` (or `ObservableValidator` for input forms,\n> `ObservableRecipient` when using `IMessenger`).\n\n---\n\n## Package & setup\n\n```xml\n\u003CItemGroup>\n  \u003CPackageReference Include=\"CommunityToolkit.Mvvm\" Version=\"8.*\" \u002F>\n\u003C\u002FItemGroup>\n```\n\nTargets: `netstandard2.0`, `netstandard2.1`, `net6.0`+. Works on .NET, .NET\nFramework, Mono. Source generators ship in the same NuGet — no extra\nanalyzer reference required.\n\nNamespaces:\n\n```csharp\nusing CommunityToolkit.Mvvm.ComponentModel;   \u002F\u002F ObservableObject, [ObservableProperty]\nusing CommunityToolkit.Mvvm.Input;             \u002F\u002F [RelayCommand], RelayCommand, AsyncRelayCommand\n```\n\n> **Universal rule.** Every type that uses `[ObservableProperty]` or\n> `[RelayCommand]` — and every enclosing type, if nested — must be\n> declared `partial`. Without it, the generators emit\n> `MVVMTK0008` \u002F `MVVMTK0042`.\n\n---\n\n## Source generators cheat sheet\n\n| Attribute | Applied to | Generates |\n|-----------|-----------|-----------|\n| `[ObservableProperty]` | private field | Public `INotifyPropertyChanged` property + `OnXxxChanging`\u002F`OnXxxChanged` partial-method hooks |\n| `[NotifyPropertyChangedFor(nameof(Other))]` | observable field | Also raises `PropertyChanged` for the listed property |\n| `[NotifyCanExecuteChangedFor(nameof(MyCommand))]` | observable field | Calls `MyCommand.NotifyCanExecuteChanged()` on change |\n| `[NotifyDataErrorInfo]` | observable field on `ObservableValidator` | Calls `ValidateProperty(value)` from the setter |\n| `[NotifyPropertyChangedRecipients]` | observable field on `ObservableRecipient` | `Broadcast(old, new)` after the change |\n| `[RelayCommand]` | instance method | Lazy `RelayCommand` \u002F `AsyncRelayCommand` exposed as `IRelayCommand` \u002F `IAsyncRelayCommand` |\n| `[RelayCommand(CanExecute = nameof(CanX))]` | instance method | Wires `CanExecute` to a method or property |\n| `[RelayCommand(IncludeCancelCommand = true)]` | async method with `CancellationToken` | Also generates `XxxCancelCommand` |\n| `[RelayCommand(AllowConcurrentExecutions = true)]` | async method | Allows queued\u002Fparallel invocations (default disables while running) |\n| `[RelayCommand(FlowExceptionsToTaskScheduler = true)]` | async method | Surfaces exceptions via `ExecutionTask` instead of awaiting and rethrowing |\n| `[property: SomeAttr]` | observable field or `[RelayCommand]` method | Forwards `SomeAttr` onto the generated property (e.g., `[JsonIgnore]`) |\n\n**Naming.** Field `name` \u002F `_name` \u002F `m_name` → `Name`. Method `LoadAsync` →\n`LoadCommand` (the `Async` suffix is stripped; a leading `On` is also\nstripped).\n\nSee [`references\u002Fsource-generators.md`](references\u002Fsource-generators.md) for\nthe full attribute reference with generated-code samples.\n\n---\n\n## ViewModel patterns\n\n### Simple observable property\n\n```csharp\npublic partial class ContactViewModel : ObservableObject\n{\n    [ObservableProperty]\n    private string? name;\n}\n```\n\n### Hooks: `OnXxxChanging` \u002F `OnXxxChanged`\n\n```csharp\n[ObservableProperty]\nprivate string? name;\n\npartial void OnNameChanged(string? value) =>\n    Logger.LogInformation(\"Name changed to {Name}\", value);\n```\n\nBoth single-arg `(value)` and two-arg `(oldValue, newValue)` overloads\nare available. Implement only the ones you need; unimplemented hooks are\nelided by the compiler (zero runtime cost).\n\n### Dependent properties + dependent commands\n\n```csharp\n[ObservableProperty]\n[NotifyPropertyChangedFor(nameof(FullName))]\n[NotifyCanExecuteChangedFor(nameof(SaveCommand))]\nprivate string? firstName;\n\n[ObservableProperty]\n[NotifyPropertyChangedFor(nameof(FullName))]\n[NotifyCanExecuteChangedFor(nameof(SaveCommand))]\nprivate string? lastName;\n\npublic string FullName => $\"{FirstName} {LastName}\".Trim();\n```\n\n### Wrapping a non-observable model\n\n```csharp\npublic sealed class ObservableUser(User user) : ObservableObject\n{\n    public string Name\n    {\n        get => user.Name;\n        set => SetProperty(user.Name, value, user, (u, n) => u.Name = n);\n    }\n}\n```\n\nPass a static lambda (no captured state) to keep the call allocation-free.\n\n---\n\n## Commands\n\n```csharp\n[RelayCommand]\nprivate void Refresh() => Items.Reset();\n\n[RelayCommand]\nprivate async Task LoadAsync()\n{\n    foreach (var item in await service.GetItemsAsync())\n        Items.Add(item);\n}\n\n[RelayCommand(IncludeCancelCommand = true)]\nprivate async Task DownloadAsync(CancellationToken token)\n{\n    await using var stream = await http.GetStreamAsync(url, token);\n    \u002F\u002F ...\n}\n\n[RelayCommand(CanExecute = nameof(CanSave))]\nprivate Task SaveAsync() => repo.SaveAsync(Name!);\n\nprivate bool CanSave() => !string.IsNullOrWhiteSpace(Name);\n```\n\nReach for manual `RelayCommand` \u002F `AsyncRelayCommand` constructors only\nwhen you must own the command's lifetime explicitly or compose it from\nnon-trivial sources. The attribute style covers ~95% of cases.\n\nSee [`references\u002Frelaycommand-cookbook.md`](references\u002Frelaycommand-cookbook.md)\nfor sync \u002F async \u002F cancellable \u002F concurrency \u002F error-surfacing recipes.\n\n---\n\n## Base class selection\n\n| Base class | Use when |\n|------------|---------|\n| `ObservableObject` | Default. `INotifyPropertyChanged` + `INotifyPropertyChanging` + `SetProperty` overloads + `SetPropertyAndNotifyOnCompletion` for `Task` properties |\n| `ObservableValidator` | The VM needs `INotifyDataErrorInfo` (forms, settings input) |\n| `ObservableRecipient` | The VM sends or receives `IMessenger` messages — see the **`mvvm-toolkit-messenger`** skill |\n\nC# is single-inheritance: `ObservableValidator` and `ObservableRecipient`\nboth extend `ObservableObject`, so combining them requires composition\n(e.g., inject `IMessenger` into an `ObservableValidator`).\n\n---\n\n## Validation\n\n```csharp\nusing System.ComponentModel.DataAnnotations;\n\npublic sealed partial class RegistrationViewModel : ObservableValidator\n{\n    [ObservableProperty]\n    [NotifyDataErrorInfo]\n    [Required, MinLength(2), MaxLength(100)]\n    private string? name;\n\n    [ObservableProperty]\n    [NotifyDataErrorInfo]\n    [Required, EmailAddress]\n    private string? email;\n\n    [RelayCommand]\n    private void Submit()\n    {\n        ValidateAllProperties();\n        if (HasErrors) return;\n        \u002F\u002F submit...\n    }\n}\n```\n\nOther entry points: `TrySetProperty`, `ValidateProperty(value, name)`,\n`ClearAllErrors()`, `GetErrors(propertyName)`. Custom rules support\n`[CustomValidation]` methods and custom `ValidationAttribute` subclasses.\n\nSee [`references\u002Fvalidation.md`](references\u002Fvalidation.md) for the full\nvalidator surface area.\n\n---\n\n## Top pitfalls\n\n1. **Forgetting `partial`.** Class (and every enclosing type) must be\n   `partial`. Compile error `MVVMTK0008` \u002F `MVVMTK0042`.\n2. **PascalCase field name.** `[ObservableProperty] private string Name;`\n   collides with the generated property. Use `name`, `_name`, or `m_name`.\n3. **`async void` on `[RelayCommand]`.** The generator only wraps\n   `Task`-returning methods as `IAsyncRelayCommand`. `async void` becomes\n   a sync `RelayCommand` and exceptions are unobserved. Always return\n   `Task`.\n4. **Forgetting `[NotifyCanExecuteChangedFor]`.** The Save button stays\n   disabled even though `CanSave()` would now return `true`.\n5. **Mutating the same reference held by an `[ObservableProperty]`\n   field.** `EqualityComparer\u003CT>.Default` returns `true`, no notification\n   fires. Replace the instance instead of mutating it.\n\nFor the full diagnostic table (`MVVMTK0xxx`) and more pitfalls, see\n[`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md).\n\n---\n\n## End-to-end mini walkthrough\n\nA two-pane Notes app demonstrating generators + commands +\n`[NotifyCanExecuteChangedFor]`:\n\n```csharp\npublic sealed partial class NoteViewModel(INotesService notes,\n    IMessenger messenger) : ObservableRecipient(messenger)\n{\n    [ObservableProperty]\n    [NotifyCanExecuteChangedFor(nameof(SaveCommand))]\n    [NotifyCanExecuteChangedFor(nameof(DeleteCommand))]\n    private string? filename;\n\n    [ObservableProperty]\n    [NotifyCanExecuteChangedFor(nameof(SaveCommand))]\n    private string? text;\n\n    [RelayCommand(CanExecute = nameof(CanSave))]\n    private Task SaveAsync()\n    {\n        Messenger.Send(new NoteSavedMessage(Filename!));\n        return notes.SaveAsync(Filename!, Text!);\n    }\n\n    [RelayCommand(CanExecute = nameof(CanDelete))]\n    private Task DeleteAsync() => notes.DeleteAsync(Filename!);\n\n    private bool CanSave() =>\n        !string.IsNullOrWhiteSpace(Filename) && !string.IsNullOrEmpty(Text);\n    private bool CanDelete() => !string.IsNullOrWhiteSpace(Filename);\n}\n```\n\nFor the full sample (DI wiring, View code-behind, XAML, unit tests), see\n[`references\u002Fend-to-end-walkthrough.md`](references\u002Fend-to-end-walkthrough.md).\n\n---\n\n## References & companion skills\n\n| Topic | Where |\n|-------|-------|\n| Source generator attribute reference | [`references\u002Fsource-generators.md`](references\u002Fsource-generators.md) |\n| RelayCommand recipes | [`references\u002Frelaycommand-cookbook.md`](references\u002Frelaycommand-cookbook.md) |\n| Validation deep dive | [`references\u002Fvalidation.md`](references\u002Fvalidation.md) |\n| Full Notes-app walkthrough | [`references\u002Fend-to-end-walkthrough.md`](references\u002Fend-to-end-walkthrough.md) |\n| `MVVMTK0xxx` diagnostics & pitfalls | [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) |\n| **Messenger pub\u002Fsub** | Companion skill: **`mvvm-toolkit-messenger`** |\n| **`Microsoft.Extensions.DependencyInjection` wiring** | Companion skill: **`mvvm-toolkit-di`** |\n\nExternal sources:\n\n- Toolkit overview: \u003Chttps:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fcommunitytoolkit\u002Fmvvm\u002F>\n- WinUI MVVM Toolkit tutorial: \u003Chttps:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fapps\u002Ftutorials\u002Fwinui-mvvm-toolkit\u002Fintro>\n- Source: \u003Chttps:\u002F\u002Fgithub.com\u002FCommunityToolkit\u002Fdotnet>\n- Samples: \u003Chttps:\u002F\u002Fgithub.com\u002FCommunityToolkit\u002FMVVM-Samples>\n","# CommunityToolkit.Mvvm (core)\n\nUse this skill when authoring or reviewing ViewModels, properties,\ncommands, or validation in apps that use `CommunityToolkit.Mvvm` 8.x.\n\n> **Companion skills.** Load **`mvvm-toolkit-messenger`** for `IMessenger`\n> pub\u002Fsub patterns. Load **`mvvm-toolkit-di`** for\n> `Microsoft.Extensions.DependencyInjection` integration.\n\n> **Quick recap.** `[ObservableProperty]` on private fields in `partial`\n> classes; `[RelayCommand]` on instance methods; inherit from\n> `ObservableObject` (or `ObservableValidator` for input forms,\n> `ObservableRecipient` when using `IMessenger`).\n\n---\n\n## Package & setup\n\n```xml\n\u003CItemGroup>\n  \u003CPackageReference Include=\"CommunityToolkit.Mvvm\" Version=\"8.*\" \u002F>\n\u003C\u002FItemGroup>\n```\n\nTargets: `netstandard2.0`, `netstandard2.1`, `net6.0`+. Works on .NET, .NET\nFramework, Mono. Source generators ship in the same NuGet — no extra\nanalyzer reference required.\n\nNamespaces:\n\n```csharp\nusing CommunityToolkit.Mvvm.ComponentModel;   \u002F\u002F ObservableObject, [ObservableProperty]\nusing CommunityToolkit.Mvvm.Input;             \u002F\u002F [RelayCommand], RelayCommand, AsyncRelayCommand\n```\n\n> **Universal rule.** Every type that uses `[ObservableProperty]` or\n> `[RelayCommand]` — and every enclosing type, if nested — must be\n> declared `partial`. Without it, the generators emit\n> `MVVMTK0008` \u002F `MVVMTK0042`.\n\n---\n\n## Source generators cheat sheet\n\n| Attribute | Applied to | Generates |\n|-----------|-----------|-----------|\n| `[ObservableProperty]` | private field | Public `INotifyPropertyChanged` property + `OnXxxChanging`\u002F`OnXxxChanged` partial-method hooks |\n| `[NotifyPropertyChangedFor(nameof(Other))]` | observable field | Also raises `PropertyChanged` for the listed property |\n| `[NotifyCanExecuteChangedFor(nameof(MyCommand))]` | observable field | Calls `MyCommand.NotifyCanExecuteChanged()` on change |\n| `[NotifyDataErrorInfo]` | observable field on `ObservableValidator` | Calls `ValidateProperty(value)` from the setter |\n| `[NotifyPropertyChangedRecipients]` | observable field on `ObservableRecipient` | `Broadcast(old, new)` after the change |\n| `[RelayCommand]` | instance method | Lazy `RelayCommand` \u002F `AsyncRelayCommand` exposed as `IRelayCommand` \u002F `IAsyncRelayCommand` |\n| `[RelayCommand(CanExecute = nameof(CanX))]` | instance method | Wires `CanExecute` to a method or property |\n| `[RelayCommand(IncludeCancelCommand = true)]` | async method with `CancellationToken` | Also generates `XxxCancelCommand` |\n| `[RelayCommand(AllowConcurrentExecutions = true)]` | async method | Allows queued\u002Fparallel invocations (default disables while running) |\n| `[RelayCommand(FlowExceptionsToTaskScheduler = true)]` | async method | Surfaces exceptions via `ExecutionTask` instead of awaiting and rethrowing |\n| `[property: SomeAttr]` | observable field or `[RelayCommand]` method | Forwards `SomeAttr` onto the generated property (e.g., `[JsonIgnore]`) |\n\n**Naming.** Field `name` \u002F `_name` \u002F `m_name` → `Name`. Method `LoadAsync` →\n`LoadCommand` (the `Async` suffix is stripped; a leading `On` is also\nstripped).\n\nSee [`references\u002Fsource-generators.md`](references\u002Fsource-generators.md) for\nthe full attribute reference with generated-code samples.\n\n---\n\n## ViewModel patterns\n\n### Simple observable property\n\n```csharp\npublic partial class ContactViewModel : ObservableObject\n{\n    [ObservableProperty]\n    private string? name;\n}\n```\n\n### Hooks: `OnXxxChanging` \u002F `OnXxxChanged`\n\n```csharp\n[ObservableProperty]\nprivate string? name;\n\npartial void OnNameChanged(string? value) =>\n    Logger.LogInformation(\"Name changed to {Name}\", value);\n```\n\nBoth single-arg `(value)` and two-arg `(oldValue, newValue)` overloads\nare available. Implement only the ones you need; unimplemented hooks are\nelided by the compiler (zero runtime cost).\n\n### Dependent properties + dependent commands\n\n```csharp\n[ObservableProperty]\n[NotifyPropertyChangedFor(nameof(FullName))]\n[NotifyCanExecuteChangedFor(nameof(SaveCommand))]\nprivate string? firstName;\n\n[ObservableProperty]\n[NotifyPropertyChangedFor(nameof(FullName))]\n[NotifyCanExecuteChangedFor(nameof(SaveCommand))]\nprivate string? lastName;\n\npublic string FullName => $\"{FirstName} {LastName}\".Trim();\n```\n\n### Wrapping a non-observable model\n\n```csharp\npublic sealed class ObservableUser(User user) : ObservableObject\n{\n    public string Name\n    {\n        get => user.Name;\n        set => SetProperty(user.Name, value, user, (u, n) => u.Name = n);\n    }\n}\n```\n\nPass a static lambda (no captured state) to keep the call allocation-free.\n\n---\n\n## Commands\n\n```csharp\n[RelayCommand]\nprivate void Refresh() => Items.Reset();\n\n[RelayCommand]\nprivate async Task LoadAsync()\n{\n    foreach (var item in await service.GetItemsAsync())\n        Items.Add(item);\n}\n\n[RelayCommand(IncludeCancelCommand = true)]\nprivate async Task DownloadAsync(CancellationToken token)\n{\n    await using var stream = await http.GetStreamAsync(url, token);\n    \u002F\u002F ...\n}\n\n[RelayCommand(CanExecute = nameof(CanSave))]\nprivate Task SaveAsync() => repo.SaveAsync(Name!);\n\nprivate bool CanSave() => !string.IsNullOrWhiteSpace(Name);\n```\n\nReach for manual `RelayCommand` \u002F `AsyncRelayCommand` constructors only\nwhen you must own the command's lifetime explicitly or compose it from\nnon-trivial sources. The attribute style covers ~95% of cases.\n\nSee [`references\u002Frelaycommand-cookbook.md`](references\u002Frelaycommand-cookbook.md)\nfor sync \u002F async \u002F cancellable \u002F concurrency \u002F error-surfacing recipes.\n\n---\n\n## Base class selection\n\n| Base class | Use when |\n|------------|---------|\n| `ObservableObject` | Default. `INotifyPropertyChanged` + `INotifyPropertyChanging` + `SetProperty` overloads + `SetPropertyAndNotifyOnCompletion` for `Task` properties |\n| `ObservableValidator` | The VM needs `INotifyDataErrorInfo` (forms, settings input) |\n| `ObservableRecipient` | The VM sends or receives `IMessenger` messages — see the **`mvvm-toolkit-messenger`** skill |\n\nC# is single-inheritance: `ObservableValidator` and `ObservableRecipient`\nboth extend `ObservableObject`, so combining them requires composition\n(e.g., inject `IMessenger` into an `ObservableValidator`).\n\n---\n\n## Validation\n\n```csharp\nusing System.ComponentModel.DataAnnotations;\n\npublic sealed partial class RegistrationViewModel : ObservableValidator\n{\n    [ObservableProperty]\n    [NotifyDataErrorInfo]\n    [Required, MinLength(2), MaxLength(100)]\n    private string? name;\n\n    [ObservableProperty]\n    [NotifyDataErrorInfo]\n    [Required, EmailAddress]\n    private string? email;\n\n    [RelayCommand]\n    private void Submit()\n    {\n        ValidateAllProperties();\n        if (HasErrors) return;\n        \u002F\u002F submit...\n    }\n}\n```\n\nOther entry points: `TrySetProperty`, `ValidateProperty(value, name)`,\n`ClearAllErrors()`, `GetErrors(propertyName)`. Custom rules support\n`[CustomValidation]` methods and custom `ValidationAttribute` subclasses.\n\nSee [`references\u002Fvalidation.md`](references\u002Fvalidation.md) for the full\nvalidator surface area.\n\n---\n\n## Top pitfalls\n\n1. **Forgetting `partial`.** Class (and every enclosing type) must be\n   `partial`. Compile error `MVVMTK0008` \u002F `MVVMTK0042`.\n2. **PascalCase field name.** `[ObservableProperty] private string Name;`\n   collides with the generated property. Use `name`, `_name`, or `m_name`.\n3. **`async void` on `[RelayCommand]`.** The generator only wraps\n   `Task`-returning methods as `IAsyncRelayCommand`. `async void` becomes\n   a sync `RelayCommand` and exceptions are unobserved. Always return\n   `Task`.\n4. **Forgetting `[NotifyCanExecuteChangedFor]`.** The Save button stays\n   disabled even though `CanSave()` would now return `true`.\n5. **Mutating the same reference held by an `[ObservableProperty]`\n   field.** `EqualityComparer\u003CT>.Default` returns `true`, no notification\n   fires. Replace the instance instead of mutating it.\n\nFor the full diagnostic table (`MVVMTK0xxx`) and more pitfalls, see\n[`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md).\n\n---\n\n## End-to-end mini walkthrough\n\nA two-pane Notes app demonstrating generators + commands +\n`[NotifyCanExecuteChangedFor]`:\n\n```csharp\npublic sealed partial class NoteViewModel(INotesService notes,\n    IMessenger messenger) : ObservableRecipient(messenger)\n{\n    [ObservableProperty]\n    [NotifyCanExecuteChangedFor(nameof(SaveCommand))]\n    [NotifyCanExecuteChangedFor(nameof(DeleteCommand))]\n    private string? filename;\n\n    [ObservableProperty]\n    [NotifyCanExecuteChangedFor(nameof(SaveCommand))]\n    private string? text;\n\n    [RelayCommand(CanExecute = nameof(CanSave))]\n    private Task SaveAsync()\n    {\n        Messenger.Send(new NoteSavedMessage(Filename!));\n        return notes.SaveAsync(Filename!, Text!);\n    }\n\n    [RelayCommand(CanExecute = nameof(CanDelete))]\n    private Task DeleteAsync() => notes.DeleteAsync(Filename!);\n\n    private bool CanSave() =>\n        !string.IsNullOrWhiteSpace(Filename) && !string.IsNullOrEmpty(Text);\n    private bool CanDelete() => !string.IsNullOrWhiteSpace(Filename);\n}\n```\n\nFor the full sample (DI wiring, View code-behind, XAML, unit tests), see\n[`references\u002Fend-to-end-walkthrough.md`](references\u002Fend-to-end-walkthrough.md).\n\n---\n\n## References & companion skills\n\n| Topic | Where |\n|-------|-------|\n| Source generator attribute reference | [`references\u002Fsource-generators.md`](references\u002Fsource-generators.md) |\n| RelayCommand recipes | [`references\u002Frelaycommand-cookbook.md`](references\u002Frelaycommand-cookbook.md) |\n| Validation deep dive | [`references\u002Fvalidation.md`](references\u002Fvalidation.md) |\n| Full Notes-app walkthrough | [`references\u002Fend-to-end-walkthrough.md`](references\u002Fend-to-end-walkthrough.md) |\n| `MVVMTK0xxx` diagnostics & pitfalls | [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) |\n| **Messenger pub\u002Fsub** | Companion skill: **`mvvm-toolkit-messenger`** |\n| **`Microsoft.Extensions.DependencyInjection` wiring** | Companion skill: **`mvvm-toolkit-di`** |\n\nExternal sources:\n\n- Toolkit overview: \u003Chttps:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fcommunitytoolkit\u002Fmvvm\u002F>\n- WinUI MVVM Toolkit tutorial: \u003Chttps:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fapps\u002Ftutorials\u002Fwinui-mvvm-toolkit\u002Fintro>\n- Source: \u003Chttps:\u002F\u002Fgithub.com\u002FCommunityToolkit\u002Fdotnet>\n- Samples: \u003Chttps:\u002F\u002Fgithub.com\u002FCommunityToolkit\u002FMVVM-Samples>\n",{"name":5,"description":7},"main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Fmvvm-toolkit",5360,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 04:42:30",{"source":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add github\u002Fawesome-copilot --skill mvvm-toolkit",{"tool":72,"command":73},"bunx","bunx skills add github\u002Fawesome-copilot --skill mvvm-toolkit",{"tool":75,"command":76},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill mvvm-toolkit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002FSKILL.md",true,[80,86,90,94,98],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fend-to-end-walkthrough.md","REFERENCE","参考文档",11394,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002Freferences\u002Fend-to-end-walkthrough.md",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Frelaycommand-cookbook.md",6887,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002Freferences\u002Frelaycommand-cookbook.md",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fsource-generators.md",9534,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002Freferences\u002Fsource-generators.md",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Ftroubleshooting.md",7171,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002Freferences\u002Ftroubleshooting.md",{"path":99,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fvalidation.md",5840,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fmvvm-toolkit\u002Freferences\u002Fvalidation.md",[103,111,118,128,155,181],{"skillNo":104,"name":105,"nameZh":17,"description":106,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":110},"01M7B5D8BRA66G07045DF7WDYA","sap-cloud-integration","SAP Cloud Integration (CPI, part of SAP Integration Suite) runtime-specific guidance for building and troubleshooting iFlows. Use when writing or reviewing CPI Groovy scripts, choosing headers vs. exchange properties, designing exception subprocesses, JMS retry, idempotency or data store patterns, or diagnosing adapter errors (SFTP, HTTP\u002FOAuth, SOAP, IDoc, OData, AS2, Cloud Connector) from Message Processing Log (MPL) text. Not for SAP PI\u002FPO, ABAP development, or generic Java\u002FGroovy outside CPI.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsap-cloud-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":112,"name":113,"nameZh":17,"description":114,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":110},"01M7B5CYRGSG571NH7EJWT5066","on-device-delegate","Saves cloud-model context by briefing one bounded, read-heavy sub-task (more than about 25 KB of prose, or many files that no single command can answer) to the local-coding plugin's on-device worker, which runs on the local MAI Code 1.1 Flash model. Use for log and test triage, summarizing many files, or extracting facts from large inputs. When the user names this skill, call the skill tool in the same response as your first other tool call, never as a separate step.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fon-device-delegate\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":17,"description":121,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":122,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":127},"01M74CBQ0M3ZKGQH8XKQZ2FHB1","scout-issue","Use when a developer wants to find the best GitHub issues to contribute to in a repository. Invoke with \u002Fscout-issue or ask to find good first issues, beginner-friendly issues, or open source work. Asks about experience level, technical skills, time, and contribution type, then searches GitHub issues, scores them, and presents ranked recommendations with match analysis.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":129,"name":130,"nameZh":17,"description":131,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":51},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[],[135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154],"supabase rls policies","supabase rls","supabase","rls","project","with","when","review","change","read","write","security","isolation","tables","as","tests","prove","use","users","functions",{"skillNo":156,"name":157,"nameZh":17,"description":158,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":51},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[],[162,163,164,165,166,167,168,169,170,171,172,173,174,38,175,176,177,178,179,180],"distribution","skill distribution audit","audit","output","reconcile","release","template","duplicate","investigate","drift","SET","deterministic","installer","discovery","comparison","helper","manifest","version","collection",{"skillNo":182,"name":183,"nameZh":17,"description":184,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":185,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":51},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[],[189,190,191,192,193,194,195,38,139,196,197,198,199,200,201,202,152,203,204,205],"code","logicapps custom code net10 migration","migration","custom","Legacy","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","debugging","workflows"]