Agent skill

Maui Media Picker

by davidortinau in davidortinau/maui-skills

Guidance for picking photos/videos, capturing from camera, multi-select (.NET 10), MediaPickerOptions, platform permissions, and FileResult handling in .NET MAUI.

MITAuto-check passedMobile

Install Maui Media Picker

skills CLI
$ npx skills add davidortinau/maui-skills --skill maui-media-picker -a claude-code

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

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

At a glance

Guidance for picking photos/videos, capturing from camera, multi-select (.NET 10), MediaPickerOptions, platform permissions, and FileResult handling in .NET MAUI.

  • Works in 4 steps: Forgetting to check for cancellation → Calling from a background thread → Not checking IsCaptureSupported → …
  • Multi-select photos
  • SKILL.md covers Common Mistakes, Platform Pitfalls, Decision Framework and Checklist
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Maui Media Picker is an agent skill from davidortinau/maui-skills. Guidance for picking photos/videos, capturing from camera, multi-select (.NET 10), MediaPickerOptions, platform permissions, and FileResult handling in .NET MAUI. USE FOR: "pick photo", "capture photo", "take picture", "pick video", "camera capture", "MediaPicker", "photo gallery", "image picker", "multi-select photos", "MediaPickerOptions". DO NOT USE FOR: general file picking (use maui-file-handling), image display or optimization (use maui-performance), or camera streaming (use maui-platform-invoke).

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

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

When your agent uses it

  • Multi-select photos
  • MediaPickerOptions
  • : general file picking (use maui-file-handling)
  • Optimization (use maui-performance)

Example prompts

  • “pick photo”
  • “capture photo”
  • “take picture”
  • “/maui-media-picker”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Forgetting to check for cancellation
  2. Calling from a background thread
  3. Not checking IsCaptureSupported
  4. Not disposing streams

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 csharp).

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

  • Network

    No URLs in SKILL.md.

    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

Maui Media Picker loads about 1.1k tokens when it runs, and up to ~2.1k if it reads all its reference files. Until then it costs about 132 tokens; SKILL.md has 273 words of instructions outside code blocks.

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

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). 273 words, ~1,061 tokens.

Download SKILL.mdSave it as .claude/skills/maui-media-picker/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
maui-media-picker
description
Guidance for picking photos/videos, capturing from camera, multi-select (.NET 10), MediaPickerOptions, platform permissions, and FileResult handling in .NET MAUI. USE FOR: "pick photo", "capture photo", "take picture", "pick video", "camera capture", "MediaPicker", "photo gallery", "image picker", "multi-select photos", "MediaPickerOptions". DO NOT USE FOR: general file picking (use maui-file-handling), image display or optimization (use maui-performance), or camera streaming (use maui-platform-invoke).

.NET MAUI Media Picker — Gotchas & Best Practices

Common Mistakes

1. Forgetting to check for cancellation

Single-select returns null, multi-select returns an empty list. Not checking causes NullReferenceException.

csharp
// ❌ Crashes when user cancels
var photo = await MediaPicker.Default.PickPhotoAsync();
using var stream = await photo.OpenReadAsync();

// ✅ Always check for null / empty
var photo = await MediaPicker.Default.PickPhotoAsync();
if (photo is null) return;
using var stream = await photo.OpenReadAsync();
2. Calling from a background thread

All MediaPicker methods must run on the UI thread or they throw.

csharp
// ❌ Will throw on some platforms
await Task.Run(async () => await MediaPicker.Default.PickPhotoAsync());

// ✅ Call directly from a command or event handler on the UI thread
var photo = await MediaPicker.Default.PickPhotoAsync();
3. Not checking IsCaptureSupported

Devices without cameras (emulators, some tablets) will throw if you call capture methods.

csharp
// ❌ Crashes on devices without a camera
var photo = await MediaPicker.Default.CapturePhotoAsync();

// ✅ Guard with capability check
if (MediaPicker.Default.IsCaptureSupported)
{
    var photo = await MediaPicker.Default.CapturePhotoAsync();
}
4. Not disposing streams

OpenReadAsync() returns a stream that must be disposed.

csharp
// ❌ Leaks the stream
var stream = await photo.OpenReadAsync();
var bytes = ReadAllBytes(stream);

// ✅ Dispose with using
using var stream = await photo.OpenReadAsync();

Platform Pitfalls

⚠️ SelectionLimit is not enforced on Android/Windows

MediaPickerOptions.SelectionLimit is advisory. Always validate the count yourself:

csharp
var options = new MediaPickerOptions { SelectionLimit = 5 };
var results = await MediaPicker.Default.PickPhotosAsync(options);
if (results.Count() > 5)
{
    // Warn user or take only the first 5
    results = results.Take(5);
}
⚠️ Android storage permissions split at API 33
  • API ≤ 32: needs READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE
  • API ≥ 33: needs READ_MEDIA_IMAGES / READ_MEDIA_VIDEO (broad storage permissions are ignored)
  • Use android:maxSdkVersion="32" on the old permissions to avoid Play Store warnings
⚠️ iOS requires all four plist keys for full functionality

Missing any one of NSCameraUsageDescription, NSMicrophoneUsageDescription, NSPhotoLibraryUsageDescription, or NSPhotoLibraryAddUsageDescription causes a runtime crash when that feature is accessed.

⚠️ Android requires <queries> for camera intents

Without the IMAGE_CAPTURE query in AndroidManifest.xml, CapturePhotoAsync may fail silently on Android 11+ due to package visibility restrictions.

Decision Framework

ScenarioMethod
User picks one photoPickPhotoAsync()
User picks multiple (.NET 10+)PickPhotosAsync() with SelectionLimit
App needs camera captureCheck IsCaptureSupported → CapturePhotoAsync()
Save picked file permanentlyCopy stream to FileSystem.AppDataDirectory
Need photo metadataSet PreserveMetaData = true in MediaPickerOptions

Checklist

  • All picker calls run on the UI thread
  • Null/empty checks after every pick/capture call
  • IsCaptureSupported guard before capture methods
  • Streams disposed with using
  • Android manifest has both old and new storage permissions with maxSdkVersion
  • Android manifest has <queries> block for camera intent
  • iOS Info.plist has all four usage description keys
  • SelectionLimit validated in code, not trusted from platform

© 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/maui-media-picker of davidortinau/maui-skills.

  • SKILL.md
  • references/media-picker-api.md

Open the folder on GitHubat commit 79bb4bf

Compare with similar skills

Maui Media Picker 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.

Maui Media Picker compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Maui Media Picker this skilldavidortinau/maui-skills175—~1.1kAutomated safety check: PassMIT
Maui AI DebuggingRedth/Maui.Gtk101—~4.1kAutomated safety check: PassMIT
.NET MAUI Doctordotnet/skills5.6k1 repos~2.4kAutomated safety check: PassMIT
Maui Safe Areadotnet/skills5.6k1 repos~3.2kAutomated 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
  • .NET MAUI Doctor

    dotnet/skills

    Official

    Diagnoses and fixes .NET MAUI development environments by checking the .NET SDK, workloads, JDK, Android SDK, Xcode and Windows SDK against requirements read from NuGet.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    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
  • 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 yesterday
    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 yesterday
    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).

    180k 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 Maui Media Picker

What does Maui Media Picker do?

Guidance for picking photos/videos, capturing from camera, multi-select (.NET 10), MediaPickerOptions, platform permissions, and FileResult handling in .NET MAUI. Maui Media Picker is an agent skill from davidortinau/maui-skills.NET MAUI.

When should I use Maui Media Picker?

Maui Media Picker fits situations like: multi-select photos; mediaPickerOptions; : general file picking (use maui-file-handling); optimization (use maui-performance).

How do I install Maui Media Picker in Claude Code?

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

How do I install Maui Media Picker in Codex?

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

Can I use Maui Media Picker 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 maui-media-picker -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/maui-media-picker, .gemini/skills/maui-media-picker, .github/skills/maui-media-picker and .opencode/skills/maui-media-picker in your project.

What does Maui Media Picker need to run?

SKILL.md names no scripts, command-line tools or credentials: Maui Media Picker is instructions for the agent only.

Does Maui Media Picker access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Maui Media Picker 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 Maui Media Picker use?

Maui Media Picker 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 Maui Media Picker use?

About 1.1k tokens (SKILL.md is roughly 4.2k 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 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Maui Media Picker?

Skills that share tags, products or a category with Maui Media Picker: Maui AI Debugging (Redth/Maui.Gtk, 101 stars), .NET MAUI Doctor (dotnet/skills, 5.6k stars), Maui Safe Area (dotnet/skills, 5.6k 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 Maui Media Picker?

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.