maui-platform-apis

Provides cross-platform patterns and best practices for using device capabilities in .NET MAUI apps.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "maui-platform-apis" with this command: npx skills add rimblehelm/.net-maui-skills/rimblehelm-net-maui-skills-maui-platform-apis

.NET MAUI — Platform APIs Skill

Purpose

This skill provides agents with best practices, patterns, and cross-platform abstractions for using device capabilities in .NET MAUI applications. It covers permissions, sensors, file pickers, geolocation, camera access, notifications, and platform-specific APIs.

The goal is to ensure that all platform API usage is safe, consistent, and aligned with MAUI’s cross-platform architecture.

Core Principles

  1. Permission-first design Always request and check permissions before accessing device capabilities.
  2. Cross-platform abstractions Use MAUI Essentials APIs whenever possible.
  3. Graceful degradation If a capability is unavailable on a platform, handle it cleanly.
  4. Separation of concerns Wrap platform API calls in services and interfaces.
  5. User transparency Provide clear explanations when requesting permissions.

Supported Platform Capabilities

  • Geolocation
  • Camera & Media Picker
  • File Picker
  • Clipboard
  • Vibration
  • Flashlight
  • Connectivity
  • Sensors (accelerometer, compass, gyroscope)
  • Notifications (local)
  • Permissions

Recommended Folder Structure

Services
└─ Platform
   ├─ Implementations
   └─ Interfaces

Agent Usage Guidelines

  • When generating code that uses device capabilities:
    • Always check permissions first.
    • Use Permissions.RequestAsync<T>().
    • Use MAUI Essentials APIs (e.g., Geolocation, MediaPicker).
    • Wrap logic in a service (e.g., IGeolocationService).
  • When asked to “access the camera,” generate:
    • A service abstraction
    • A platform-safe implementation
    • Permission checks
  • When asked to “get the user’s location,” apply:
    • Permission checks
    • Fallback handling
    • Cancellation tokens

Out of Scope

  • Authentication (covered in maui-authentication)
  • UI layout (covered in maui-ui-best-practices)
  • Database storage (covered in maui-data-storage)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

maui-ui-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

maui-project-setup

No summary provided by upstream source.

Repository SourceNeeds Review
General

maui-performance-optimization

No summary provided by upstream source.

Repository SourceNeeds Review
General

maui-data-storage

No summary provided by upstream source.

Repository SourceNeeds Review