Agent skill

Flutter macOS Duplicate Camera Plugin

by divinevideo in divinevideo/divine-mobile

Fix Flutter macOS build failure caused by duplicate camera plugins.

MPL-2.0Auto-check passedMobile

Install Flutter macOS Duplicate Camera Plugin

skills CLI
$ npx skills add divinevideo/divine-mobile --skill flutter-macos-duplicate-camera-plugin -a claude-code

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

GitHub CLI
$ gh skill install divinevideo/divine-mobile flutter-macos-duplicate-camera-plugin --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/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/flutter-macos-duplicate-camera-plugin .claude/skills/flutter-macos-duplicate-camera-plugin && 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
flutter-macos-duplicate-camera-plugin
GitHub stars
265
Token cost
~862 tokens
SKILL.md length
249 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix Flutter macOS build failure caused by duplicate camera plugins.

  • Works in 5 steps: Identify the duplicates - Check… → Choose one to keep - camera_macos_plus… → Remove the duplicate from pubspec.yaml → …
  • MacOS build fails with Ambiguous use of CameraMacosPlugin.register(with:) error
  • SKILL.md covers Problem, Context / Trigger Conditions, Solution and Verification, plus 3 more sections
  • Calls flutter

What it does

Flutter macOS Duplicate Camera Plugin is an agent skill from divinevideo/divine-mobile. Fix Flutter macOS build failure caused by duplicate camera plugins. Use when: (1) macOS build fails with "Ambiguous use of 'CameraMacosPlugin.register(with:)'" error, (2) Both cameramacos and cameramacosplus are in pubspec.yaml, (3) Build worked before adding a new camera package. The plugins define the same class name causing Swift registration conflicts.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps and iOS development. It works with macOS, Flutter and Xcode. The licence is MPL-2.0.

When your agent uses it

  • MacOS build fails with Ambiguous use of CameraMacosPlugin.register(with:) error
  • Both cameramacos and cameramacosplus are in pubspec.yaml
  • Build worked before adding a new camera package

Example prompts

  • “Ambiguous use of”
  • “/flutter-macos-duplicate-camera-plugin”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify the duplicates - Check pubspec.yaml for both packages
  2. Choose one to keep - camera_macos_plus is generally preferred as it's a
  3. Remove the duplicate from pubspec.yaml
  4. Clean thoroughly - The Xcode build system may be in a corrupted state
  5. Rebuild

What it can do on your machine

Read from SKILL.md and the folder at commit 8d5fbf2. 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

    Shell commands in SKILL.md call:

    • flutter

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

  • Network

    Links to these hosts (documentation or services it may open):

    • pub.dev
    • docs.flutter.dev

    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

Flutter macOS Duplicate Camera Plugin loads about 862 tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 249 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~862

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 divinevideo/divine-mobile at commit 8d5fbf2, republished under its MPL-2.0 licence (© divinevideo). 249 words, ~862 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-macos-duplicate-camera-plugin/SKILL.md (or your agent's skills folder).
name
flutter-macos-duplicate-camera-plugin
description
Fix Flutter macOS build failure caused by duplicate camera plugins. Use when: (1) macOS build fails with "Ambiguous use of 'CameraMacosPlugin.register(with:)'" error, (2) Both camera_macos and camera_macos_plus are in pubspec.yaml, (3) Build worked before adding a new camera package. The plugins define the same class name causing Swift registration conflicts.
author
Claude Code
version
1.0.0
date
2025-01-28

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:

    yaml
    # 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:

    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:

    bash
    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:

    bash
    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):

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

After (fixed):

yaml
dependencies:
  camera_macos_plus: ^0.0.3  # macOS camera support (replaces camera_macos)
  divine_camera:
    path: packages/divine_camera
  # camera_macos removed

Notes

  • camera_macos_plus is a community fork with additional features
  • If you specifically need camera_macos instead, remove camera_macos_plus
  • Check transitive dependencies with flutter pub deps if duplicates reappear
  • The Xcode build system can get into corrupted states after this error; thorough cleaning (including DerivedData) may be required
  • This is specific to macOS - iOS uses different camera plugin implementations

References

© divinevideo, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/flutter-macos-duplicate-camera-plugin of divinevideo/divine-mobile.

Open the folder on GitHubat commit 8d5fbf2

Compare with similar skills

Flutter macOS Duplicate Camera Plugin 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.

Flutter macOS Duplicate Camera Plugin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter macOS Duplicate Camera Plugin this skilldivinevideo/divine-mobile265—~862Automated safety check: PassMPL-2.0
OdevioOdevio/Odevio-CLI423—~7.6kAutomated safety check: PassMIT
Apple Designvrcm-team/VRCM1791 repos~6.2kAutomated safety check: PassMIT
Limrun Xcodesuperset-sh/superset15k—~6.5kAutomated safety check: NotesCustom licence
Streamadrianhajdin/react-native-lingua150—~1.9kAutomated safety check: PassNone
Eas Simulatorexpo/skills2.7k—~6.6kAutomated safety check: NotesMIT

Similar skills

  • Odevio

    Odevio/Odevio-CLI

    Take a Flutter project to an iPhone or the App Store with Odevio - build, sign and publish iOS apps from Windows, Linux or macOS with no Mac and no Xcode.

    423 GitHub stars~7.6k tokensUpdated 13 days ago
    MobileAuto-check passed
  • Apple Design

    vrcm-team/VRCM

    Cross-platform UI/UX design reviewer grounded in Apple's Human Interface Guidelines (122 pages pulled from developer.apple.com, including 57 component pages) plus a design-craft lens for…

    179 GitHub starsUsed in 1 repo~6.2k tokens
    MobileAuto-check passed
  • Limrun Xcode

    superset-sh/superset

    Build an iOS / Apple app on remote Xcode with lim xcode build instead of local xcodebuild, run project commands with lim xcode run, or run its XCTest suites with lim xcode test, from any environment…

    15k GitHub stars~6.5k tokensUpdated today
    MobileAuto-check: notes
  • Stream

    adrianhajdin/react-native-lingua

    Stream router for Chat, Video, Feeds, and Moderation. An agent skill from adrianhajdin/react-native-lingua.

    150 GitHub stars~1.9k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Eas Simulator

    expo/skills

    Official

    Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud.

    2.7k GitHub stars~6.6k tokensUpdated yesterday
    MobileAuto-check: notes
  • Native Testing Strategy

    bladeofgod/flutter-ai-harness

    适用:设计或审查 Kotlin/Swift 原生模块、Bridge Adapter、Host 编译、模拟器/设备和系统能力验证。不适用:纯 Dart/Flutter 测试或用 Fake 代替相机和权限真机验证。触发词:JUnit、XCTest、Robolectric、instrumented test、Swift Testing、Framework Fake、Gradle…

    116 GitHub stars~345 tokensUpdated 1 mo ago
    MobileAuto-check passed

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    265 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    265 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    265 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    265 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    265 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    265 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Flutter macOS Duplicate Camera Plugin

What does Flutter macOS Duplicate Camera Plugin do?

Fix Flutter macOS build failure caused by duplicate camera plugins. Flutter macOS Duplicate Camera Plugin is an agent skill from divinevideo/divine-mobile. Fix Flutter macOS build failure caused by duplicate camera plugins.

When should I use Flutter macOS Duplicate Camera Plugin?

Flutter macOS Duplicate Camera Plugin fits situations like: macOS build fails with Ambiguous use of CameraMacosPlugin.register(with:) error; both cameramacos and cameramacosplus are in pubspec.yaml; build worked before adding a new camera package.

How do I install Flutter macOS Duplicate Camera Plugin in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill flutter-macos-duplicate-camera-plugin -a claude-code`. Or copy the skill folder (.agents/skills/flutter-macos-duplicate-camera-plugin in divinevideo/divine-mobile) into .claude/skills/flutter-macos-duplicate-camera-plugin in your project. Claude Code loads it when a task matches its description.

How do I install Flutter macOS Duplicate Camera Plugin in Codex?

Run `npx skills add divinevideo/divine-mobile --skill flutter-macos-duplicate-camera-plugin -a codex`. Or copy the skill folder (.agents/skills/flutter-macos-duplicate-camera-plugin in divinevideo/divine-mobile) into .agents/skills/flutter-macos-duplicate-camera-plugin in your project. Codex loads it when a task matches its description.

Can I use Flutter macOS Duplicate Camera Plugin 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 divinevideo/divine-mobile --skill flutter-macos-duplicate-camera-plugin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-macos-duplicate-camera-plugin, .gemini/skills/flutter-macos-duplicate-camera-plugin, .github/skills/flutter-macos-duplicate-camera-plugin and .opencode/skills/flutter-macos-duplicate-camera-plugin in your project.

What does Flutter macOS Duplicate Camera Plugin need to run?

Going by SKILL.md and its folder, Flutter macOS Duplicate Camera Plugin needs the command-line tools its instructions call (flutter).

Does Flutter macOS Duplicate Camera Plugin access the network?

SKILL.md names 2 domains. As links in the text: pub.dev and docs.flutter.dev. This is read from the text; nothing was executed.

Is Flutter macOS Duplicate Camera Plugin 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 Flutter macOS Duplicate Camera Plugin use?

Flutter macOS Duplicate Camera Plugin is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter macOS Duplicate Camera Plugin use?

About 862 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter macOS Duplicate Camera Plugin?

Skills that share tags, products or a category with Flutter macOS Duplicate Camera Plugin: Odevio (Odevio/Odevio-CLI, 423 stars), Apple Design (vrcm-team/VRCM, 179 stars), Limrun Xcode (superset-sh/superset, 15k stars) and Stream (adrianhajdin/react-native-lingua, 150 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter macOS Duplicate Camera Plugin?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 265 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 7, 2026.

Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.