Add and improve automated tests for .NET MAUI apps, focusing on ViewModels, services, platform abstractions, and unit/integration/device test boundaries. USE FOR: xUnit projects, ViewModel tests that avoid MauiProgram.CreateMauiApp, fakes/mocks, MAUI injectable platform interfaces such as IGeolocation/IConnectivity/IPreferences/IFileSystem/ISecureStorage instead of static Essentials calls, avoiding PlatformNotSupportedException in test hosts, testing navigation/data services, Microsoft.Maui.Build.AppProjectReference for MAUI app references, and deciding what must run on device. DO NOT USE FOR: UI automation or production profiling.
$npx -y skills add dotnet/maui-labs --skill maui-unit-testingInstalls into the current project.
Run `npx skills use "https://github.com/dotnet/maui-labs" --skill "dotnet/maui-labs/maui-unit-testing"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/dotnet/maui-labs" that are relevant to the current task. Run `npx skills add "https://github.com/dotnet/maui-labs"` and select the relevant skills, then follow their instructions.