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.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/vitorpamplona/amethyst/extractgit 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/commands/vitorpamplona/amethyst/extract)<a href="https://agentmods.dev/commands/vitorpamplona/amethyst/extract"><img src="https://agentmods.dev/badge/commands/vitorpamplona/amethyst/extract.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00010 | $0.00353 |
| Opus 5 | $0.00005 | $0.00177 |
| Sonnet 5 | $0.00002 | $0.00071 |
| Haiku 4.5 | $0.00001 | $0.00035 |
Grade A, and why
extract 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 4d 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.
What it actually says
Extract the component $ARGUMENTS from the Android app to shared KMP code:
Process
-
Locate the component in the amethyst module:
find amethyst/src -name "*$ARGUMENTS*" grep -r "fun $ARGUMENTS\|class $ARGUMENTS" amethyst/src/ -
Analyze dependencies:
- Android-specific imports (Context, Intent, etc.)
- Platform APIs (Camera, MediaStore, etc.)
- Android Compose specifics vs standard Compose
-
Identify what can be shared:
- Pure Composable functions →
commons/commonMain/ - Business logic →
quartz/commonMain/ - Platform-specific → create expect/actual
- Pure Composable functions →
-
Create shared version:
- Move to appropriate shared module
- Replace Android imports with multiplatform alternatives
- Add expect declarations for platform-specific parts
-
Update references:
- Change imports in amethyst module
- Add implementations in desktopApp if needed
Common Replacements
| Android | Multiplatform |
|---|---|
LocalContext.current |
expect/actual or parameter |
stringResource() |
Res.string.* |
painterResource() |
painterResource(Res.drawable.*) |
Toast.makeText() |
Custom snackbar/notification |
Intent |
expect/actual for navigation |
Example
/extract NoteCard
This will find NoteCard, analyze its dependencies, and guide you through extracting it to shared code.
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.
- 4d ago First seen · 51 lines · 10 tokens per session scan A cda79e5c86d5
extract is a command published in the GitHub repository vitorpamplona/amethyst (1,595 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 353 once invoked, about $0.0001 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 commands, from other repositories
review-android
Guided Android code review workflow through context gathering, Android-specific review, and output.
work-on-android
Guided Android development workflow through all lifecycle phases.
mobile-verify
Run automated verification loops with pass@k metrics for mobile testing. Executes tests multiple times to detect flakiness.
add-string
Add a user-facing string/plural to all 16 locales (Android + iOS).
mobile-checkpoint
Save and restore mobile development checkpoints. Capture build variants, test states, and project state before risky operations.
feature-learn
View and manage patterns learned from feature builds. Shows extracted instincts, confidence scores, and feature completeness history.