Agent skill

Xamarin Forms Migration

by davidortinau in davidortinau/maui-skills

WORKFLOW SKILL - Guide for migrating Xamarin.Forms apps to .NET MAUI.

MITAuto-check passedMobile

Install Xamarin Forms Migration

skills CLI
$ npx skills add davidortinau/maui-skills --skill xamarin-forms-migration -a claude-code

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

GitHub CLI
$ gh skill install davidortinau/maui-skills xamarin-forms-migration --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/xamarin-forms-migration .claude/skills/xamarin-forms-migration && 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
xamarin-forms-migration
GitHub stars
175
Token cost
~1.8k tokens
SKILL.md length
621 words
Files
2 (incl. references)
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

WORKFLOW SKILL - Guide for migrating Xamarin.Forms apps to .NET MAUI.

  • Works in 11 steps: Create new .NET MAUI project… → Copy cross-platform code + platform code… → Update namespaces (XAML + C# +… → …
  • : migrate Xamarin.Forms
  • SKILL.md covers Migration Workflow, Critical Layout Pitfalls, Renderer → Handler Migration and Effects → Behaviors, plus 6 more sections
  • Reaches schemas.microsoft.com

What it does

Xamarin Forms Migration is an agent skill from davidortinau/maui-skills. WORKFLOW SKILL - Guide for migrating Xamarin.Forms apps to .NET MAUI. Covers project structure decisions, SDK-style project conversion, namespace renames, layout behavior changes, renderer-to-handler migration, effects-to-behaviors redesign, Xamarin.Essentials namespace mapping, NuGet dependency compatibility, data migration, and common troubleshooting. Incorporates field-tested advice from production migrations. USE FOR: "migrate Xamarin.Forms", "upgrade to MAUI", "Xamarin to MAUI", "convert Xamarin.Forms…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/forms-migration-api.md`).

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

When your agent uses it

  • : migrate Xamarin.Forms
  • Upgrade to MAUI
  • Xamarin to MAUI
  • Convert Xamarin.Forms project

Example prompts

  • “migrate Xamarin.Forms”
  • “upgrade to MAUI”
  • “Xamarin to MAUI”
  • “/xamarin-forms-migration”

Workflow steps

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

  1. Create new .NET MAUI project (single-project — multi-project causes AOT/build errors)
  2. Copy cross-platform code + platform code into Platforms//
  3. Update namespaces (XAML + C# + Essentials — see references/forms-migration-api.md)
  4. Fix layout behavior changes (see below)
  5. Migrate renderers → handlers (not shimmed renderers)
  6. Migrate effects → behaviors
  7. Remove Microsoft.Maui.Controls.Compatibility package
  8. Update NuGet dependencies
  9. Migrate app data stores
  10. Delete bin//obj//Resource.designer.cs, build, test iteratively
  11. Verify against .NET 10 deprecated API list

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are xml and csharp).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • schemas.microsoft.com

    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

Xamarin Forms Migration loads about 1.8k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 247 tokens; SKILL.md has 621 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~247
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

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). 621 words, ~1,817 tokens.

Download SKILL.mdSave it as .claude/skills/xamarin-forms-migration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
xamarin-forms-migration
description
**WORKFLOW SKILL** - Guide for migrating Xamarin.Forms apps to .NET MAUI. Covers project structure decisions, SDK-style project conversion, namespace renames, layout behavior changes, renderer-to-handler migration, effects-to-behaviors redesign, Xamarin.Essentials namespace mapping, NuGet dependency compatibility, data migration, and common troubleshooting. Incorporates field-tested advice from production migrations. USE FOR: "migrate Xamarin.Forms", "upgrade to MAUI", "Xamarin to MAUI", "convert Xamarin.Forms project", "Forms migration", "namespace changes Xamarin", "renderer to handler", "effects to behaviors", "AndExpand replacement", "layout changes MAUI", "Xamarin.Essentials to MAUI". DO NOT USE FOR: migrating Xamarin.Android native apps (use xamarin-android-migration), migrating Xamarin.iOS native apps (use xamarin-ios-migration), creating new MAUI handlers from scratch (use maui-custom-handlers), performance optimization (use maui-performance).

Xamarin.Forms → .NET MAUI Migration

For project templates, namespace tables, API deprecation tables, and reference code, see references/forms-migration-api.md.

⚠️ Do not use the .NET Upgrade Assistant. Apply namespace renames, project file updates, and package replacements directly. Build after each batch of changes and use compiler errors to guide the next round of fixes.

Migration Workflow

  1. Create new .NET MAUI project (single-project — multi-project causes AOT/build errors)
  2. Copy cross-platform code + platform code into Platforms/<platform>/
  3. Update namespaces (XAML + C# + Essentials — see references/forms-migration-api.md)
  4. Fix layout behavior changes (see below)
  5. Migrate renderers → handlers (not shimmed renderers)
  6. Migrate effects → behaviors
  7. Remove Microsoft.Maui.Controls.Compatibility package
  8. Update NuGet dependencies
  9. Migrate app data stores
  10. Delete bin//obj//Resource.designer.cs, build, test iteratively
  11. Verify against .NET 10 deprecated API list

Strategy: Create a new project and copy code into it — don't edit the existing project file in place.

Critical Layout Pitfalls

⚠️ Default Spacing Changed to Zero

MAUI zeroes out spacing that Xamarin.Forms set to 6. Your layouts will break silently:

xml
<!-- ❌ Looks fine in Xamarin.Forms, cramped in MAUI -->
<Grid>...</Grid>
<StackLayout>...</StackLayout>

<!-- ✅ Add explicit values or restore via implicit styles in App.xaml -->
<Style TargetType="Grid">
    <Setter Property="ColumnSpacing" Value="6"/>
    <Setter Property="RowSpacing" Value="6"/>
</Style>

Field advice: Specify all layout values explicitly — don't rely on platform defaults.

⚠️ *AndExpand Is Obsolete — No Silent Warning
xml
<!-- ❌ Silently ignored in MAUI — image won't expand -->
<StackLayout>
    <Label Text="Hello world!"/>
    <Image VerticalOptions="FillAndExpand" Source="dotnetbot.png"/>
</StackLayout>

<!-- ✅ Convert to Grid with star sizing -->
<Grid RowDefinitions="Auto, *">
    <Label Text="Hello world!"/>
    <Image Grid.Row="1" Source="dotnetbot.png"/>
</Grid>

Field advice: Flatten layout trees. Replace nested hierarchies with single Grid layouts.

⚠️ ScrollView in StackLayout Doesn't Scroll

ScrollView inside StackLayout expands to full content height (no scroll). Place ScrollView in a Grid with a constrained row instead.

Other Layout Traps
IssueFix
Grid columns/rows not declared → layout brokenAlways add explicit ColumnDefinitions/RowDefinitions
Frame measures differentlyMigrate to Border with StrokeShape
BoxView invisible (default 0×0 in MAUI)Set explicit WidthRequest/HeightRequest
RelativeLayoutReplace with Grid (compatibility namespace only)

Renderer → Handler Migration

⚠️ Migrate all renderers to handlers. Do NOT use shimmed renderers — they create parent wrapper views that hurt performance.

Preferred: Customize existing handlers with mapper methods:

csharp
// ✅ Extend existing handler — no new class needed
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoBorder", (handler, view) =>
{
#if ANDROID
    handler.PlatformView.Background = null;
#elif IOS || MACCATALYST
    handler.PlatformView.BorderStyle = UIKit.UITextBorderStyle.None;
#endif
});

For completely new native views, create a full handler (see maui-custom-handlers skill).

Effects → Behaviors

⚠️ Effects are now Behaviors — this requires redesign, not just renaming.

For new development, prefer behaviors or handler mapper customizations over effects.

⚠️ Do NOT Use the Compatibility Package

Microsoft.Maui.Controls.Compatibility causes cascading incompatibilities. Remove it and rebuild layouts natively.

Retired Dependencies

  • App Center is retired → Replace with Sentry, Azure Monitor, or similar
  • Visual Studio for Mac is retired → Use VS Code or Rider
Show full SKILL.md (259 more words)Show less

Android-Specific Warnings

  • Android migration is significantly harder than iOS — expect more UI bugs
  • OEM-specific rendering differences not reproducible on emulators — test on physical devices
  • Shadow rendering varies across OEMs/API levels — implement in platform-specific handler code
  • Handler-level property changes don't auto-update on theme switch — manually handle theme changes

.NET 10 API Currency Warning

Migration is the perfect time to skip deprecated APIs entirely. Don't migrate Xamarin.Forms code to a MAUI API that's already on its way out. See the full deprecated API table in references/forms-migration-api.md and run the maui-current-apis skill.

Common Troubleshooting

IssueFix
Xamarin.* namespace doesn't existUpdate to Microsoft.Maui.* equivalent
CollectionView doesn't scrollPlace in Grid (not StackLayout) to constrain size
Pop-up under page on iOSUse DisplayAlert from the ContentPage
Missing padding/margin/spacingAdd explicit values or implicit styles
Custom renderer brokenMigrate to handler
SkiaSharp brokenUpdate to SkiaSharp.Views.Maui package
Can't access App.Properties dataMigrate to Preferences

Quick Checklist

  1. ☐ Created new .NET MAUI project (single-project)
  2. ☐ Copied cross-platform and platform code
  3. ☐ Updated XAML namespace to http://schemas.microsoft.com/dotnet/2021/maui
  4. ☐ Replaced Xamarin.Forms.* → Microsoft.Maui.* namespaces
  5. ☐ Replaced Xamarin.Essentials → split MAUI namespaces
  6. ☐ Added explicit Grid ColumnDefinitions/RowDefinitions
  7. ☐ Replaced *AndExpand with Grid layouts
  8. ☐ Added explicit spacing/padding values (MAUI defaults to 0)
  9. ☐ Migrated renderers to handlers (not shimmed renderers)
  10. ☐ Migrated effects to behaviors or MAUI effects
  11. ☐ Removed Microsoft.Maui.Controls.Compatibility package
  12. ☐ Updated NuGet dependencies for .NET compatibility
  13. ☐ Migrated App.Properties, SecureStorage, VersionTracking data
  14. ☐ Deleted bin/, obj/, and Resource.designer.cs
  15. ☐ Tested on physical Android device
  16. ☐ Profiled performance
  17. ☐ Verified no .NET 10 deprecated APIs (run maui-current-apis skill)

© 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

SKILL.md and 1 other file (references) in plugins/maui-skills/skills/xamarin-forms-migration of davidortinau/maui-skills.

  • SKILL.md
  • references/forms-migration-api.md

Open the folder on GitHubat commit 79bb4bf

Compare with similar skills

Xamarin Forms Migration 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.

Xamarin Forms Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xamarin Forms Migration this skilldavidortinau/maui-skills175—~1.8kAutomated safety check: PassMIT
Maui AI DebuggingRedth/Maui.Gtk101—~4.1kAutomated safety check: PassMIT
Maui Safe Areadotnet/skills5.6k1 repos~3.2kAutomated safety check: PassMIT
Mobile App Debuggingsecondsky/claude-skills227—~513Automated safety check: PassMIT
MAUI Device Test Runnerdotnet/maui23k—~3.3kAutomated safety check: PassMIT
MAUI Integration Test Runnerdotnet/maui23k—~2.1kAutomated safety check: PassMIT

Similar skills

  • Maui AI Debugging

    Redth/Maui.Gtk

    End-to-end workflow for building, deploying, inspecting, and debugging .NET MAUI and MAUI Blazor Hybrid apps as an AI agent.

    101 GitHub stars~4.1k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Maui Safe Area

    dotnet/skills

    Official

    .NET MAUI safe area and edge-to-edge layout guidance for .NET 10+.

    5.6k GitHub starsUsed in 1 repo~3.2k tokens
    MobileAuto-check passed
  • Mobile App Debugging

    secondsky/claude-skills

    Mobile app debugging for iOS, Android, cross-platform frameworks.

    227 GitHub stars~513 tokensUpdated 10 days ago
    MobileAuto-check passed
  • Official

    Builds and runs .NET MAUI device tests locally on iOS simulators, MacCatalyst, Android emulators or Windows, with optional category filtering.

    23k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Builds and packs .NET MAUI, installs the local workloads and runs integration tests for templates, samples and end-to-end scenarios by category.

    23k GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed

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

Works with

Categories

Questions about Xamarin Forms Migration

What does Xamarin Forms Migration do?

WORKFLOW SKILL - Guide for migrating Xamarin.Forms apps to .NET MAUI. Xamarin Forms Migration is an agent skill from davidortinau/maui-skills.NET MAUI.

When should I use Xamarin Forms Migration?

Xamarin Forms Migration fits situations like: : migrate Xamarin.Forms; upgrade to MAUI; xamarin to MAUI; convert Xamarin.Forms project.

How do I install Xamarin Forms Migration in Claude Code?

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

How do I install Xamarin Forms Migration in Codex?

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

Can I use Xamarin Forms Migration 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 xamarin-forms-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xamarin-forms-migration, .gemini/skills/xamarin-forms-migration, .github/skills/xamarin-forms-migration and .opencode/skills/xamarin-forms-migration in your project.

What does Xamarin Forms Migration need to run?

SKILL.md names no scripts, command-line tools or credentials: Xamarin Forms Migration is instructions for the agent only.

Does Xamarin Forms Migration access the network?

SKILL.md names 1 domain. In commands or code: schemas.microsoft.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Xamarin Forms Migration 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 Xamarin Forms Migration use?

Xamarin Forms Migration 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 Xamarin Forms Migration use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Xamarin Forms Migration?

Skills that share tags, products or a category with Xamarin Forms Migration: Maui AI Debugging (Redth/Maui.Gtk, 101 stars), Maui Safe Area (dotnet/skills, 5.6k stars), Mobile App Debugging (secondsky/claude-skills, 227 stars) and MAUI Device Test Runner (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xamarin Forms Migration?

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.