Agent skill

Maui Performance

by davidortinau in davidortinau/maui-skills

Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT…

MITAuto-check passedMobile

Install Maui Performance

skills CLI
$ npx skills add davidortinau/maui-skills --skill maui-performance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davidortinau/maui-skills maui-performance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davidortinau/maui-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/maui-skills/skills/maui-performance .claude/skills/maui-performance && rm -rf skills-src

Use ~/.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/

Facts

Skill name
maui-performance
GitHub stars
175
Token cost
~1.4k tokens
SKILL.md length
491 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT…

  • Works in 8 steps: ✅ x:DataType on all pages, templates,… → ✅ No nested single-child layouts → ✅ Grid preferred over nested StackLayouts → …
  • : performance optimization
  • SKILL.md covers Profiling, Compiled Bindings, Layout Optimization and CollectionView and ListView, plus 6 more sections
  • Calls dotnet

What it does

Maui Performance is an agent skill from davidortinau/maui-skills. Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT configuration. USE FOR: "performance optimization", "slow startup", "app performance", "compiled bindings", "layout optimization", "image optimization", "trimming", "NativeAOT", "profiling MAUI", "reduce app size", "startup time". DO NOT USE FOR: data binding syntax (use maui-data-binding), deprecated API migration (use…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps, Performance optimization and Web performance. The repository describes itself as: .NET MAUI skills for GitHub Copilot and Claude Code. The licence is MIT.

When your agent uses it

  • : performance optimization
  • App performance
  • Compiled bindings
  • Layout optimization

Example prompts

  • “performance optimization”
  • “slow startup”
  • “app performance”
  • “/maui-performance”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. ✅ x:DataType on all pages, templates, and data-bound views
  2. ✅ No nested single-child layouts
  3. ✅ Grid preferred over nested StackLayouts
  4. ✅ Images sized to display, caching enabled
  5. ✅ ItemSizingStrategy="MeasureFirstItem" on uniform CollectionViews
  6. ✅ Startup work minimized and deferred
  7. ✅ Trimming enabled and tested
  8. ✅ Profile with dotnet-trace before and after changes

What it can do on your machine

Read from SKILL.md and the folder at commit 79bb4bf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Maui Performance loads about 1.4k tokens when it runs. Until then it costs about 149 tokens; SKILL.md has 491 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~149
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from davidortinau/maui-skills at commit 79bb4bf, republished under its MIT licence (© davidortinau). 491 words, ~1,387 tokens.

Download SKILL.mdSave it as .claude/skills/maui-performance/SKILL.md (or your agent's skills folder).
name
maui-performance
description
Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT configuration. USE FOR: "performance optimization", "slow startup", "app performance", "compiled bindings", "layout optimization", "image optimization", "trimming", "NativeAOT", "profiling MAUI", "reduce app size", "startup time". DO NOT USE FOR: data binding syntax (use maui-data-binding), deprecated API migration (use maui-current-apis), or unit testing setup (use maui-unit-testing).

.NET MAUI Performance Optimization

Profiling

  • dotnet-trace: Cross-platform profiler for all MAUI targets. Collect traces with:
    shell
    dotnet-trace collect --process-id <PID> --providers Microsoft-DotNETCore-SampleProfiler
  • PerfView (Windows only): Use for deep allocation and CPU analysis on WinUI targets.
  • Profile before optimizing — measure, don't guess.

Compiled Bindings

  • Always set x:DataType on pages/views to enable compiled bindings.
  • Compiled bindings are 8–20× faster than reflection-based bindings.
  • Required for NativeAOT and full trimming — reflection bindings break under trimming.
  • Apply x:DataType at the highest reasonable scope (page or root element).
xml
<ContentPage xmlns:vm="clr-namespace:MyApp.ViewModels"
             x:DataType="vm:MainViewModel">
    <Label Text="{Binding Title}" />
</ContentPage>
  • For DataTemplate inside CollectionView/ListView, set x:DataType on the template root:
xml
<DataTemplate x:DataType="model:Item">
    <Label Text="{Binding Name}" />
</DataTemplate>
  • Minimize unnecessary bindings: Static content that never changes doesn't need {Binding}. Use literal values or x:Static instead.

Layout Optimization

  • Avoid nested single-child layouts — a StackLayout with one child is pointless overhead.
  • Prefer Grid over nested StackLayout/VerticalStackLayout — Grid resolves layout in a single pass.
  • Use IsVisible="False" to hide elements rather than adding/removing from the tree at runtime.
  • Remove unnecessary wrapper containers — every layout adds a measure/arrange pass.
  • Avoid AbsoluteLayout when Grid with row/column definitions achieves the same result.
  • Set explicit WidthRequest/HeightRequest where sizes are known to reduce measure passes.

CollectionView and ListView

  • Use ItemSizingStrategy="MeasureFirstItem" on CollectionView when items have uniform height — avoids measuring every item individually.
xml
<CollectionView ItemSizingStrategy="MeasureFirstItem"
                ItemsSource="{Binding Items}">
  • Prefer CollectionView over ListView for new development.
  • Keep DataTemplate visual trees shallow — fewer nested layouts per item.

Image Optimization

  • Size images to display resolution — don't load a 4000×3000 image for a 200×200 display.
  • Use Aspect="AspectFill" or AspectFit and set explicit dimensions.
  • Cache downloaded images: CachingEnabled="True" (default) on UriImageSource, set CacheValidity.
  • Use platform-appropriate formats (WebP for Android, HEIF/PNG for iOS).
  • For icons and simple graphics, prefer SVG or vector-based font icons.

Resource Dictionaries

  • App-level (App.xaml): Shared styles, colors, converters used across multiple pages.
  • Page-level: Styles/resources specific to a single page — keeps App.xaml lean.
  • Avoid duplicating resources across dictionaries.
  • Use MergedDictionaries to organize large resource sets without bloating a single file.
Show full SKILL.md (192 more words)Show less

Startup Optimization

  • Minimize work in App constructor and MainPage constructor.
  • Defer non-essential service registration — use lazy initialization where possible.
  • Reduce the number of XAML pages parsed at startup (use Shell routing for deferred loading).
  • Remove unused Handlers/Effects registrations from MauiProgram.cs.
  • On Android, ensure AndroidManifest.xml doesn't force unnecessary permissions checks at launch.

Trimming

Enable IL trimming to reduce app size and remove unused code:

xml
<PropertyGroup>
    <PublishTrimmed>true</PublishTrimmed>
    <TrimMode>full</TrimMode>
</PropertyGroup>
  • Test thoroughly — trimming can remove code accessed only via reflection.
  • Use [DynamicDependency] or [UnconditionalSuppressMessage] to preserve reflection targets.
  • Compiled bindings are essential — reflection-based bindings will be trimmed away.

NativeAOT

  • NativeAOT compiles to native code ahead-of-time for faster startup and smaller footprint.
  • Requirements: compiled bindings, no unconstrained reflection, trimming-compatible code.
xml
<PropertyGroup>
    <PublishAot>true</PublishAot>
    <PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
  • Audit third-party NuGet packages for trimming/AOT compatibility.
  • Use [JsonSerializable] source generators instead of reflection-based JSON serialization.
  • Run dotnet publish with AOT to verify no warnings before shipping.

Quick Checklist

  1. ✅ x:DataType on all pages, templates, and data-bound views
  2. ✅ No nested single-child layouts
  3. ✅ Grid preferred over nested StackLayouts
  4. ✅ Images sized to display, caching enabled
  5. ✅ ItemSizingStrategy="MeasureFirstItem" on uniform CollectionViews
  6. ✅ Startup work minimized and deferred
  7. ✅ Trimming enabled and tested
  8. ✅ Profile with dotnet-trace before and after changes

© davidortinau, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/maui-skills/skills/maui-performance of davidortinau/maui-skills.

Open the folder on GitHubat commit 79bb4bf

Compare with similar skills

Maui Performance 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.

Maui Performance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Maui Performance this skilldavidortinau/maui-skills175—~1.4kAutomated safety check: PassMIT
React Native Best Practicescallstackincubator/agent-skills1.7k4 repos~3.1kAutomated safety check: PassMIT
Creating Reanimated Animationsgluestack/gluestack-ui5.3k—~2.4kAutomated safety check: PassNone
Flutter TesterFNOSP/FlyNarwhal496—~1.4kAutomated safety check: PassAGPL-3.0
BlocVeryGoodOpenSource/vgv-ai-flutter-plugin170—~2kAutomated safety check: PassMIT
Flutter Devaiskillstore/marketplace4301 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • React Native Best Practices

    callstackincubator/agent-skills

    Official

    Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations.

    1.7k GitHub starsUsed in 4 repos~3.1k tokens
    MobileAuto-check passed
  • Creating Reanimated Animations

    gluestack/gluestack-ui

    Generate React Native Reanimated animation code for React Native apps.

    5.3k GitHub stars~2.4k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Flutter Tester

    FNOSP/FlyNarwhal

    A skill your agent uses when creating, writing, fixing, or reviewing tests in a Flutter project.

    496 GitHub stars~1.4k tokensUpdated yesterday
    MobileAuto-check passed
  • Bloc

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…

    170 GitHub stars~2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Flutter Dev

    aiskillstore/marketplace

    Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platform-specific implementations.

    430 GitHub starsUsed in 1 repo~1.3k tokens
    MobileAuto-check passed
  • Pwa Expert

    curiositech/some_claude_skills

    Progressive Web App development with Service Workers, offline support, and app-like behavior.

    243 GitHub stars~2.4k tokensUpdated 1 mo ago
    MobileAuto-check: notes

More from davidortinau/maui-skills

All 41 skills in this repo
  • Maui Hot Reload Diagnostics

    davidortinau/maui-skills

    Diagnose and troubleshoot .NET MAUI Hot Reload issues (C Hot Reload, XAML Hot Reload, Blazor Hybrid).

    175 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Maui Accessibility

    davidortinau/maui-skills

    Guide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties visibility control, programmatic focus and announcements, and…

    175 GitHub stars~974 tokensUpdated 3 mo ago
    Auto-check passed
  • Maui Animations

    davidortinau/maui-skills

    .NET MAUI view animations, custom animations, easing functions, rotation, scale, translation, and fade effects.

    175 GitHub stars~911 tokensUpdated 3 mo ago
    Auto-check passed
  • Maui App Icons Splash

    davidortinau/maui-skills

    .NET MAUI app icon configuration, splash screen setup, SVG to PNG conversion at build time, composed/adaptive icons, and platform-specific icon and splash screen requirements for Android, iOS, Mac…

    175 GitHub stars~995 tokensUpdated 3 mo ago
    Auto-check passed
  • Maui App Lifecycle

    davidortinau/maui-skills

    .NET MAUI app lifecycle guidance covering the four app states (not running, running, deactivated, stopped), cross-platform Window lifecycle events, backgrounding and resume behaviour…

    175 GitHub stars~947 tokensUpdated 3 mo ago
    Auto-check passed
  • Maui Aspire

    davidortinau/maui-skills

    Guide for .NET MAUI apps consuming .NET Aspire-hosted backend services.

    175 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Maui Performance

What does Maui Performance do?

Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT…. Maui Performance is an agent skill from davidortinau/maui-skills.NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT configuration.

When should I use Maui Performance?

Maui Performance fits situations like: : performance optimization; app performance; compiled bindings; layout optimization.

How do I install Maui Performance in Claude Code?

Run `npx skills add davidortinau/maui-skills --skill maui-performance -a claude-code`. Or copy the skill folder (plugins/maui-skills/skills/maui-performance in davidortinau/maui-skills) into .claude/skills/maui-performance in your project. Claude Code loads it when a task matches its description.

How do I install Maui Performance in Codex?

Run `npx skills add davidortinau/maui-skills --skill maui-performance -a codex`. Or copy the skill folder (plugins/maui-skills/skills/maui-performance in davidortinau/maui-skills) into .agents/skills/maui-performance in your project. Codex loads it when a task matches its description.

Can I use Maui Performance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davidortinau/maui-skills --skill maui-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/maui-performance, .gemini/skills/maui-performance, .github/skills/maui-performance and .opencode/skills/maui-performance in your project.

What does Maui Performance need to run?

Going by SKILL.md and its folder, Maui Performance needs the command-line tools its instructions call (dotnet).

Does Maui Performance access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Maui Performance safe to install?

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.

What licence does Maui Performance use?

Maui Performance is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Maui Performance use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Maui Performance?

Skills that share tags, products or a category with Maui Performance: React Native Best Practices (callstackincubator/agent-skills, 1.7k stars), Creating Reanimated Animations (gluestack/gluestack-ui, 5.3k stars), Flutter Tester (FNOSP/FlyNarwhal, 496 stars) and Bloc (VeryGoodOpenSource/vgv-ai-flutter-plugin, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Maui Performance?

davidortinau (a GitHub user) maintains it in davidortinau/maui-skills, which has 175 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on July 6, 2026.

Source: davidortinau/maui-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.