Agent skill

Camerax

by arindamxd in arindamxd/camerax-android

Provide technical guidance for Android camera development with CameraX.

Apache-2.0Auto-check passedDevelopment

Install Camerax

skills CLI
$ npx skills add arindamxd/camerax-android --skill camerax -a claude-code

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

GitHub CLI
$ gh skill install arindamxd/camerax-android camerax --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/arindamxd/camerax-android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/camerax .claude/skills/camerax && 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
camerax
GitHub stars
132
Used in
2 other repos
Token cost
~1.6k tokens
SKILL.md length
610 words
Files
13 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Provide technical guidance for Android camera development with CameraX.

  • Implementing camera features
  • SKILL.md covers Core workflows, Hardware and device diversity and Common pitfalls
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Handling asynchronous recording lifecycles

What it does

Camerax is an agent skill from arindamxd/camerax-android. Provide technical guidance for Android camera development with CameraX. Use when implementing camera features, handling asynchronous recording lifecycles, wiring low-level hardware interop using CameraX, or integrating ML Kit or Media3 effects.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `references/camera1-to-camerax.md`, `references/camera2-to-camerax.md` and `references/expert-blueprints.md`).

It sits in Development, covering Async programming. It works with Android. The repository describes itself as: A Play Store camera app showing Jetpack CameraX APIs in Kotlin — install it, use it, copy the patterns. The licence is Apache-2.0.

When your agent uses it

  • Implementing camera features
  • Handling asynchronous recording lifecycles
  • Wiring low-level hardware interop using CameraX
  • Integrating ML Kit

Example prompts

  • “/camerax”

What it can do on your machine

Read from SKILL.md and the folder at commit 7c36352. 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 kotlin).

    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

Camerax loads about 1.6k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 610 words of instructions outside code blocks.

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

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 arindamxd/camerax-android at commit 7c36352, republished under its Apache-2.0 licence (© arindamxd). 610 words, ~1,603 tokens.

Download SKILL.mdSave it as .claude/skills/camerax/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
camerax
description
Provide technical guidance for Android camera development with CameraX. Use when implementing camera features, handling asynchronous recording lifecycles, wiring low-level hardware interop using CameraX, or integrating ML Kit or Media3 effects.
license
Complete terms in LICENSE.txt
metadata.author
Google LLC
metadata.last-updated
2026-08-06
metadata.keywords
recipe, Android, Camera, Camera1, Camera2, CameraX, migration, Compose, guide, dependencies, PreviewView, CameraXViewfinder, ImageCapture, VideoCapture…

This skill provides procedural guidance and standard patterns for building camera applications on Android, with a focus on CameraX, including its Camera2Interop utilities, and Media3 integrations.

Core workflows

Handling immutable API patterns

Various Android camera and media APIs, especially CameraX VideoCapture, use a fluent, immutable builder-like pattern where methods return a new instance. Failing to reassign these results in settings, such as audio, being ignored.

Pattern: Reassignment is required

<br />
kotlin
// WRONG
run {
  val pending = recorder.prepareRecording(context, opts)
  pending.withAudioEnabled() // This returns a new instance which is ignored
  val active = pending.start(exec, listener)
}

// CORRECT
run {
  val pending = recorder.prepareRecording(context, opts)
      .withAudioEnabled() // Chaining works
  val active = pending.start(exec, listener)
}

// ALSO CORRECT
run {
  var pending = recorder.prepareRecording(context, opts)
  pending = pending.withAudioEnabled() // Reassignment
  val active = pending.start(exec, listener)
}
   
<br />

See immutability for a list of affected classes.

Migrating to CameraX

When migrating legacy camera codebases to the CameraX Jetpack library:

  • Camera1 to CameraX : For migrating legacy android.hardware.Camera implementations, surface handling, and manual lifecycles, see the Camera1 migration guide.
  • Camera2 to CameraX : For migrating more recent but verbose android.hardware.camera2 implementations, session state callbacks, and interop patterns, see the Camera2 migration guide.
Comprehensive feature blueprinting

For multi-step features that involve multiple files and hardware-level wiring, follow the Structural Blueprinting approach to avoid system timeouts. Such complex features include:

  • Manual controls : Break down into the ViewModel state, the controller layer, and the Camera2Interop wiring in the session.
  • RAW capture: Separate JPEG and RAW output configurations into discrete build steps.
  • Custom effects : Prefer Media3Effect or SurfaceProcessor over manual OpenGL pipelines unless absolute performance is required.
  • Low-light : See low-light for Night Mode and LLB guidance.
  • Foldables : See foldables for handling dynamic postures and hinge states.
  • XR, AR, and VR : See xr for spatial tracking, passthrough synchronization, and latency guardrails.
  • Thermals and power : See thermals for managing StreamUseCase optimizations and PowerManager thermal states.
  • Testing and mocking : See testing for using FakeCameraConfig, handling asynchronous lifecycles, and validating analysis pipelines.
  • ML Kit spatial analysis : See mlkit-spatial for coordinate mapping, rotation logic, and mirrored lens handling.
  • Wear OS camera remote : See wear-os for circular UI constraints, Data Layer API syncing, and remote trigger logic.

See expert-blueprints for step-by-step guides.

API discovery

Always use higher-level abstractions instead of low-level manual wiring:

  • Analysis : Use MlKitAnalyzer instead of manual ImageAnalysis.Analyzer.
  • Filters and effects : Use Media3Effect for standard post-processing.
  • Multi-camera : Use ConcurrentCamera APIs for dual-stream setups.

See modern-apis for current recommendations.

Show full SKILL.md (270 more words)Show less
Code quality and architectural rules

Adhere to the following Android ecosystem standard patterns when building your camera implementations:

  • Testing, fakes over mocks : Avoid mocking libraries like Mockito, especially for multi-step CameraX interfaces like ImageProxy. Build "Fakes" to verify state rather than unreliable implementation details.
  • Google Truth assertions : Use assertThat over standard JUnit assertions like assertEquals for improved readability.
  • Explicit test runners : Always define an explicit @RunWith for test classes to ensure the CI environment executes them correctly.
  • Semantic UI merging : When building custom camera controls in Compose, such as a button with an Icon and Text, use semantics { mergeDescendants = true } to ensure screen readers announce them as a single, coherent unit.

Hardware and device diversity

Camera apps run on a wide variety of hardware, from mobile phones and foldables to tablets, laptops, and even smart appliances. Have consideration for the specific hardware the app is running on.

  • Form factors: Account for screen size and orientation changes on foldables and tablets.
  • Multi-camera arrays: Some devices have a rear-facing camera and a front-facing camera. Other devices have multiple rear-facing cameras, such as wide-angle and telephoto lenses.
  • Feature parity: Features like flash or auto-focus behave differently across hardware. For example, CameraX handles both physical flash, back, and screen-based flash, front, and both must be considered when implementing flash functionality.

Common pitfalls

  • Asynchronous lifecycles : Check isRecording state before attempting to stop or pause. Handle VideoRecordEvent.Start for UI state updates, not just the initial call.
  • Thread safety: Camera callbacks often run on background executors. Dispatch UI updates on the main thread.
  • Permission handling : Check CAMERA permission; check for RECORD_AUDIO specifically when enabling audio in VideoCapture.

© arindamxd, Apache-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

SKILL.md and 12 other files (references) in .agents/skills/camerax of arindamxd/camerax-android.

  • SKILL.md
  • references/camera1-to-camerax.md
  • references/camera2-to-camerax.md
  • references/expert-blueprints.md
  • references/foldables.md
  • references/immutability.md
  • references/low-light.md
  • references/mlkit-spatial.md
  • references/modern-apis.md
  • references/testing.md
  • references/thermals.md
  • references/wear-os.md
  • references/xr.md

Open the folder on GitHubat commit 7c36352

Used in 2 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in arindamxd/camerax-android, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Camerax 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.

Camerax compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Camerax this skillarindamxd/camerax-android1322 repos~1.6kAutomated safety check: PassApache-2.0
Ha Android Concurrencyhome-assistant/android4k—~1kAutomated safety check: PassApache-2.0
Kotlin SpecialistJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Kotlin Concurrency ExpertMoustachauve/WLED-Android1693 repos~1.4kAutomated safety check: PassApache-2.0
Maui REST APIdavidortinau/maui-skills174—~1.2kAutomated safety check: PassMIT
Android UI Visual Reviewpermissionlesstech/bitchat-android7.7k—~2.6kAutomated safety check: PassGPL-3.0

Similar skills

  • Ha Android Concurrency

    home-assistant/android

    Home Assistant Android coroutine and threading guidance. An agent skill from home-assistant/android.

    4k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed
  • Kotlin Specialist

    Jeffallan/claude-skills

    Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.

    12k GitHub stars~1.5k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Kotlin Concurrency Expert

    Moustachauve/WLED-Android

    Kotlin Coroutines review and remediation for Android. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 3 repos~1.4k tokens
    MobileAuto-check passed
  • Maui REST API

    davidortinau/maui-skills

    Guidance for consuming REST APIs in .NET MAUI apps. An agent skill from davidortinau/maui-skills.

    174 GitHub stars~1.2k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • Android UI Visual Review

    permissionlesstech/bitchat-android

    Analyze an Android pull request, branch, commit, or patch for user-visible changes and produce reproducible before/after screenshots from isolated builds.

    7.7k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Improve Codebase Architecture

    ywwynm/EverythingDone

    Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.

    144 GitHub starsUsed in 15 repos~1.3k tokens
    DevelopmentAuto-check passed

More from arindamxd/camerax-android

All 21 skills in this repo
  • Styles

    arindamxd/camerax-android

    A skill your agent uses to integrate the Jetpack Compose Styles API into an Android project.

    132 GitHub starsUsed in 4 repos~2.3k tokens
    Auto-check passed
  • Verified Email

    arindamxd/camerax-android

    Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API.

    132 GitHub starsUsed in 4 repos~4.7k tokens
    Auto-check passed
  • Edge To Edge

    arindamxd/camerax-android

    A skill your agent uses to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues.

    132 GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed
  • Leanback To Compose Tv Migration

    arindamxd/camerax-android

    Provides instructions and architectural patterns for migrating Android TV applications from legacy Leanback UI Toolkit, Android Views, or Support Fragments to Jetpack Compose for TV (androidx.tv).

    132 GitHub starsUsed in 2 repos~8.7k tokens
    Auto-check passed
  • Migrate XML Views To Jetpack Compose

    arindamxd/camerax-android

    Provides a structured workflow for migrating an Android XML View to Jetpack Compose.

    132 GitHub starsUsed in 5 repos~1.4k tokens
    Auto-check passed
  • Play Billing Library Version Upgrade

    arindamxd/camerax-android

    A skill your agent uses when upgrading or migrating an Android project from any legacy Google Play Billing Library (PBL) version to the latest stable version of PBL.

    132 GitHub starsUsed in 5 repos~1.4k tokens
    Auto-check passed

Works with

Categories

Questions about Camerax

What does Camerax do?

Provide technical guidance for Android camera development with CameraX. Camerax is an agent skill from arindamxd/camerax-android. Provide technical guidance for Android camera development with CameraX.

When should I use Camerax?

Camerax fits situations like: implementing camera features; handling asynchronous recording lifecycles; wiring low-level hardware interop using CameraX; integrating ML Kit.

How do I install Camerax in Claude Code?

Run `npx skills add arindamxd/camerax-android --skill camerax -a claude-code`. Or copy the skill folder (.agents/skills/camerax in arindamxd/camerax-android) into .claude/skills/camerax in your project. Claude Code loads it when a task matches its description.

How do I install Camerax in Codex?

Run `npx skills add arindamxd/camerax-android --skill camerax -a codex`. Or copy the skill folder (.agents/skills/camerax in arindamxd/camerax-android) into .agents/skills/camerax in your project. Codex loads it when a task matches its description.

Can I use Camerax 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 arindamxd/camerax-android --skill camerax -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/camerax, .gemini/skills/camerax, .github/skills/camerax and .opencode/skills/camerax in your project.

What does Camerax need to run?

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

Does Camerax 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 Camerax 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 Camerax use?

Camerax is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Camerax use?

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

What are the alternatives to Camerax?

Skills that share tags, products or a category with Camerax: Ha Android Concurrency (home-assistant/android, 4k stars), Kotlin Specialist (Jeffallan/claude-skills, 12k stars), Kotlin Concurrency Expert (Moustachauve/WLED-Android, 169 stars) and Maui REST API (davidortinau/maui-skills, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Camerax?

arindamxd (a GitHub user) maintains it in arindamxd/camerax-android, which has 132 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 2, 2026.

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