maui-safe-area

maui-safe-area is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 188 tokens per session (3,192 once invoked), scanned A, a copy of maui-safe-area, MIT.

A guide to controlling safe areas and edge-to-edge layouts in .NET MAUI apps using .NET 10. Safe areas keep content clear of notches, status bars, home indicators, and similar system UI.

In plain words
What is it for?
Use it to set safe-area behavior per edge or control, build immersive layouts, avoid the keyboard, migrate older iOS settings, or coordinate safe areas in Blazor Hybrid apps.
Why use it?
It helps prevent content from being hidden or overlapped when layouts reach the edges of a device screen or when the keyboard opens.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/managedcode/dotnet-skills/maui-safe-area
Any agent
npx skills add managedcode/dotnet-skills --skill maui-safe-area
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for maui-safe-area

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/maui-safe-area.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/maui-safe-area)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/maui-safe-area"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/maui-safe-area.svg" alt="Measured on agentmods" height="20"></a>
Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,192 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00188 $0.03192
Opus 5 $0.00094 $0.01596
Sonnet 5 $0.00038 $0.00638
Haiku 4.5 $0.00019 $0.00319

Measured 4d ago against content hash 1eb72dc8bf70, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

maui-safe-area scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to maui-safe-area — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

catalog/Frameworks/Official-DotNet-MAUI/skills/maui-safe-area/SKILL.md · 331 lines

How it starts

The opening of the file, as written. The whole thing — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Safe Area & Edge-to-Edge Layout (.NET 10+)

.NET 10 introduces a brand-new, cross-platform safe area API that replaces the legacy iOS-only UseSafeArea and the layout-level IgnoreSafeArea properties. The new SafeAreaEdges property and SafeAreaRegions flags enum give you per-edge, per-control safe area management on Android, iOS, and Mac Catalyst from a single API surface.

This is new API surface in .NET 10. If the project targets .NET 9 or earlier, these APIs do not exist. Guide the developer to the legacy ios:Page.UseSafeArea and Layout.IgnoreSafeArea properties instead.

When to Use

  • Content overlaps status bar, notch, Dynamic Island, or home indicator after upgrading to .NET 10
  • Implementing edge-to-edge / immersive layouts (photo viewers, video players, maps)
  • Keyboard avoidance for chat or form UIs
  • Migrating from ios:Page.UseSafeArea, Layout.IgnoreSafeArea, or WindowSoftInputModeAdjust.Resize
  • Blazor Hybrid apps that need CSS env(safe-area-inset-*) coordination
  • Mixed layouts with an edge-to-edge header but a safe-area-respecting body

When Not to Use

  • Projects targeting .NET 9 or earlier — use the legacy iOS-specific APIs
  • General page layout questions unrelated to system bars or keyboard — use standard layout guidance
  • App lifecycle or navigation structure — use maui-app-lifecycle or Shell guidance
  • Theming or visual styling — use the maui-theming skill

Inputs

  • Target framework: must be net10.0-* or later for the new APIs
  • Target platforms: Android, iOS, Mac Catalyst (Windows does not have system bar insets)
  • UI approach: XAML/C#, Blazor Hybrid, or MauiReactor

SafeAreaRegions Enum

[Flags]
public enum SafeAreaRegions
{
    None      = 0,       // Edge-to-edge — no safe area padding
    SoftInput = 1 << 0,  // Pad to avoid the on-screen keyboard
    Container = 1 << 1,  // Stay inside status bar, notch, home indicator
    Default   = -1,      // Use the platform default for the control type
    All       = 1 << 15  // Respect all safe area insets (most restrictive)
}

Read the full file on GitHub · 331 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 331 lines · 188 tokens per session scan A 1eb72dc8bf70

Subscribe to this mod's changes

maui-safe-area is a skill published in the GitHub repository managedcode/dotnet-skills (477 stars, last pushed 3d ago), licensed MIT. It adds 188 tokens to every session and 3,192 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to maui-safe-area, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

adapt

Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.

fengshao1227/ccg-workflow · 51 tokens

maui-aspire-client

Connect MAUI apps to Aspire-hosted APIs. USE FOR: AddServiceDiscovery, typed HttpClient, https+http://apiservice, missing AppHost config on devices, Android emulator 10.0.2.2, iOS simulator localhost, physical-device LAN/dev-tunnel fallbacks, dev certs, Bearer handlers, debug-only cleartext. DO NOT USE FOR: offline…

dotnet/maui-labs · 100 tokens

generate-microcks-openapi-samples

Use when creating OpenAPI mock examples for Microcks, setting up request/response routing with dispatchers, or mapping request fields to mock responses.

SebastienDegodez/copilot-instructions · 37 tokens

spring-boot-scaffold

Scaffold et nytt Spring Boot Kotlin-prosjekt med Nais-konfigurasjon, Flyway og standard Nav-mønstre.

navikt/copilot · 32 tokens

fuzzy-selecting

Use when choosing interactively from search results, files, processes, or any command output with preview capabilities.

SebastienDegodez/copilot-instructions · 25 tokens

react-native-expert

Senior React Native and Expo engineer for building production-ready cross-platform mobile apps. Use when building React Native components, implementing navigation with Expo Router, optimizing list and scroll performance, working with animations via Reanimated, handling platform-specific code (iOS/Android), integrating…

tech-leads-club/agent-skills · 127 tokens