Winui
managedcode/dotnet-skills
Build or review WinUI 3 applications with the Windows App SDK, including MVVM patterns, packaging decisions, navigation, theming, windowing, and interop boundaries with other .NET stacks.
Wire CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection.
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install github/awesome-copilot mvvm-toolkit-di --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mvvm-toolkit-di .claude/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .claude/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-diType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install github/awesome-copilot mvvm-toolkit-di --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mvvm-toolkit-di .agents/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .agents/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install github/awesome-copilot mvvm-toolkit-di --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mvvm-toolkit-di .cursor/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .cursor/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/github/awesome-copilot.git --path skills/mvvm-toolkit-di--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install github/awesome-copilot mvvm-toolkit-di --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mvvm-toolkit-di .gemini/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .gemini/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install github/awesome-copilot mvvm-toolkit-diInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mvvm-toolkit-di .github/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .github/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install github/awesome-copilot mvvm-toolkit-di --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mvvm-toolkit-di .opencode/skills/mvvm-toolkit-di && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mvvm-toolkit-di" agent skill from https://github.com/github/awesome-copilot/tree/main/skills/mvvm-toolkit-di into .opencode/skills/mvvm-toolkit-di/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mvvm-toolkit-di", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mvvm-toolkit-diWire CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection.
Mvvm Toolkit Di is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Wire CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection. Covers the .NET Generic Host composition root, constructor injection, service lifetimes (Singleton / Transient / Scoped), IMessenger registration, resolving ViewModels in Views, keyed services, testing seams, and the legacy Ioc.Default escape hatch. Use across WPF, WinUI 3, .NET MAUI, Uno, and Avalonia.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/dependency-injection.md`).
It sits in Mobile. It works with .NET, Avalonia and Windows. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
learn.microsoft.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mvvm Toolkit Di loads about 2.3k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 620 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 620 words, ~2,339 tokens.
.claude/skills/mvvm-toolkit-di/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Microsoft.Extensions.DependencyInjectionThe MVVM Toolkit deliberately ships no DI container — it composes with
Microsoft.Extensions.DependencyInjection, the same container ASP.NET
Core, Worker services, and the .NET Generic Host use.
TL;DR. Build the service provider once at startup (prefer
Host.CreateDefaultBuilder()). Register services and ViewModels. Inject through constructors. AvoidIoc.Default.GetService<T>()in user code.
IMessenger once and injecting it into ObservableRecipient
ViewModelsFor source generators and ViewModel patterns see the mvvm-toolkit
skill. For Messenger pub/sub see mvvm-toolkit-messenger.
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using CommunityToolkit.Mvvm.Messaging;
public partial class App : Application
{
public IHost Host { get; }
public App()
{
Host = Microsoft.Extensions.Hosting.Host
.CreateDefaultBuilder()
.ConfigureServices((_, services) =>
{
services.AddSingleton<IFilesService, FilesService>();
services.AddSingleton<ISettingsService, SettingsService>();
services.AddSingleton<IMessenger>(WeakReferenceMessenger.Default);
services.AddSingleton<ShellViewModel>();
services.AddTransient<ContactViewModel>();
services.AddTransient<EditorViewModel>();
})
.Build();
}
public static T GetService<T>() where T : class =>
((App)Current).Host.Services.GetRequiredService<T>();
}Generic Host benefits:
appsettings.json binding via Microsoft.Extensions.ConfigurationMicrosoft.Extensions.LoggingIHostedService) for background workWPF and Windows Forms must integrate the host lifetime with the app lifetime — see Use the .NET Generic Host in a WPF app.
When you only need a service container and want zero extra dependencies:
var services = new ServiceCollection();
services.AddSingleton<IFilesService, FilesService>();
services.AddTransient<ContactViewModel>();
ServiceProvider provider = services.BuildServiceProvider();Inject services and child ViewModels through the constructor:
public sealed partial class ContactViewModel(
IFilesService files,
IMessenger messenger,
ILogger<ContactViewModel> logger)
: ObservableRecipient(messenger)
{
[ObservableProperty]
private string? name;
[RelayCommand]
private async Task SaveAsync()
{
logger.LogInformation("Saving {Name}", Name);
await files.SaveAsync(Name!);
}
}Why constructor injection beats a service locator:
| Lifetime | Method | Typical use in XAML apps |
|---|---|---|
| Singleton | AddSingleton<T> | Shell/main-window VM, settings, file/HTTP services, the shared IMessenger, app-wide caches |
| Transient | AddTransient<T> | Per-page or per-document ViewModels (a fresh instance every resolve) |
| Scoped | AddScoped<T> | Rarely needed in client apps; useful with explicit IServiceScope (e.g., per-window scopes) |
services.AddSingleton<ShellViewModel>(); // 1 instance for app lifetime
services.AddTransient<NoteViewModel>(); // new instance per resolve
services.AddScoped<DialogService>(); // 1 per scope (rare)Resolve the page's root ViewModel in code-behind, then let it pull its own dependencies:
public sealed partial class ContactPage : Page
{
public ContactViewModel ViewModel { get; }
public ContactPage()
{
ViewModel = App.GetService<ContactViewModel>();
InitializeComponent();
}
}Bind in XAML with {x:Bind ViewModel.Xxx} (compiled bindings) or
{Binding Xxx} against DataContext.
For navigation frameworks (WinUI 3 Frame.Navigate, MAUI Shell, Prism,
MVVMCross), let the framework resolve the page and the page resolves its
ViewModel from DI. Don't new ViewModels manually.
IMessenger registrationRegister the messenger you want once, inject IMessenger everywhere:
services.AddSingleton<IMessenger>(WeakReferenceMessenger.Default);
// or
services.AddSingleton<IMessenger>(StrongReferenceMessenger.Default);Then:
public sealed partial class MyViewModel(IMessenger messenger)
: ObservableRecipient(messenger) { }For per-window messengers, register with keyed services or as scoped instances and inject into per-window ViewModels.
See the mvvm-toolkit-messenger skill for the messenger surface area.
Resolve different implementations of the same interface by key:
services.AddKeyedSingleton<IExporter, CsvExporter>("csv");
services.AddKeyedSingleton<IExporter, JsonExporter>("json");
public sealed partial class ExportViewModel(
[FromKeyedServices("csv")] IExporter csvExporter,
[FromKeyedServices("json")] IExporter jsonExporter)
: ObservableObject { /* ... */ }Constructor-injected dependencies are trivial to swap in tests. With
Moq:
[Fact]
public async Task Save_calls_files_service()
{
var files = new Mock<IFilesService>();
var messenger = new WeakReferenceMessenger();
var logger = NullLogger<ContactViewModel>.Instance;
var vm = new ContactViewModel(files.Object, messenger, logger)
{
Name = "Ada"
};
await vm.SaveCommand.ExecuteAsync(null);
files.Verify(f => f.SaveAsync("Ada"), Times.Once);
}If you're mocking Ioc.Default or static state, the ViewModel is using a
service locator — refactor to constructor injection.
Ioc.DefaultCommunityToolkit.Mvvm.DependencyInjection.Ioc is an escape hatch for
cases where constructor injection is impossible — XAML-instantiated VMs
for design-time data, ValueConverters, control templates.
Ioc.Default.ConfigureServices(
new ServiceCollection()
.AddSingleton<IFilesService, FilesService>()
.AddTransient<ContactViewModel>()
.BuildServiceProvider());
var files = Ioc.Default.GetRequiredService<IFilesService>();Treat it as the last resort. Inside ViewModels, services, and any class the DI container can construct, prefer constructor injection.
Ioc.Default.GetService<T>() inside a VM constructor. Hides the
dependency, breaks unit tests, prevents startup graph validation.Singleton. A "per-document" VM registered as singleton
becomes shared state across all documents — subtle data corruption.
Use AddTransient for per-instance VMs.BuildServiceProvider() calls. Each call is a fresh
container — singletons aren't shared. Build once at startup.IServiceProvider in long-lived objects. Indicates a
service-locator pattern. Inject the specific dependencies you need.Host.CreateDefaultBuilder()
(which sets ValidateScopes and ValidateOnBuild in development) so
registration mistakes fail at startup, not at first use.IServiceScope.| Topic | File |
|---|---|
| Full deep dive (Generic Host setup, lifetimes, keyed services, testing patterns, legacy Ioc) | references/dependency-injection.md |
External:
© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/mvvm-toolkit-di of github/awesome-copilot.
Open the folder on GitHubat commit 727ff2e
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.
Mvvm Toolkit Di next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mvvm Toolkit Di this skillgithub/awesome-copilot | 40k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Winuimanagedcode/dotnet-skills | 486 | — | ~1.4k | Automated safety check: Pass | MIT | |
| QA TesterJocysCom/FocusLogger | 213 | — | ~12k | Automated safety check: Pass | GPL-3.0 | |
| Code Reviewsbroenne/mcp-windows | 105 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Windows Automationsbroenne/mcp-windows | 105 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Migrate Vstest To Mtprunceel/ReactiveProperty | 944 | — | ~4.3k | Automated safety check: Pass | MIT |
managedcode/dotnet-skills
Build or review WinUI 3 applications with the Windows App SDK, including MVVM patterns, packaging decisions, navigation, theming, windowing, and interop boundaries with other .NET stacks.
JocysCom/FocusLogger
Create and maintain automated tests in Microsoft-native/.NET projects with a minimal stack — MSTest runner, System.Windows.Automation for Windows desktop, Playwright for real browser smoke.
sbroenne/mcp-windows
Review pull requests in mcp-windows for concrete bugs in MCP and CLI contracts, Windows UI automation, element identity, snapshots, bounded searches, and service lifetime.
sbroenne/mcp-windows
Guidance for reliable, token-efficient Windows automation through MCP.
runceel/ReactiveProperty
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP).
sbroenne/mcp-windows
Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server.
github/awesome-copilot
Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.
github/awesome-copilot
Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.
github/awesome-copilot
Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.
github/awesome-copilot
Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.
github/awesome-copilot
Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.
github/awesome-copilot
End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.
Categories
Wire CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection. Mvvm Toolkit Di is an agent skill from github/awesome-copilot, published by the product's own GitHub organization.DependencyInjection.
Mvvm Toolkit Di fits situations like: mobile work in your project.
Run `npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a claude-code`. Or copy the skill folder (skills/mvvm-toolkit-di in github/awesome-copilot) into .claude/skills/mvvm-toolkit-di in your project. Claude Code loads it when a task matches its description.
Run `npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a codex`. Or copy the skill folder (skills/mvvm-toolkit-di in github/awesome-copilot) into .agents/skills/mvvm-toolkit-di in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill mvvm-toolkit-di -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mvvm-toolkit-di, .gemini/skills/mvvm-toolkit-di, .github/skills/mvvm-toolkit-di and .opencode/skills/mvvm-toolkit-di in your project.
SKILL.md names no scripts, command-line tools or credentials: Mvvm Toolkit Di is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mvvm Toolkit Di is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mvvm Toolkit Di: Winui (managedcode/dotnet-skills, 486 stars), QA Tester (JocysCom/FocusLogger, 213 stars), Code Review (sbroenne/mcp-windows, 105 stars) and Windows Automation (sbroenne/mcp-windows, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.
Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.