compose-guide

compose-guide is an agent for coding agents from ahmed3elshaer/everything-claude-code-mobile. It costs 33 tokens per session (1,975 once invoked), scanned A, original, MIT.

A guide for Jetpack Compose, Android’s toolkit for building app screens with Kotlin code. It covers screen state, UI updates, themes, animations, and reusable interface patterns.

In plain words
What is it for?
Use it to design or review Compose screens, improve state flow and recomposition, and apply theming, animation, accessibility, and maintainability practices.
Why use it?
It helps you avoid hard-to-test screens, unnecessary UI updates, and inconsistent state handling when building or reviewing Compose interfaces.

Agent

Part of the everything-claude-code-mobile plugin — 12 skills, 26 commands, 17 agents, 3 MCP servers shipped together

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 agents/ahmed3elshaer/everything-claude-code-mobile/compose-guide
Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

Or install everything-claude-code-mobile, the plugin that ships this one along with the rest of its 12 skills, 26 commands, 17 agents, 3 MCP servers.

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 compose-guide

README.md
[![agentmods](https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/compose-guide.svg)](https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/compose-guide)
Your own site
<a href="https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/compose-guide"><img src="https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/compose-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,975 The whole file, excluding the scripts and references it only reads on demand.
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.00033 $0.01975
Opus 5 $0.00016 $0.00988
Sonnet 5 $0.00007 $0.00395
Haiku 4.5 $0.00003 $0.00198

Measured 4d ago against content hash c35c53eb7f6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compose-guide 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.

.opencode/agents/compose-guide.md · 368 lines

How it starts

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

Jetpack Compose Guide

You are a Jetpack Compose expert focused on building performant, maintainable, and accessible UI with modern declarative patterns.

Core Principles

  1. State Hoisting - State owned by caller, passed down
  2. Unidirectional Data Flow - State flows down, events flow up
  3. Composition over Inheritance - Build complex UI from simple composables
  4. Stable & Immutable - Types should be stable for skipping

State Management

State Hoisting Pattern

// ❌ BAD: Internal state (not testable, not reusable)
@Composable
fun EmailField() {
    var email by remember { mutableStateOf("") }
    TextField(value = email, onValueChange = { email = it })
}

// ✅ GOOD: Hoisted state
@Composable
fun EmailField(
    email: String,
    onEmailChange: (String) -> Unit,
    modifier: Modifier = Modifier
) {
    TextField(
        value = email,
        onValueChange = onEmailChange,
        modifier = modifier
    )
}

// Usage in parent
@Composable
fun LoginScreen(viewModel: LoginViewModel = koinViewModel()) {
    val state by viewModel.uiState.collectAsStateWithLifecycle()
    
    EmailField(
        email = state.email,
        onEmailChange = { viewModel.onIntent(LoginIntent.EmailChanged(it)) }
    )
}

Remember Patterns

// remember - Survives recomposition
val alpha by remember { mutableStateOf(1f) }

// rememberSaveable - Survives configuration changes
var count by rememberSaveable { mutableStateOf(0) }

// derivedStateOf - Computed value, recomputes only when dependencies change
val isValid by remember {
    derivedStateOf { email.isNotBlank() && password.length >= 8 }
}

// remember with key - Resets when key changes
val animator = remember(itemId) { Animatable(0f) }

State Flow Collection

// ✅ CORRECT: Lifecycle-aware collection
@Composable
fun HomeScreen(viewModel: HomeViewModel = koinViewModel()) {
    val uiState by viewModel.uiState.collectAsStateWithLifecycle()
    
    HomeContent(state = uiState)
}

// ❌ WRONG: Not lifecycle-aware
val uiState by viewModel.uiState.collectAsState()

Read the full file on GitHub · 368 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 · 368 lines · 33 tokens per session scan A c35c53eb7f6b

Subscribe to this mod's changes

compose-guide is an agent published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (65 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 1,975 once invoked, about $0.0002 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 agents, from other repositories

energy-auditor

Use this agent when the user mentions battery drain, energy optimization, power consumption audit, or pre-release energy check. Scans for the 8 most common energy anti-patterns: timer abuse, polling, continuous location, animation leaks, background mode misuse, network inefficiency, GPU waste, and disk I/O patterns.…

Kasempiternal/axiom-v2 · 136 tokens

i18n

Hermex ships one String Catalog, HermesMobile/Resources/Localizable.xcstrings, included in the app, widget, and share-extension targets. Every user-facing literal is already externalized (String(localized:) / LocalizedStringKey), so adding a language is normally translation-only — no Swift edits.

uzairansaruzi/hermex · 0 tokens

feature-gap-index

Thin, always-current classification of upstream Hermes-WebUI API route groups against Hermes-Mobile. This file replaces an earlier 1,400-line per-endpoint catalog, which mixed durable judgment (priority, defer/skip decisions, safety notes) with volatile detail (exact JSON shapes, handler names) that rotted between…

uzairansaruzi/hermex · 0 tokens

issue-tracker

Predict issues and PRDs live in Consensys Jira.

MetaMask/metamask-mobile · 0 tokens

input-and-windows

Load-bearing decisions split from AGENTS.md — read before touching keyboard focus, key rails/ornaments, window chrome, dictation, selection modes, scene routing, tab moves, keyboard avoidance, or secret fields.

multiplex-term/Multiplex · 0 tokens

UIKit Code Reviewer

Reviews UIKit code for TTBaseUIKit compliance, MVVM correctness, API patterns, and iOS best practices.

tqtuan1201/TTBaseUIKit · 25 tokens