用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Paoapps/fifi --skill fifi-screen命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | fifi-screen |
| description | Scaffold a new KMP screen with FiFi AbstractViewModel (Output/Event/Action pattern). |
Scaffolds a screen using FiFi's AbstractViewModel<Output, Event, Action> pattern.
abstract class FeatureViewModel : AbstractViewModel<
FeatureViewModel.Output,
FeatureViewModel.Event,
FeatureViewModel.Action
>() {
data class Output(
val title: String,
val isLoading: Boolean = false,
)
sealed class Event : AbstractEvent() {
data object Refresh : Event()
}
sealed class Action {
data class Navigate(val route: String) : Action()
}
}
class FeatureViewModelImpl(
private val model: FeatureModel,
) : FeatureViewModel() {
private val _output = createRefreshableFetchFlow(model::data).map { cache ->
Output(
title = "Feature",
isLoading = cache is CacheResult.Loading,
)
}
override val output = _output.viewModelOutput(viewModelScope)
override suspend fun handleEvent(event: Event) = when (event) {
Event.Refresh -> { refresh(); null }
}
}
viewModel<FeatureViewModel> { FeatureViewModelImpl(get()) }
ViewModelComposable(viewModel) { output -> /* Compose */ }ObservableViewModel wrapper — call viewModel.clear() in deinitviewModel.testOutput { assertEquals("Feature", title) }
viewModel.testActions { emit -> emit(Event.Refresh) }