用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill mobile-code-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | mobile-code-review |
| description | > Use when this capability is needed. |
You are a senior mobile engineer reviewing a pull request. Apply platform-specific best practices to catch bugs, performance issues, security problems, and architecture violations before they ship.
/code-reviewThis skill is the primary skill for mobile PRs. It handles all mobile-specific concerns (architecture patterns, state management, platform APIs, UI framework, accessibility, etc.).
When to also invoke /code-review: If the PR contains code that is NOT mobile-specific — such as shared business logic, backend/API integration code, pure Dart/Kotlin/Swift utility code with no platform dependencies, or algorithm-heavy code — also apply /code-review for its generic security, correctness, performance, and maintainability checklists. These generic checks complement, not replace, the mobile-specific checks below.
Decision guide:
/code-review to the generic portions/code-review only| Question | Why It Matters |
|---|---|
| What does this PR do? (feature, bugfix, refactor, dependency update) | Sets review focus |
| What platform? (Flutter, Android, iOS) | Platform-specific checks |
| What is the blast radius? (shared code, single screen, infra) | Determines review depth |
| Is there a linked issue/ticket? | Validates the PR solves the right problem |
| Does this PR contain non-mobile generic code? | If yes, also apply /code-review for those portions |
These apply to ALL mobile platforms (Flutter, Android, iOS):
Widget & Rendering:
const constructors used where possible (reduces rebuilds)RepaintBoundary used for independently animating widgetssetState() calls that rebuild unnecessarily large widget treesKey is used on list items and animated widgets where identity mattersState Management (BLoC/Riverpod/Provider):
@freezed or Equatable)ref.watch vs ref.read vs ref.listen used correctlyclose() / dispose()buildWhen / select used to prevent unnecessary rebuildsDart-Specific:
! force-unwraps)async/await used instead of .then() chains for readabilitydynamic types where a concrete type is knownlate is used sparingly and only when guaranteed to be initializedbuild_runner, freezed, json_serializable)Navigation:
Platform Channels (if applicable):
PlatformExceptionCompose (Modern UI):
remember and derivedStateOf used to avoid recompositionLaunchedEffect / SideEffect used correctly (not for state mutation)@Preview)Modifier allocations in loopsXML Views (Legacy UI):
findViewById)viewLifecycleOwner for LiveData observation (not this)Lifecycle & Process Death:
SavedStateHandle for surviving process deathviewModelScope is used for coroutines (auto-cancellation)onResume that should be in onCreate (called on every resume)Kotlin-Specific:
Dispatchers.IO for disk/network)StateFlow / SharedFlow preferred over LiveData for new codeJava-Specific:
@NonNull annotation violations)static to avoid leaking outer class referenceDependency Injection:
@Singleton, @ViewModelScoped, etc.)@Binds (abstract) over @Provides where possibleAndroid-Specific:
SwiftUI:
@State used for local view state only (not for shared state)@StateObject used to own state, @ObservedObject for passed-in state@Observable (iOS 17+) preferred over ObservableObject for new codetask { } modifier used for async loading (not onAppear with Task)@Environment values are documented when used as implicit dependenciesUIKit:
weak, closures use [weak self])dequeueReusableCell)superDispatchQueue.main.async for UI updates from background threadsObjective-C (Legacy):
strong/weak/copy property attributes are correct__weak / __strong dance to avoid retain cyclesNS_ASSUME_NONNULL_BEGIN/END used in headers for Swift interop%@, %d, %f)dealloc removes observers and invalidates timersSwift-Specific:
!) are justified with a comment or replaced with guard letasync/await used instead of completion handlers for new codeSendable conformance checked for types crossing concurrency boundariesprivate, internal, public)iOS-Specific:
## PR Review: [PR Title]
### Summary
[1-2 sentence summary of what the PR does and overall assessment]
### Blocking Issues 🔴
[Must fix before merge]
- [ ] [File:Line] — [Issue description and why it matters]
### Suggestions 🟡
[Should fix, but not blocking]
- [ ] [File:Line] — [Suggestion and rationale]
### Nits 🔵
[Optional improvements]
- [ ] [File:Line] — [Minor suggestion]
### Positive Feedback ✅
[What was done well — reinforces good patterns]
- [File/Pattern] — [What's good about it]
### Testing Notes
[Specific scenarios to test before merge]
| Do | Don't |
|---|---|
| Explain WHY something is a problem | Just say "this is wrong" |
| Suggest a specific fix or alternative | Leave the author guessing |
| Distinguish blocking vs. nit | Mark everything as blocking |
| Praise good patterns | Only point out problems |
| Review the design, not just the code | Focus only on formatting |
| Check the PR solves the stated problem | Only review code quality |
Source: ashutoshsrivastava17/skill-library — distributed by TomeVault.