camerax-android: Instructions file for Codex

AGENTS.md

camerax-android AGENTS.md is an instructions file for Codex, OpenCode from arindamxd/camerax-android. It costs 3,890 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for a CameraX Android camera app. They explain its Kotlin and Jetpack Compose structure, where features belong, and rules for handling camera, files, and media.

In plain words
What is it for?
Use them when adding camera modes, changing Compose screens, working with CameraX sessions, or handling photos, videos, and MediaStore files.
Why use it?
They reduce the risk of putting code in the wrong layer, blocking the user interface, or breaking the app's established architecture.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is arindamxd/camerax-android's own configuration. It tells Codex and OpenCode how to work on camerax-android itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything camerax-android configures →

Reuse

Borrowing it

Nothing to install: this file belongs to arindamxd/camerax-android. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/arindamxd/camerax-android/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/arindamxd/camerax-android

Made for: Codex, OpenCode.

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 camerax-android AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/arindamxd/camerax-android/agents-md/github.svg)](https://agentmods.dev/instructions/arindamxd/camerax-android/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/arindamxd/camerax-android/agents-md"><img src="https://agentmods.dev/badge/instructions/arindamxd/camerax-android/agents-md/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 camerax-android AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/arindamxd/camerax-android/agents-md"><img src="https://agentmods.dev/badge/instructions/arindamxd/camerax-android/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,890 This file is loaded in full into every session.
When invoked 3,890 The same file — it is already loaded in full.
Security scan A 0 findings. 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.03890 $0.03890
Opus 5.5 $0.01556 $0.01556
Sonnet 5.5 $0.00778 $0.00778
Haiku 4.5 $0.00389 $0.00389

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

Security

Grade A, and why

camerax-android AGENTS.md 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 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.

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.md · 126 lines

How it starts

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

AGENTS.md — CameraX

Guidance for AI coding agents (and humans) working in this repository. Read this before making changes. It describes the rules, architecture, design system, and shared components.

Play Store camera app (com.arindam.camerax) built with Jetpack CameraX 1.6.2. Kotlin, Jetpack Compose, minSdk 23, compileSdk/targetSdk 37. Goal: show other apps what the CameraX library can do.

Architecture (Clean Architecture, single module)

ui (presentation) → domain ← data

Do not construct CameraSession from the UI. Keep use cases; do not collapse to ViewModel → CameraSession. Do not split Gradle modules unless asked.

Disk and MediaStore work (list / delete / publish / stitch / motion mux / still effects) must stay off the main thread: repositories use AppDispatchers.io, ViewModels withContext. Do not call listFiles, BitmapFactory.decodeFile, or MediaMetadataRetriever from Compose or click handlers.

File map (where to change what)

Goal Start here
Add a pager mode (Photo/Video/…) domain/model/CameraModeCatalog.kt + CameraMode.labelRes in ui/home/camera/CameraModels.kt. New CameraX session only in CameraSession if bind flags are not enough.
Bind / capture / zoom / flash / AE CameraViewModel → domain/usecase → CameraRepository → data/camera/CameraSession.kt
Live-feed chrome (header, shutter, zoom) ui/home/camera/CameraChrome.kt
Mode pager physics ui/home/camera/CameraPager.kt
Settings row settingsSections() in ui/settings/SettingsCatalog.kt; capabilities in SettingsViewModel
Theme (Light/Dark/System) util/theme/NightMode.kt + SettingsActivity
Motion Photo mux / gallery play data/camera/MotionPhotoMuxer.kt
Still JPEG EXIF (decode / re-encode) data/camera/StillImageExif.kt
Panorama stitch data/camera/PanoramaStitcher.kt
Publish to DCIM data/media/MediaStorePublisher.kt via PublishMedia
Composition root di/AppContainer.kt (CameraInteractors)
Shared glass chrome (back, pills) ui/compose/CameraGlassButton.kt (ChromeControlSize), ChromeActionPill.kt

Read the full file on GitHub · 126 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 Changed · +4 lines · +346 tokens per session 75c336a9c568
  2. 2mo ago First seen · 122 lines · 3,544 tokens per session scan A 1041ef8137fe

Subscribe to this mod's changes

camerax-android AGENTS.md is an instructions file published in the GitHub repository arindamxd/camerax-android (132 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 3,890 tokens to every session, about $0.0156 per session on Opus 5.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

camerax-android AGENTS.md compared with instructions from other repositories

camerax-android AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
camerax-android AGENTS.mdarindamxd/camerax-androidInstructions file1321mo agoApache-2.0A3,890Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode