Android compose state effects

From krutikJain/android-agent-skills · View interactive version

Android compose state effects is an AI agent skill from the GitHub repository krutikJain/android-agent-skills. Manage Compose state, remember APIs, side effects, snapshots, and lifecycle-aware collection without leaks or loops.

How to use this skill

Skill file

Android Compose State Effects

When To Use

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

Anti-Patterns

Review Focus

Examples

Happy path

Edge case

Failure recovery

Done Checklist

Official References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.