Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build cross-platform .NET applications with Uno Platform targeting WebAssembly, iOS, Android, macOS, Linux, and Windows from a single XAML/C# codebase. USE FOR: building cross-platform apps from a single C# and XAML codebase; targeting WebAssembly, iOS, Android, macOS, Linux, and Windows simultaneously; migrating WPF or UWP. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build
.claude/skills/managedcode-uno-platform/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 52% | 0% |
See detailed examples in the references/ folder:
patterns.md — MVUX, XAML, navigation, and performance patterns| Platform | Rendering | Notes | |----------|-----------|-------| | Windows | WinUI 3 | Native Windows App SDK | | WebAssembly | Skia/Canvas | Runs in browser | | iOS | Skia/Metal | Native iOS app | | Android | Skia/OpenGL | Native Android app | | macOS | Skia/Metal | Mac Catalyst or AppKit | | Linux | Skia/X11 | GTK or Framebuffer |
MyApp/
├── MyApp/ # Shared code
│ ├── App.xaml # Application entry
│ ├── MainPage.xaml # Main page
│ ├── Presentation/ # ViewModels (MVUX/MVVM)
│ ├── Business/ # Business logic
│ └── Services/ # Platform services
├── MyApp.Wasm/ # WebAssembly head
├── MyApp.Mobile/ # iOS and Android head
├── MyApp.Skia.Gtk/ # Linux head
├── MyApp.Skia.WPF/ # Windows Skia head
└── MyApp.Windows/ # Native WinUI headcsharppublic partial record MainModel { public IListFeed<TodoItem> Items => ListFeed.Async(LoadItems); private async ValueTask<IImmutableList<TodoItem>> LoadItems(CancellationToken ct) { var items = await _todoService.GetAllAsync(ct); return items.ToImmutableList(); } }
xml<Page xmlns:uen="using:Uno.Extensions.Navigation.UI"> <utu:FeedView Source="{Binding Items}"> <utu:FeedView.ValueTemplate> <DataTemplate> <ListView ItemsSource="{Binding}"> <ListView.ItemTemplate> <DataTemplate x:DataType="local:TodoItem"> <TextBlock Text="{Binding Title}" /> </DataTemplate> </ListView.ItemTemplate> </ListView> </DataTemplate> </utu:FeedView.ValueTemplate> <utu:FeedView.ProgressTemplate> <DataTemplate> <ProgressRing IsActive="True" /> </DataTemplate> </utu:FeedView.ProgressTemplate> </utu:FeedView> </Page>
csharppublic partial class MainViewModel(ITodoService todoService) : ObservableObject { [ObservableProperty] private ObservableCollection<TodoItem> _items = []; [ObservableProperty] private bool _isLoading; [RelayCommand] private async Task LoadItemsAsync() { IsLoading = true; try { var items = await todoService.GetAllAsync(); Items = new ObservableCollection<TodoItem>(items); } finally { IsLoading = false; } } }
xml<TextBlock Text="Welcome" xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:android="http://uno.ui/android" xmlns:ios="http://uno.ui/ios" xmlns:wasm="http://uno.ui/wasm"> <win:TextBlock.Foreground> <SolidColorBrush Color="Blue" /> </win:TextBlock.Foreground> <android:TextBlock.Foreground> <SolidColorBrush Color="Green" /> </android:TextBlock.Foreground> </TextBlock>
csharp// Services/DeviceService.cs (shared) public partial class DeviceService { public partial string GetDeviceInfo(); } // Services/DeviceService.wasm.cs public partial class DeviceService { public partial string GetDeviceInfo() => "WebAssembly"; } // Services/DeviceService.Android.cs public partial class DeviceService { public partial string GetDeviceInfo() => $"Android {Android.OS.Build.VERSION.Release}"; }
csharp// Enable Hot Reload in App.xaml.cs public App() { this.InitializeComponent(); #if DEBUG // Enable Hot Reload this.EnableHotReload(); #endif }
| Anti-Pattern | Why It's Bad | Better Approach | |--------------|--------------|-----------------| | Platform code in shared | Breaks compilation | Use partial classes or #if | | Ignoring Skia differences | Visual bugs | Test on all renderers | | WPF assumptions | Not all APIs exist | Check Uno API coverage | | Heavy XAML | Slow on WASM | Virtualize, simplify | | Synchronous loading | UI freezes | Always use async |
xml <ListView ItemsSource="{Binding Items}" VirtualizingPanel.VirtualizationMode="Recycling" />
csharp // Load images on demand var image = await ImageSource.LoadFromUriAsync(uri);
x:Bind where supported)InvokeAsync for JS interopcsharp// Use Uno.Extensions for enhanced patterns var builder = this.CreateBuilder(args) .Configure(host => host .UseConfiguration() .UseLocalization() .UseNavigation() .UseMvux() .ConfigureServices(services => { services.AddSingleton<ITodoService, TodoService>(); }));
Other measured skills in the registry, with their headline benchmark lift.