compose-effects

Community

Run side effects safely and efficiently

Authorsantimattius
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Eliminates performance regressions and subtle bugs caused by incorrect use of Jetpack Compose side effects, such as launching work in the wrong phase, missing exhaustive keys, leaking resources, or re-running expensive logic on every recomposition.

Core Features & Use Cases

  • Choose the right effect: Apply LaunchedEffect, DisposableEffect, SideEffect, and produceState based on whether you need suspend work, cleanup, cheap recomposition-time syncing, or bridging external observables into Compose state.
  • Prevent excessive recomposition work: Use snapshotFlow (with distinctUntilChanged) for high-frequency values like scroll/animation progress, and use derivedStateOf with remember for UI booleans derived from frequently changing inputs.
  • Guarantee correctness with effect rules: Enforce exhaustive keys for LaunchedEffect/DisposableEffect, use rememberUpdatedState for callback updates without restarting long-running coroutines, and ensure onDispose reverses setup to avoid leaks.

Quick Start

Use the compose-effects skill to design the correct LaunchedEffect/DisposableEffect/snapshotFlow/produceState pattern for your composable so the work runs outside the Composition phase, restarts only on the right keys, and cleans up correctly when leaving or changing inputs.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: compose-effects
Download link: https://github.com/santimattius/performance-compose-skills/archive/main.zip#compose-effects

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.