What problem does it solve?
Building Nostr clients in Compose risks leaking relay subscriptions, duplicating filters across screens, and overwhelming relays with bulk metadata requests. This Skill documents the Amethyst relay-client layer so composables subscribe only to visible data, deduplicate filters, and handle EOSE transitions correctly.
Core Features & Use Cases
- Compose-Scoped Subscriptions: Use
Subscribable<T> and ComposeSubscriptionManager with reference counting so multiple screens share one subscription and the last leaver closes it.
- Pure Filter Assemblers: Build relay
Filter objects via testable classes like MetadataFilterAssembler and ReactionsFilterAssembler instead of inline filter logic in composables.
- Rate-Limited Preloading: Batch bulk metadata fetches through
MetadataPreloader and MetadataRateLimiter to avoid relay rate limits.
- Use Case: When adding a profile screen that needs kind-0 metadata for visible users, wire
observeUserInfo(user) in the composable so metadata loads only while the user is on screen and unsubscribes after they leave.
Quick Start
Ask the AI to wire a new composable screen to subscribe to relay metadata for its visible pubkeys using the Amethyst relay-client Subscribable and assembler patterns.