Registry / skydoves

skydoves/compose-performance-skills/collecting-flows-safely

Use this skill to migrate Compose UI from `collectAsState()` to `collectAsStateWithLifecycle()`, hoist `Flow<T>` parameters out of composables, and apply `.conflate()` / `.distinctUntilChanged()` / `snapshotFlow` so background CPU and battery stop draining and chatty flows stop invalidating the UI per emission. Covers ViewModel `StateFlow`/`SharedFlow` consumers, sensor and location streams, and the "Flow as composable parameter" antipattern. Trigger when the user mentions `collectAsState`, `col

Agent skill · version 0.0.0-main.1794521040.g1b32f81 · from skydoves/compose-performance-skills

Install

npx yarkr-cli add skill:skydoves/compose-performance-skills/collecting-flows-safely

Without Node.js, on macOS and Linux (curl or wget):

curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:skydoves/compose-performance-skills/collecting-flows-safely
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:skydoves/compose-performance-skills/collecting-flows-safely

On Windows, in PowerShell:

irm https://yarkr.com/install.ps1 | iex; yarkr add skill:skydoves/compose-performance-skills/collecting-flows-safely

Works with Claude Code, Codex, opencode, Cursor, any harness over MCP.