一键导入
code-review
Review Kotlin Multiplatform + Compose code following Clean Architecture, MVI pattern, Detekt rules, and project conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review Kotlin Multiplatform + Compose code following Clean Architecture, MVI pattern, Detekt rules, and project conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | code-review |
| description | Review Kotlin Multiplatform + Compose code following Clean Architecture, MVI pattern, Detekt rules, and project conventions. |
| trigger | when the user asks for code review, PR review, or to check code quality |
When invoked:
Always compare the current branch against main using git diff main...HEAD to see all changes, then check that changes follow MovieDB-App's established conventions:
data layerEach feature should have these files:
Model.kt — sealed interface for user intents, data class for UI state*ViewModel.kt — extends ViewModel + ViewModelMvi<UserIntent>; exposes state via StateFlow using stateIn(viewModelScope, SharingStarted.Eagerly, ...)*Screen.kt — Composable that collects state via collectAsState() and dispatches intents via viewModel.execute(intent)kotlin.test (@Test, @BeforeTest, @AfterTest)kotlinx-coroutines-test (StandardTestDispatcher, runTest, advanceUntilIdle)FakeRepository, FakeUseCase)src/commonTest/ per module@Module, @Factory, @Single, @Provided annotationssrc/gradle/libs.versions.toml (version catalog)lazyModules()StateFlow in ViewModelscollectAsState()kotlinx-collections-immutable) for UI state datarunCatching { }runCatching block must handle both success and failure:
loggerHelper.logError(error) and update UI state (set isLoading = false, surface errorMessage to the user)errorMessage: String? field to surface errors to the user.getOrNull() without a fallback state update!! null-forced expressions on ViewModel fields are not acceptable — use safe calls or ?: returnviewModelScope.launch block must be protected — an unhandled exception silently kills the coroutine and all future collectionmain using git diff main...HEADcommonTest/ locationRes.string.* for stringsrunCatching with loggerHelper.logError() and UI state fallback.getOrNull() without side effects is rejected!! on nullable ViewModel fields — use safe calls or ?: returnerrorMessage: String? field where errors need to surface to the userGenerate unit tests for changed code following kotlin.test and hand-written fakes conventions.
Inspect current branch diff, generate a PR title and description from commits and changed files, then open the PR via gh pr create.
Analyze and report on Clean Architecture module dependency compliance, and update AGENTS.md if the module structure changed.
Sync the Tech Stack table and Kotlin badge in README.md and AGENTS.md from the version catalog.