Agents & OrchestrationSûr100100/100
Maui Current Apis (.NET)
Keep MAUI guidance target-framework-safe. USE FOR: checking TFM, net8 vs net10 API choices, `SafeAreaEdges`, replacing `Application.Current.MainPage`, Xamarin.Forms namespaces, Shell/window APIs, avoiding .NET 10-only APIs on older targets. DO NOT USE FOR: workload discovery, runtime inspection, migration planning.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs maui-current-apis__dotnet-maui-labs__plugins-dotnet-maui-skills-c6efdfd0529d.NET
dotnet/maui-labs
Contenu à copier
---
name: maui-current-apis
description: >-
Keep MAUI guidance target-framework-safe. USE FOR: checking TFM, net8 vs net10 API choices, `SafeAreaEdges`, replacing `Application.Current.MainPage`, Xamarin.Forms namespaces, Shell/window APIs, avoiding .NET 10-only APIs on older targets. DO NOT USE FOR: workload discovery, runtime inspection, migration planning.
metadata:
origin: .NET
---
# MAUI Current APIs
Use this skill before changing MAUI app code when API currency matters. The goal
is to inspect the project target first, then select APIs that match that target
instead of generating stale Xamarin.Forms or early MAUI patterns.
## Workflow
1. Inspect the target frameworks and package versions before recommending APIs:
```bash
grep -R -n --include="*.csproj" --include="Directory.Build.props" "<TargetFramework" . 2>/dev/null
grep -R -n --include="*.csproj" --include="Directory.Build.props" --include="Directory.Packages.props" \
"Microsoft.Maui.Controls\\|UseMaui\\|MauiVersion" . 2>/dev/null
```
2. Identify whether the project targets .NET 8, .NET 9, .NET 10, or multiple
versions. Do not assume `net10.0`.
3. Prefer APIs from `Microsoft.Maui.*` namespaces. Do not add `Xamarin.Forms` or
`Xamarin.Essentials` namespaces to MAUI projects.
4. If replacing an obsolete API, explain the replacement and why it matches the
detected target.
5. Keep platform-specific code behind `#if ANDROID`, `#if IOS`, `#if
MACCATALYST`, `#if WINDOWS`, or an injected platform service.
6. Build the changed project for the relevant target framework.
## Common Agent Traps
| Avoid | Prefer |
| --- | --- |
| `using Xamarin.Forms;` | `using Microsoft.Maui.Controls;` |
| `using Xamarin.Essentials;` | `using Microsoft.Maui.ApplicationModel`, `Microsoft.Maui.Devices`, `Microsoft.Maui.Storage`, or the specific MAUI namespace |
| `Device.BeginInvokeOnMainThread(...)` | `MainThread.BeginInvokeOnMainThread(...)` |
| `Device.StartTimer(...)` | `Dispatcher.StartTimer(...)` or `IDispatcherTimer` |
| `Device.RuntimePlatform` for platform behavior | `DeviceInfo.Platform`, `OnPlatform`, or compile-time platform services |
| `MessagingCenter` for new app architecture | `WeakReferenceMessenger`, events, interfaces, or another explicit messaging abstraction |
| Old Xamarin.Forms custom renderers for new code | MAUI handlers, property mappers, or platform services |
| Hard-coded safe area padding | `SafeAreaEdges` / safe area APIs for the detected MAUI version |
| Coordinate-based UI automation | Stable `AutomationId` plus DevFlow queries |
| `Application.Current.MainPage = ...` for routine navigation | Shell navigation with registered routes, or set `Window.Page` explicitly for intentional app reset flows |
## Safe Area Guidance
For .NET 10+ safe area work, prefer `SafeAreaEdges` over legacy iOS-only safe
area patterns. Confirm the target framework before changing safe area code:
```xml
<Grid SafeAreaEdges="Container">
...
</Grid>
```
Use platform-specific fallbacks only when the app targets an older MAUI version
where the newer API is unavailable.
## Window and Shell Guidance
- In multi-window code, do not blindly rely on a global main page. Use the
current `Window`, `Shell.Current`, or an injected navigation abstraction that
matches the app's architecture.
- For Shell apps, use registered routes and `GoToAsync` instead of manually
replacing root pages unless the app intentionally owns the full window flow.
- For navigation parameters, prefer `IQueryAttributable` or `[QueryProperty]`
and URL-encode route values when building URI strings.
## Validation Checklist
- The edited project target framework was inspected.
- No `Xamarin.Forms` or `Xamarin.Essentials` namespace was introduced.
- Replacements are compatible with the detected MAUI version.
- Platform-specific code is isolated behind target-specific files, partial
classes, DI abstractions, or `#if` guards.
- The changed target framework builds.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Maui Current Apis (.NET)
In multi-window code, do not blindly rely on a global main page. Use the
For Shell apps, use registered routes and `GoToAsync` instead of manually
For navigation parameters, prefer `IQueryAttributable` or `[QueryProperty]`
The edited project target framework was inspected.
Comment utiliser Maui Current Apis (.NET)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Maui Current Apis (.NET)
Dis simplement à ton agent quelque chose comme :
Applique le skill maui-current-apis__dotnet-maui-labs__plugins-dotnet-maui-skills-c6efdfd0529d à cette tâche
Utilise maui-current-apis__dotnet-maui-labs__plugins-dotnet-maui-skills-c6efdfd0529d pour améliorer cette implémentation
Passe en revue ce sujet avec maui-current-apis__dotnet-maui-labs__plugins-dotnet-maui-skills-c6efdfd0529d
Skills liés à Maui Current Apis (.NET)
Acceleration (Microsoft)
Compare synthetic acceleration options and clearly separate scenario value from forecast commitments.Account Overview (Microsoft)
Create a synthetic Acme account overview and identify evidence that merits seller attention.Acroform Writer (Microsoft)
Use this skill whenever the user wants values written INTO an existing PDF form that lives in the connected SharePoint knowledge source — filling out, completing, populating, or submitting a fillable PDF (application, intake sheet, contract, government form) from data they supply, a spreadsheet row, or the conversation. Triggers include "fill out the job application form", "complete the intake form for [person]", "populate our standard NDA template", and "make this ready to send / non-editable" (flatten). The source form should be found via knowledge search; only ask the user to upload it if knowledge search turns up nothing plausible. different task), and do NOT use it on scanned/image-only PDFs that have no real fillable fields — those need OCR or manual overlay instead, which this skill explicitly detects and reports rather than silently failing.