Install
$ agentstack add skill-davidortinau-maui-skills-maui-performance ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
.NET MAUI Performance Optimization
Profiling
- dotnet-trace: Cross-platform profiler for all MAUI targets. Collect traces with:
``shell dotnet-trace collect --process-id --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:DataTypeon 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:DataTypeat the highest reasonable scope (page or root element).
- For
DataTemplateinsideCollectionView/ListView, setx:DataTypeon the template root:
- Minimize unnecessary bindings: Static content that never changes doesn't need
{Binding}. Use literal values orx:Staticinstead.
Layout Optimization
- Avoid nested single-child layouts — a
StackLayoutwith one child is pointless overhead. - Prefer
Gridover nestedStackLayout/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
AbsoluteLayoutwhenGridwith row/column definitions achieves the same result. - Set explicit
WidthRequest/HeightRequestwhere sizes are known to reduce measure passes.
CollectionView and ListView
- Use
ItemSizingStrategy="MeasureFirstItem"onCollectionViewwhen items have uniform height — avoids measuring every item individually.
- Prefer
CollectionViewoverListViewfor new development. - Keep
DataTemplatevisual 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"orAspectFitand set explicit dimensions. - Cache downloaded images:
CachingEnabled="True"(default) onUriImageSource, setCacheValidity. - 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
MergedDictionariesto organize large resource sets without bloating a single file.
Startup Optimization
- Minimize work in
Appconstructor andMainPageconstructor. - Defer non-essential service registration — use lazy initialization where possible.
- Reduce the number of XAML pages parsed at startup (use
Shellrouting for deferred loading). - Remove unused
Handlers/Effectsregistrations fromMauiProgram.cs. - On Android, ensure
AndroidManifest.xmldoesn't force unnecessary permissions checks at launch.
Trimming
Enable IL trimming to reduce app size and remove unused code:
true
full
- 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.
true
true
- Audit third-party NuGet packages for trimming/AOT compatibility.
- Use
[JsonSerializable]source generators instead of reflection-based JSON serialization. - Run
dotnet publishwith AOT to verify no warnings before shipping.
Quick Checklist
- ✅
x:DataTypeon all pages, templates, and data-bound views - ✅ No nested single-child layouts
- ✅ Grid preferred over nested StackLayouts
- ✅ Images sized to display, caching enabled
- ✅
ItemSizingStrategy="MeasureFirstItem"on uniform CollectionViews - ✅ Startup work minimized and deferred
- ✅ Trimming enabled and tested
- ✅ Profile with dotnet-trace before and after changes
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: davidortinau
- Source: davidortinau/maui-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.