flutter-macos-duplicate-camera-plugin

flutter-macos-duplicate-camera-plugin is a skill for Claude Code, Codex from divinevideo/divine-mobile. It costs 91 tokens per session (877 once invoked), scanned C, original, MPL-2.0.

A Flutter macOS build fix for projects that include two camera packages defining the same plugin class. Flutter packages add reusable app features, and plugins connect them to platform code.

In plain words
What is it for?
Use it to find both camera_macos and camera_macos_plus in the dependency list, choose one, remove the duplicate, and regenerate the project.
Why use it?
The duplicate classes make generated Swift registration code ambiguous, so macOS compilation fails even if other platforms still build.

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 find both camera_macos and camera_macos_plus in the dependency list, choose one, remove the duplicate, and regenerate the project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin
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-duplicate-camera-plugin
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-duplicate-camera-plugin

README.md
[![agentmods](https://agentmods.dev/badge/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin/github.svg)](https://agentmods.dev/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin)
Your own site
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin/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 flutter-macos-duplicate-camera-plugin

Your own site · 80×15
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/flutter-macos-duplicate-camera-plugin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 877 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00091 $0.00877
Opus 5.5 $0.00036 $0.00351
Sonnet 5.5 $0.00018 $0.00175
Haiku 4.5 $0.00009 $0.00088

Measured 1mo ago against content hash 1d816eb64df6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

flutter-macos-duplicate-camera-plugin scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf build/
.agents/skills/flutter-macos-duplicate-camera-plugin/SKILL.md · 113 lines

How it starts

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

Flutter macOS Duplicate Camera Plugin Fix

Problem

Flutter macOS builds fail when both camera_macos and camera_macos_plus packages are present in pubspec.yaml. Both packages define the same CameraMacosPlugin class, causing Swift registration ambiguity.

Context / Trigger Conditions

Error message:

Ambiguous use of 'CameraMacosPlugin.register(with:)'

Symptoms:

  • macOS build fails during Swift compilation
  • iOS build may still succeed (different plugin implementations)
  • Error occurs in the generated plugin registration code
  • May be accompanied by Xcode build system crashes or "stat cache file not found" errors

Common scenarios:

  • Project has camera_macos for basic camera support
  • Added camera_macos_plus for additional features
  • Transitive dependency pulled in duplicate plugin
  • Copied pubspec.yaml from another project with different camera requirements

Solution

  1. Identify the duplicates - Check pubspec.yaml for both packages:

    # Look for these:
    camera_macos: ^0.0.9
    camera_macos_plus: ^0.0.3
    
  2. Choose one to keep - camera_macos_plus is generally preferred as it's a more feature-complete fork of camera_macos

  3. Remove the duplicate from pubspec.yaml:

    # Keep only one:
    camera_macos_plus: ^0.0.3  # macOS camera support
    
  4. Clean thoroughly - The Xcode build system may be in a corrupted state:

    flutter clean
    rm -rf build/
    rm -rf macos/Pods/
    rm -f macos/Podfile.lock
    rm -rf ~/Library/Developer/Xcode/DerivedData/Runner-*
    flutter pub get
    
  5. Rebuild:

    flutter build macos
    

Verification

After the fix:

  • flutter build macos completes successfully
  • No "Ambiguous use" errors in build output
  • The macOS app launches and camera functionality works

Example

Before (broken):

dependencies:
  camera_macos_plus: ^0.0.3
  divine_camera:
    path: packages/divine_camera
  camera_macos: ^0.0.9  # DUPLICATE - causes conflict

Read the full file on GitHub · 113 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. 1mo ago First seen · 113 lines · 91 tokens per session scan C 1d816eb64df6

Subscribe to this mod's changes

flutter-macos-duplicate-camera-plugin is a skill published in the GitHub repository divinevideo/divine-mobile (264 stars, last pushed today), licensed MPL-2.0. It adds 91 tokens to every session and 877 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.