amy-expert
БесплатноБез исполняемых скриптовНе проверенamy CLI in cli/: adding an `amy <verb>` command, Main.kt dispatch, Output.emit/--json contract, exit codes 0/1/2/124, ~/.amy layout, cli/tests harnesses. Use…
от vitorpamplona★ 1 630 звёзд на GitHubОб этом скилле
amy CLI
cli/ is a non-interactive JVM client over quartz + commons. Its --json output and exit
codes are a public API that the interop harnesses depend on. The long-form contract is
cli/DEVELOPMENT.md ("Public contract", "How to add a command", "Output-shape conventions",
"Testing", "Full on-disk layout"); this skill is the short version plus the traps.
Rules
- Thin assembly layer. No protocol, filter assembly, state machines or encryption in
cli/. Protocol goes toquartz/; business logic tocommons/, extracted fromamethyst/first in its own commit if needed (references/extraction-recipe.md). Acommands/*.ktfile over ~200 lines is a smell.climay depend on:geode(foramy serve), never on:commonsUI,:amethystor:desktopApp. - Output goes through
Output(cli/src/main/kotlin/…/cli/Output.kt).Output.emit(mapOf(...)): the map is the--jsonshape (one line, one object, stable snake_case keys); the default text render comes from the same map and has no contract.return Output.error("code", "detail"): the return value is the exit code (bad_args2,timeout124, anything else 1). Errors go to stderr (error: code: detail, or a JSON object under--json).- Exit codes
0ok,1runtime,2bad args,124await timeout.runCliinMain.ktalso maps a thrownIllegalArgumentExceptionto 2 andAwaitTimeoutto 124. - Never
printlnresults;System.err.printlnis for progress logs only. - Adding a
--jsonkey is safe. Renaming or removing one is breaking: say so in the commit, and updatecli/README.mdand the fixtures undercli/tests/. - Publishes:
RawEventSupport.publishGuard(ack, id)then+ RawEventSupport.ackFields(ack)(published_to+rejected_by: [{relay, reason}]). Don't hand-roll the projection. - Reuse an error code from the canonical list in
cli/DEVELOPMENT.mdbefore minting one.
- Non-interactive. Everything is a flag; a network wait is an explicit
awaitverb with--timeout. The only TTY fallback isPassphraseProvider(after--passphrase-fileand$AMY_PASSPHRASE); don't add more. ~/.amy/is the whole state, reloaded on every run; no in-process caches across runs.~/.amy/shared/events-store/(one event store for all accounts),~/.amy/<account>/(identity.json,state.json,aliases.json,marmot/),~/.amy/current(written byamy use NAME). Account selection is the global--account NAME;--namestays free for subcommands. New persisted state goes throughConfig.kt/stores/FileStores.kt/ a named helper likeAliases.kt.$HOME, notuser.home.DataDir.DEFAULT_ROOT(Config.kt) reads$HOME; JDK 21'suser.homecomes fromgetpwuidand ignores it, which would break harness isolation (HOME=$(mktemp -d) amy --account alice init). JVM tests use theamy.homesystem property seam instead.
Adding a command
Copy the shape of a real one, e.g. commands/FollowCommand.kt: a USAGE constant, parse with
Args (positional, flag, longFlag, …, then args.rejectUnknown()),
Context.open(dataDir).use { ctx -> ctx.prepare(); … }, call into commons/quartz, publish with
ctx.publish or read with ctx.drain, emit one map. Commands are suspend fun; main already
runs runBlocking. Multi-verb groups dispatch through route(...) in commands/Router.kt.
Wire-up: a branch in Main.kt's dispatch (marmot sub-verbs go in marmotDispatch), lines in
printUsage() and printVerbList(), a row in cli/README.md, the status in cli/ROADMAP.md, and
a harness case under cli/tests/ when wire behaviour changes.
Don't re-invent what exists: user identifiers via ctx.requireUserHex (or quartz
nip05DnsIdentifiers/resolveUserHexOrNull); rendering via commons rendering/
(EventRendererRegistry, json/JsonEventFormatter); event lookup and loading via commons
relayClient/oneshot/ (OneShotNoteCache, EventLocator, ThreadLoader, NotificationsLoader,
over OneShotRelayAccess; amy's adapter is NoteSupport.access(ctx)); builders in commons
actions/ and model/.
Relay checks
Every relay query, publish or relay debugging step goes through the repo-built amy
(./gradlew :cli:installDist, then cli/build/install/amy/bin/amy), never nak, websocat, a
WebSocket script or the Homebrew amy (stale, ignores AMY_BOOTSTRAP_RELAYS). amy runs the
app's relay client, so its answer is the app's: nostr.wine refuses nak (Go's Go-http-client
user agent gets HTTP 403) but serves Amethyst, and that once got a healthy relay called dead.
- Read-only: run it anonymous, with no account:
HOME=<scratch dir> amy --json fetch --kind K --author HEX --tag d=X --relay wss://…. With an account (the default one included) a relay's NIP-42 challenge makesamysign, which can prompt the reader's real bunker and time out (`User didn't accept or
Установить amy-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл amy-expert?
amy CLI in cli/: adding an `amy <verb>` command, Main.kt dispatch, Output.emit/--json contract, exit codes 0/1/2/124, ~/.amy layout, cli/tests harnesses. Use when touching cli/ or querying/debugging a relay (not nak). Logic goes to commons/quartz.
Как установить скилл amy-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл amy-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic