Amethyst is an Android client for Nostr, a social network protocol that lets people control their own social activity and connections. People use it to read and publish Nostr content, follow accounts, and exchange encrypted direct messages from Android and other supported platforms. The catalogue add-ons support workflows for developing or operating the client.
Borrowing it
Nothing to install: this file belongs to vitorpamplona/amethyst. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vitorpamplona/amethyst/main/.claude/skills/compose-side-effects/SKILL.mdgit clone --depth 1 https://github.com/vitorpamplona/amethystWrote 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.
[](https://agentmods.dev/skills/vitorpamplona/amethyst/compose-side-effects)<a href="https://agentmods.dev/skills/vitorpamplona/amethyst/compose-side-effects"><img src="https://agentmods.dev/badge/skills/vitorpamplona/amethyst/compose-side-effects.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.01585 |
| Opus 5 | $0.00031 | $0.00792 |
| Sonnet 5 | $0.00012 | $0.00317 |
| Haiku 4.5 | $0.00006 | $0.00159 |
Grade A, and why
compose-side-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 8d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- compose-side-effects — 95% identical, 2 lines differ
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Compose: side effects
Core principle
Composable bodies describe UI. They can be recomposed, skipped, or abandoned. Work that changes the outside world belongs in an effect API whose lifecycle matches the work.
Pick the smallest effect
| Need | API |
|---|---|
| Publish Compose state to non-Compose code after every successful recomposition | SideEffect |
| Register/unregister a listener, callback, observer, or resource | DisposableEffect(keys...) |
| Run suspending, deferred, or keyed one-shot work | LaunchedEffect(keys...) |
| Launch suspending work from a user event callback | rememberCoroutineScope() |
| Convert Compose snapshot reads into a Flow inside a coroutine | snapshotFlow { ... } inside LaunchedEffect |
Effect keys
Keys define restart identity. When any key changes, the old effect is cancelled/disposed and a new one starts.
// ✅ Restart collection when userId changes
LaunchedEffect(userId) {
repository.events(userId).collect { event -> handle(event) }
}
// ❌ Unit hides a changing input; collection keeps using the first userId
LaunchedEffect(Unit) {
repository.events(userId).collect { event -> handle(event) }
}
Use stable, semantic keys:
- Use the thing whose lifecycle the effect follows:
userId,screenId,lifecycleOwner,focusRequester. - Do not use broad objects (
state,viewModel) when only one property matters. - Do not add changing lambdas as keys unless you really want restarts on every lambda change.
Avoid stale captures
For long-running effects that should not restart but need the latest callback or value, use rememberUpdatedState.
@Composable
fun Timeout(onTimeout: () -> Unit) {
val latestOnTimeout by rememberUpdatedState(onTimeout)
LaunchedEffect(Unit) {
delay(1_000)
latestOnTimeout()
}
}
Use this when the lifecycle is "start once" but the invoked lambda should stay fresh. Common cases:
- A timeout or splash effect should not restart when
onTimeoutchanges, but it should call the latest callback. - A lifecycle observer should stay registered to the same owner, but invoke the latest
onStart/onStoplambdas. - A long-running collector should keep its collection lifecycle, but call the latest event handler.
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.
- 8d ago First seen · 174 lines · 62 tokens per session scan A 6d55e6388518
compose-side-effects is a skill published in the GitHub repository vitorpamplona/amethyst (1,595 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 1,585 once invoked, about $0.0003 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.
Other skills, from other repositories
compose-animations
Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.
compose-focus-navigation
Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.
kmp-lsp
Kotlin/Java/Swift LSP server for code navigation in Android and iOS codebases. Use when navigating Kotlin, Java, or Swift source files: finding class definitions, listing symbols, jumping to implementations, finding all usages, checking type signatures, or switching workspace between projects. Triggers for: "find this…
compose-multiplatform
Use when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI…
kotlin-android
Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that is compose-multiplatform).
kotlin-expert
Expert-level Kotlin development, Android, coroutines, and multiplatform. Use when the user mentions Android, coroutines, multiplatform, or JVM, or when the task involves Kotlin Fundamentals, Android Development, Kotlin Multiplatform, or Kotlin Style.