android-compose-state-effects

android-compose-state-effects is a skill for Codex from krutikJain/android-agent-skills. It costs 26 tokens per session (1,011 once invoked), scanned A, original, MIT.

An Android Jetpack Compose guide for managing screen state and controlled side effects. Jetpack Compose is Android's toolkit for describing user interfaces in Kotlin.

In plain words
What is it for?
Use it to choose between remembered state, saved state, derived values, lifecycle-aware Flow collection, and one-off effects in composable functions.
Why use it?
It helps avoid UI updates that repeat endlessly, disappear unexpectedly, or keep running after the screen's lifecycle changes.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to choose between remembered state, saved state, derived values, lifecycle-aware Flow collection, and one-off effects in composable functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krutikjain/android-agent-skills/android-compose-state-effects
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.

Any agent
npx skills add krutikJain/android-agent-skills --skill android-compose-state-effects
Clone the repo
git clone --depth 1 https://github.com/krutikJain/android-agent-skills

Made for: Codex.

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 android-compose-state-effects

README.md
[![agentmods](https://agentmods.dev/badge/skills/krutikjain/android-agent-skills/android-compose-state-effects.svg)](https://agentmods.dev/skills/krutikjain/android-agent-skills/android-compose-state-effects)
Your own site
<a href="https://agentmods.dev/skills/krutikjain/android-agent-skills/android-compose-state-effects"><img src="https://agentmods.dev/badge/skills/krutikjain/android-agent-skills/android-compose-state-effects.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,011 The whole file, excluding the scripts and references it only reads on demand.
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.00026 $0.01011
Opus 5 $0.00013 $0.00505
Sonnet 5 $0.00005 $0.00202
Haiku 4.5 $0.00003 $0.00101

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

Security

Grade A, and why

android-compose-state-effects 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run_examples.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.github/skills/android-compose-state-effects/SKILL.md · 74 lines

How it starts

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

Android Compose State Effects

When To Use

  • Use this skill when the request is about: compose side effect problem, remember vs derivedstateof, collect flow in compose screen.
  • Primary outcome: Manage Compose state, remember APIs, side effects, snapshots, and lifecycle-aware collection without leaks or loops.
  • Reach for this skill when the problem lives inside a composable or Compose runtime primitive, not when redesigning app-wide state holders or reducers.
  • This skill is about runtime primitives inside Compose. If the question is reducer design, screen contracts, or ViewModel ownership, hand off to android-state-management.
  • Handoff skills when the scope expands:
  • android-state-management
  • android-compose-performance

Workflow

  1. Classify the issue first: local remembered state, saved state, derived state, lifecycle-aware collection, or one-off side effects.
  2. Pick the narrowest Compose primitive that matches that problem: remember, rememberSaveable, derivedStateOf, produceState, collectAsStateWithLifecycle, LaunchedEffect, DisposableEffect, SideEffect, or snapshotFlow.
  3. Keep durable UI state separate from transient events such as snackbars, navigation, and analytics.
  4. Stabilize effect keys and callback references so recomposition does not relaunch work or capture stale lambdas.
  5. Hand off broader state-holder design to android-state-management only after the Compose-runtime issue is isolated.

Guardrails

  • Prefer lifecycle-aware collection such as collectAsStateWithLifecycle for UI-facing flows.
  • Use rememberUpdatedState when an effect should see the latest lambda or value without restarting.
  • Keep one-shot effects out of immutable screen state when they are really events.
  • Do not launch coroutines or trigger navigation directly from the composable body outside the appropriate effect APIs.

Anti-Patterns

  • Using LaunchedEffect(Unit) or unstable keys when the effect should restart on real dependency changes.
  • Collecting flows in multiple places and wondering why events duplicate.
  • Storing transient events as persistent booleans in screen state and then manually resetting them.
  • Using derivedStateOf or snapshotFlow when plain state reads would be simpler and cheaper.

Read the full file on GitHub · 74 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 74 lines · 26 tokens per session scan A b74af68833c2

Subscribe to this mod's changes

android-compose-state-effects is a skill published in the GitHub repository krutikJain/android-agent-skills (14 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 1,011 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

truesheet-usage

Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation…

lodev09/react-native-true-sheet · 169 tokens

uniwind

Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or debugging components in a React Native project that uses Uniwind classNames. Covers setup, Metro config, global.css, theming, className props, accent- color props, platform/data/state/responsive variants, CSS variables, custom utilities…

uni-stack/uniwind · 130 tokens

e2e-testing

AI-powered E2E testing for any app — Flutter, React Native, iOS, Android, Electron, Tauri, KMP, .NET MAUI. Connects via MCP to running apps so the agent can take screenshots, tap elements, enter text, scroll, inspect UI trees, and verify state with natural language. Use when the user wants to test an app's UI…

ai-dashboad/flutter-skill · 107 tokens

maui-blazor-hybrid

Build/debug MAUI Blazor Hybrid. USE FOR: BlazorWebView vs HybridWebView, Razor UI, embedded HTML/JS, AddMauiBlazorWebView, root components, JS/.NET messaging, trim-safe JSON, wwwroot assets, auth/data handoff, DevFlow CDP route/DOM debugging. DO NOT USE FOR: pure XAML UI or browser-only apps.

dotnet/maui-labs · 88 tokens

react-native-expert

Expert in React Native, cross-platform mobile development, native modules, and performance optimization. Use when the user mentions mobile, JavaScript, TypeScript, cross platform, iOS, or Android, or when the task involves React Native Architecture, Component Types, Hooks Essentials, or Navigation.

personamanagmentlayer/pcl · 62 tokens

migrate-nativewind-to-uniwind

Migrate a React Native project from NativeWind to Uniwind. Use when the user wants to replace NativeWind with Uniwind, upgrade from NativeWind, switch to Uniwind, or mentions NativeWind-to-Uniwind migration. Handles package removal, config migration, Tailwind 4 upgrade, cssInterop removal, theme conversion, and all…

uni-stack/uniwind · 82 tokens