compose-expert
БесплатноБез исполняемых скриптовНе проверенShared Compose UI in `commonsUI/`: screens, components, the nav shell (`ScreenLayoutSpec`, `AppShellLayout`, Navigation 3 back stacks), component catalog…
Об этом скилле
compose-expert
Where shared Compose UI lives in Amethyst and the house rules for it. What goes in
commons vs commonsUI vs a platform shim is in AGENTS.md ("Sharing Philosophy",
"Feature Workflow") and commonsUI/ARCHITECTURE.md; this skill does not repeat it.
Delegate: Activity / manifest / flavors -> android-expert; Window, tray, menu bar ->
desktop-expert; source-set placement, expect/actual, extracting an Android composable ->
kotlin-multiplatform; feeds and Account state -> account-state; Flow and coroutine
scopes -> kotlin-coroutines.
Where things live
All paths below are under
commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/.
| What | Where |
|---|---|
| Screens | ui/screen/loggedIn/<feature>/ (and ui/screen/ for shared feed views) |
| Reusable components | ui/components/ (catalog: references/shared-composables-catalog.md) |
| Feed scaffolding | ui/feeds/ (RenderFeedContentState, RefresheableBox, FeedEmpty, LoadingFeed) |
| Note rendering | ui/note/ (NoteCompose), rich text in ui/richtext/ + ui/components/RichTextViewer.kt |
| Theme | ui/theme/ (AmethystColorScheme.kt palettes + ColorScheme.* tokens, ColorScheme.isLight, Shape.kt, Type.kt) |
| Window tiers | ui/layouts/ScreenLayout.kt (ScreenLayoutSpec, LocalScreenLayout, FeedContentMaxWidth) |
| Shell + nav | ui/app/AmethystApp.kt, ui/app/AppRoot.kt, ui/navigation/ (see below) |
| Platform ports for UI | ui/platform/AppPlatform.kt (LocalAppPlatform), ui/components/PlatformPermission.kt |
| Icons | icons/ (Amethyst glyph font) and icons/symbols/ (MaterialSymbols, AmethystIcons) |
| Robohash avatars | robohash/ (CachedRobohash, RobohashAssembler, parts/) |
| Strings | commonsUI/src/commonMain/composeResources/values/strings.xml -> Res.string.* (rules: AGENTS.md "Strings") |
The Android app's AmethystTheme wrapper is still in
amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Theme.kt; the palettes it
applies are shared.
The shell and window tiers
One shell for every window, chosen by size, not by platform (AGENTS.md "Navigation Shell"):
AmethystApp(ui/app/AmethystApp.kt) is the root both front ends call. Android'sMainActivitypassesAndroidAppRoot; the desktop window (AmethystDesktop.kt) passes aDesktopAppRoot.AppRoot(ui/app/AppRoot.kt) is the port each platform implements:createAccountViewModel,rememberScreenLayoutSpec,registerDestinations,ShellOverlay,NavigationEffects, ...ScreenLayoutSpec.navigationStyleisBOTTOM_BAR,NAV_RAILorPERMANENT_DRAWER;hasRoomForNotificationPaneldocks the notification panel.isLargeScreenis "not the bottom bar". Read it withLocalScreenLayout.current, never with a platform check.AppShellLayout(ui/navigation/shell/) lays out the bar / rail / drawer;ui/navigation/bottombars/holdsAppBottomBarandAppNavigationRail;ui/navigation/deck/DeckArea.ktadds the opt-in deck columns on windows of 1,200 dp+.
Navigation 3
The app owns its back stack as snapshot state; NavDisplay only renders it. No
NavController, no graph. Full rules in references/navigation.md.
- Routes:
@Serializable sealed class Routeincommons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/model/navigation/Routes.kt. The back stack is saved through kotlinx-serialization, so every route argument must be serializable. NavBackStacks(same package) holds the window'sNavModel:StackModel(stack, never empty, starts atRoute.Home;savedTabs, the root of each bottom-bar tab you left),TabsModelorWindowsModel. Every navigation is aNavRequestthe model reads its own way. ANavStackEntry'scontentKeyis"nav-$id": saved state and ViewModels key on it, so the same route opened twice is two screens.Nav(ui/navigation/navs/Nav.kt) implementsINav:nav,navDrawer,newStack,navBottomBar,popBack,popUpTo, each after the keyboard settles (ImeSettler).- Register a screen once with a builder from
ui/navigation/host/NavDestinations.kt. Shared screens go inNavDestinations.sharedDestinations(ui/navigation/host/SharedDestinations.kt); Android-only ones inandroidDestinationsinamethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt. The builder picks the motion and the reading-column cap:
// from SharedDestinations.kt
composableCapped<Route.Home> { HomeScreen(accountViewModel, nav) }
composable<Route.Message> { MessagesScreen(accountViewModel, nav) }
composableFromEnd<Route.Polls> { PollsScreen(accountViewModel, nav) }
composableFromEnd<Route.Browser>(capWidth = false) { BrowserScreen(accountViewModel, nav) }
composableFromBottomArgs<Route.AwardBadge> { AwardBadgeScreen(it.kind, it.pubKeyHex, it.dTag, accountViewModel, nav) }
A route nobody registered fails the first time it is opened
Установить compose-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл compose-expert?
Shared Compose UI in `commonsUI/`: screens, components, the nav shell (`ScreenLayoutSpec`, `AppShellLayout`, Navigation 3 back stacks), component catalog, `RichTextParser`, Compose API/perf review. Use when writing or reviewing shared UI.
Как установить скилл compose-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл compose-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic