flutter-macos-permission-handler-camera-failure

flutter-macos-permission-handler-camera-failure is a skill for Claude Code, Codex from divinevideo/divine-mobile. It costs 125 tokens per session (1,302 once invoked), scanned A, original, MPL-2.0.

A troubleshooting guide for Flutter macOS apps whose camera or microphone permission checks fail when using the permission_handler plugin. It focuses on cases where the camera view stays as a placeholder or enters an error state.

In plain words
What is it for?
Use it to diagnose camera and microphone permission failures in Flutter macOS apps. It covers permission gates, status checks, platform-channel problems, and missing camera-screen initialization.
Why use it?
It helps identify why permission checks can throw exceptions on macOS even when the same app works on iOS or Android. It connects the visible placeholder or CameraPermissionError state with the failed permission check.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents).

Good fit Use it to diagnose camera and microphone permission failures in Flutter macOS apps. It covers permission gates, status checks, platform-channel problems, and missing camera-screen initialization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/divinevideo/divine-mobile/flutter-macos-permission-handler-camera-failure
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 divinevideo/divine-mobile --skill flutter-macos-permission-handler-camera-failure
Clone the repo
git clone --depth 1 https://github.com/divinevideo/divine-mobile

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 flutter-macos-permission-handler-camera-failure

README.md
[![agentmods](https://agentmods.dev/badge/skills/divinevideo/divine-mobile/flutter-macos-permission-handler-camera-failure.svg)](https://agentmods.dev/skills/divinevideo/divine-mobile/flutter-macos-permission-handler-camera-failure)
Your own site
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/flutter-macos-permission-handler-camera-failure"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/flutter-macos-permission-handler-camera-failure.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,302 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: 1 finding, 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 Excessive Agency · line 52
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00125 $0.01302
Opus 5 $0.00063 $0.00651
Sonnet 5 $0.00025 $0.00260
Haiku 4.5 $0.00013 $0.00130

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

Security

Grade A, and why

flutter-macos-permission-handler-camera-failure 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 8d 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.

.agents/skills/flutter-macos-permission-handler-camera-failure/SKILL.md · 158 lines

How it starts

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

Flutter macOS permission_handler Camera Failure

Problem

Camera/microphone permission checks using the permission_handler Flutter plugin throw exceptions on macOS desktop, causing permission gates to emit error states. The camera screen never renders, but the user sees a placeholder UI with no clear error message.

Context / Trigger Conditions

Use this skill when:

  • Flutter app works on iOS/Android but camera fails on macOS
  • Permission gate shows loading or error state on macOS
  • Logs show CameraPermissionError state being emitted
  • Permission.camera.status or Permission.microphone.status throws exceptions
  • Camera placeholder UI appears but VideoRecorderScreen (or equivalent) never initializes
  • No camera-related logs appear after navigation to camera screen

Key diagnostic pattern:

🔐 CameraPermissionGate initState
🔐 Building with state: CameraPermissionInitial
🔐 Triggering permission refresh
🔐 Permission state changed: CameraPermissionError  <-- This is the tell

Root Cause

The permission_handler plugin uses platform channels that don't work reliably on macOS desktop. When checkCameraStatus() or checkMicrophoneStatus() is called:

  • On iOS/Android: Returns proper permission status
  • On macOS: Throws exception → BLoC catches → Emits error state → Screen blocked

macOS handles camera/microphone permissions at the system level - the first time an app tries to access the camera, macOS shows its own permission dialog.

Solution

Bypass permission_handler on macOS and assume permissions are authorized:

Future<void> _onRefresh(
  CameraPermissionRefresh event,
  Emitter<CameraPermissionState> emit,
) async {
  // On macOS desktop, permission_handler doesn't work reliably.
  // macOS handles camera permissions at the system level when the app
  // actually tries to access the camera, showing its own permission dialog.
  if (!kIsWeb && Platform.isMacOS) {
    emit(const CameraPermissionLoaded(CameraPermissionStatus.authorized));
    return;
  }

  // Normal permission check for iOS/Android
  try {
    final status = await checkPermissions();
    emit(CameraPermissionLoaded(status));
  } catch (e) {
    emit(const CameraPermissionError());
  }
}

Read the full file on GitHub · 158 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. 8d ago First seen · 158 lines · 125 tokens per session scan A 01b18109d65b

Subscribe to this mod's changes

flutter-macos-permission-handler-camera-failure is a skill published in the GitHub repository divinevideo/divine-mobile (265 stars, last pushed yesterday), licensed MPL-2.0. It adds 125 tokens to every session and 1,302 once invoked, about $0.0006 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

ios-fix

Autonomous iOS bug fixer. (gstack).

garrytan/gstack · 15 tokens

google-mobile-ads-validate

Validates a project's Google Mobile Ads (GMA) SDK integration for iOS, Android, or Unity projects. Use when conducting a full pre-launch audit of an app that integrates GMA SDK or when validating any individual GMA SDK integration checks, such as when validating ad unit IDs and ad formats, SKAdNetwork IDs, mediation…

google/skills · 84 tokens

competition-ios-runtime

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for IPA runtime analysis, Frida hooks, Objective-C or Swift method tracing, Keychain inspection, SSL pinning bypass, URL scheme handling, and iOS request-signing recovery. Use when the user asks to hook an IPA, trace Objective-C or Swift…

zhaoxuya520/reverse-skill · 123 tokens

swiftui-performance-audit

SwiftUI performance: render, scroll, CPU/memory, updates, layout, Instruments.

steipete/agent-scripts · 24 tokens

android-tombstone-symbolication

Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…

dotnet/skills · 176 tokens

node-connect

Diagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps. Use when QR/setup code/manual connect fails, local Wi-Fi works but VPS/tailnet does not, or errors mention pairing required, unauthorized, bootstrap token invalid or expired, gateway.bind, gateway.remote.url, Tailscale…

the-open-agent/openagent · 81 tokens