amethyst: Skill for Claude Code

.claude/skills/relay-client/SKILL.md

relay-client is a skill for Claude Code from vitorpamplona/amethyst. It costs 0 tokens per session (1,692 once invoked), scanned A, original, MIT.

A guide to the relay-client layer in Amethyst, which connects the app's local data and accounts to remote Nostr servers and their event streams.

In plain words
What is it for?
Use it when adding subscriptions for a screen, building filters for events, preloading profiles or metadata, coordinating feed data, or handling subscription cleanup.
Why use it?
It helps screens request only the data they currently need, avoid duplicate requests, limit large batches, and correctly stop loading after older data arrives.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

This is vitorpamplona/amethyst's own configuration. It tells Claude Code how to work on amethyst itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything amethyst configures →

About the project

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.

vitorpamplona/amethyst · 1,620 stars · on GitHub · amethyst.social

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/vitorpamplona/amethyst/main/.claude/skills/relay-client/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vitorpamplona/amethyst

Made for: Claude Code.

Wrote 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.

agentmods badge for relay-client

README.md
[![agentmods](https://agentmods.dev/badge/skills/vitorpamplona/amethyst/relay-client/github.svg)](https://agentmods.dev/skills/vitorpamplona/amethyst/relay-client)
Your own site
<a href="https://agentmods.dev/skills/vitorpamplona/amethyst/relay-client"><img src="https://agentmods.dev/badge/skills/vitorpamplona/amethyst/relay-client/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for relay-client

Your own site · 80×15
<a href="https://agentmods.dev/skills/vitorpamplona/amethyst/relay-client"><img src="https://agentmods.dev/badge/skills/vitorpamplona/amethyst/relay-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01692
Opus 5.5 $0.00000 $0.00677
Sonnet 5.5 $0.00000 $0.00338
Haiku 4.5 $0.00000 $0.00169

Measured 5d ago against content hash 3f5bf0d1dfde, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

relay-client 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 5d 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.

.claude/skills/relay-client/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Relay client: screen-scoped subscriptions

How a composable gets events from relays only while it is on screen. Headless code (amy, geode, tests, one-shot fetches) does not use this layer: it uses the INostrClient extensions — see AGENTS.md › Feature Workflow ("Relay client ops already exist").

Where it lives

  • commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/relayClient/ — the headless half: one package per feature (chess/, communities/, home/, thread/, user/, event/, …) holding query states, filter assemblers and sub-assemblers; composeSubscriptionManagers/, eoseManagers/, subscriptions/ (ExplainedFilter, SubPurpose), assemblers/ (shared ones: MetadataFilterAssembler, ReactionsFilterAssembler, ContactCardFilters.kt), oneshot/, paging/, preload/.
  • reqCommand/RelaySubscriptionsCoordinator.kt — owns one instance of every assembler (account, home, userFinder, eventFinder, chess, community, …). Screens reach it as accountViewModel.dataSources() (BaseAccountViewModel.dataSources).
  • commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/relayClient/ — the @Composable entry points, same package names: observeUser*, EventFinderFilterAssemblerSubscription, KeyDataSourceSubscription, LifecycleAwareKeyDataSourceSubscription, and per-feature *FilterAssemblerSubscriptions.

First choice: observeUser* and EventFinder

Before writing any assembler, check whether these already load what you need:

  • Users (commonsUI/.../relayClient/user/UserMetadataObservers.kt): observeUserInfo, observeUserPicture, observeUserBanner, observeUserAboutMe, observeUserName(user) each open UserFinderFilterAssemblerSubscription(user) and return a State. Metadata, relay lists, reports and contact cards load for on-screen users only, batched into one REQ per relay for the whole visible set. A LazyColumn composes only the visible window, so this is "load what's on screen" for free.
  • Notes (commonsUI/.../relayClient/event/EventFinderFilterAssemblerSubscription.kt): EventFinderFilterAssemblerSubscription(note) loads the note's reactions, zaps, reposts and replies while composed; the observers in event/EventObservers.kt / AccountEventObservers.kt sit on top of it.
  • Both read LocalUserFinder, LocalUserFinderAccount and LocalEventFinder, provided once in commonsUI/.../ui/app/AmethystApp.kt from dataSources(). Their defaults are error(...), so they must never be reached from a composition with no relay client (e.g. the Android :napplet process).

Read the full file on GitHub · 125 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 5d ago Changed · -1 lines 3f5bf0d1dfde
  2. 15d ago Changed 137ec7a288d8
  3. 25d ago Changed · -36 lines · -123 tokens per session de029e8ba96e
  4. 1mo ago Changed 56a6719d318a
  5. 2mo ago First seen · 162 lines · 123 tokens per session scan A 22ee8c0b38c5

Subscribe to this mod's changes

relay-client is a skill published in the GitHub repository vitorpamplona/amethyst (1,620 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,692 tokens. 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.

Related

relay-client compared with skills from other repositories

relay-client next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
relay-clientvitorpamplona/amethystSkill1.6kyesterdayMITA0Claude Code
pagination-patternsahmed3elshaer/everything-claude-code-mobileSkill664mo agoMITA32Claude Code
offline-firstahmed3elshaer/everything-claude-code-mobileSkill664mo agoMITA26Claude Code
sceneviewsceneview/sceneviewSkill1.4kyesterdayApache-2.0A156Codex
kotlin-androidericrisco/rsc-harnessSkill5032d agoMITA78Claude Code, Codex
compose-multiplatformericrisco/rsc-harnessSkill5032d agoMITA80Claude Code, Codex
deliver-specchrisbanes/skillsSkill1.1kyesterdayApache-2.0A33Claude Code, Codex