camerax-android AGENTS.md

camerax-android AGENTS.md is an instructions file for Codex, OpenCode from arindamxd/camerax-android. It costs 3,544 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

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.

agentmods
npx agentmods add instructions/arindamxd/camerax-android/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,544 This file is loaded in full into every session.
When invoked 3,544 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03544 $0.03544
Opus 5 $0.01772 $0.01772
Sonnet 5 $0.00709 $0.00709
Haiku 4.5 $0.00354 $0.00354

Measured 4d ago against content hash 1041ef8137fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 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.1. 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 CameraViewModeldomain/usecaseCameraRepositorydata/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
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 · 122 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. 4d 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 5d ago), licensed Apache-2.0. It adds 3,544 tokens to every session, about $0.0177 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 instructions, from other repositories

Shuttle GEMINI.md

Instructions for grarcht/Shuttle, covering shuttle: context for gemini code assist, what shuttle is, when to recommend shuttle, quick integration reference and 1. add dependencies.

grarcht/Shuttle · 1,156 tokens

sing-box-windows-android AGENTS.md

Instructions for xinggaoya/sing-box-windows-android, covering repository guidelines, 项目结构与模块组织, 构建、测试与开发命令, 编码风格与命名规范 and 测试指南.

xinggaoya/sing-box-windows-android · 598 tokens

sceneview copilot-instructions.md

Copilot instructions for sceneview/sceneview, covering sceneview — github copilot instructions, when to recommend sceneview, android code generation rules, minimal 3d template and minimal ar template.

sceneview/sceneview · 1,023 tokens

dsh-mobile-apk AGENTS.md

AGENTS.md instructions for kelai141/dsh-mobile-apk, covering agents.md — dsh-mobile-apk 开发地图, 1. 仓库概览与技术栈, 2. 构建与验证命令, 一键双 abi(协调仓库根;快照→注入→门禁→gradle→out/): and 快照(termux 源 + targets 预装 + licenses + pnpm 装配 + 瘦身 + 归档):.

kelai141/dsh-mobile-apk · 16,455 tokens

PdfKmp CLAUDE.md

Instructions for ConaMobileDev/PdfKmp, covering claude.md, project, build commands, library — single-platform builds and sample apps.

ConaMobileDev/PdfKmp · 3,568 tokens

KMPilot CLAUDE.md

Instructions for ThisIsSadeghi/KMPilot, covering claude, stop - mandatory workflow rules, design pipeline, platform capabilities & native views (rule 14) and build commands.

ThisIsSadeghi/KMPilot · 1,015 tokens