maui-platform-invoke

maui-platform-invoke is a skill for Claude Code, Codex from dotnet/maui-labs. It costs 67 tokens per session (1,135 once invoked), scanned A, original, MIT.

A guide for connecting a .NET MAUI app to operating-system features that MAUI does not already provide. It uses shared service interfaces with separate Android, iOS, or Windows implementations where needed.

In plain words
What is it for?
Use it to add camera or app-review services, request permissions, configure Android manifests or Apple entitlements, and respond to platform lifecycle events.
Why use it?
It prevents native API calls and permission handling from being scattered throughout the app. It also clarifies where to place permissions, lifecycle hooks, and platform-specific files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add camera or app-review services, request permissions, configure Android manifests or Apple entitlements, and respond to platform lifecycle events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dotnet/maui-labs/maui-platform-invoke
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.

Any agent
npx skills add dotnet/maui-labs --skill maui-platform-invoke
Clone the repo
git clone --depth 1 https://github.com/dotnet/maui-labs

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-platform-invoke

README.md
[![agentmods](https://agentmods.dev/badge/skills/dotnet/maui-labs/maui-platform-invoke/github.svg)](https://agentmods.dev/skills/dotnet/maui-labs/maui-platform-invoke)
Your own site
<a href="https://agentmods.dev/skills/dotnet/maui-labs/maui-platform-invoke"><img src="https://agentmods.dev/badge/skills/dotnet/maui-labs/maui-platform-invoke/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for maui-platform-invoke

Your own site · 80×15
<a href="https://agentmods.dev/skills/dotnet/maui-labs/maui-platform-invoke"><img src="https://agentmods.dev/badge/skills/dotnet/maui-labs/maui-platform-invoke.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 4
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 18
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 90
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 144
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found 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.1 $0.00067 $0.01135
Opus 5 $0.00034 $0.00567
Sonnet 5 $0.00013 $0.00227
Haiku 4.5 $0.00007 $0.00113

Measured 5d ago against content hash 511273dd1f4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

maui-platform-invoke 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 5d 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.

plugins/dotnet-maui/skills/maui-platform-invoke/SKILL.md · 149 lines

How it starts

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

MAUI Platform Invoke

Use this skill when a MAUI app needs platform APIs that are not already exposed by a cross-platform MAUI API. Prefer small, testable abstractions over scattered #if blocks.

Response Checklist

  • Define a DI abstraction first (for example IAppReviewService) and inject it into app services or view models.
  • Mention required permission flow and platform metadata files (AndroidManifest.xml, Info.plist, capabilities/entitlements).
  • Put lifecycle guidance in ConfigureLifecycleEvents (AddAndroid, AddiOS, AddWindows) instead of page constructors.

Choose the Right Extension Point

Need Prefer
Existing cross-platform Essentials API covers it Microsoft.Maui.ApplicationModel, Devices, Storage, etc.
Non-visual platform API or OS service DI interface with per-platform implementation
Native view/control behavior Handler mapper or custom handler
Platform lifecycle callback ConfigureLifecycleEvents
Third-party SDK with many native types Slim binding plus a narrow app service
One small compile-time constant #if or OnPlatform

Platform Service Pattern

  1. Define an interface in shared code:

    public interface IAppReviewService
    {
        Task RequestReviewAsync(CancellationToken cancellationToken = default);
    }
    
  2. Implement it per platform using target-specific files:

    // Platforms/Android/AppReviewService.android.cs
    public sealed class AppReviewService : IAppReviewService
    {
        public Task RequestReviewAsync(CancellationToken cancellationToken = default)
        {
            // Call Android APIs or a bound SDK here.
            return Task.CompletedTask;
        }
    }
    
  3. Register only the platforms that have implementations in MauiProgram.cs:

    #if ANDROID
    builder.Services.AddSingleton<IAppReviewService, AppReviewService>();
    #endif
    

    When adding iOS, Mac Catalyst, Windows, or MAUI Labs AppKit support, add the matching platform implementation file first and then extend the guard, for example #if IOS || MACCATALYST or #if MACOS.

Read the full file on GitHub · 149 lines

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. 5d ago Changed · -34 tokens per session 511273dd1f4a
  2. 9d ago First seen · 149 lines · 101 tokens per session scan A 2eb9254fc675

Subscribe to this mod's changes

maui-platform-invoke is a skill published in the GitHub repository dotnet/maui-labs (213 stars, last pushed today), licensed MIT. It adds 67 tokens to every session and 1,135 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

argent-device-interact

Interact with an iOS simulator, Android emulator, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures, scrolling/swiping, typing text, pressing hardware buttons, launching apps, opening URLs, taking screenshots, waiting for an element to appear or disappear, or checking…

software-mansion/argent · 73 tokens

argent-metro-debugger

Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…

software-mansion/argent · 104 tokens

argent-settings-permissions

Grant, deny, or reset an app's runtime permissions (camera, microphone, photos, contacts, notifications, calendar, location, location-always, media-library, motion, reminders) on an iOS simulator or Android device using the argent settings-permissions tool - without navigating the system Settings UI. Use when the…

software-mansion/argent · 140 tokens

argent-react-native-optimization

Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.

software-mansion/argent · 71 tokens

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

argent-react-native-profiler

Profile a React Native Hermes app to measure re-render and CPU performance using argent profiler tools. Use when optimizing for performance, measuring before/after a fix, spotting slow components, diagnosing re-renders, checking CPU hotspots, or producing a ranked issue report.

software-mansion/argent · 57 tokens