Swift 审查
- 作者仓库星标 0
- 作者仓库 skills-registry
Swift / iOS Code Review
When to Use
- Reviewing Swift/iOS code (SwiftUI, UIKit, Combine)
- Evaluating iOS architecture (MVVM, TCA, VIPER)
- App Store compliance review
- iOS performance and memory review
Review Checklist
Architecture
- MVVM or TCA architecture consistently applied
- View models don't import UIKit/SwiftUI
- Protocol-oriented design for dependencies
- Coordinator pattern for navigation (if UIKit)
-
@EnvironmentObject/@StateObjectused correctly
Swift Best Practices
- Value types (
struct) preferred over reference types (class) -
letpreferred overvar(immutability) - Guard clauses for early returns
-
Result<Success, Failure>for error handling -
Codablefor JSON parsing (not manual parsing) -
async/awaitinstead of completion handlers (iOS 15+) - Property wrappers for common patterns
- Access control (
private,internal,public) enforced
SwiftUI
- Views are small and composable (< 50 lines body)
-
@Statefor local,@Bindingfor parent-child,@ObservedObjectfor injected - No heavy computation in
body(use.task {}modifier) - Preview providers for all views
- Accessibility modifiers (
.accessibilityLabel,.accessibilityHint) - Dark mode support verified
Memory & Performance
- No retain cycles (
[weak self]in closures) -
Instrumentsprofiled for leaks - Images resized to display size (not full resolution)
- TableView/CollectionView cell reuse
- Background tasks for heavy work (
DispatchQueue.global()) - Core Data batch operations for large datasets
App Store Guidelines
- No private APIs used
- In-App Purchase for digital goods (not external links)
- Privacy manifest (
PrivacyInfo.xcprivacy) included - Required device capabilities declared
- App Transport Security exceptions justified
- No hardcoded test data in release builds
Output Format
## iOS Review: [Module]
**Health Score**: X/10
### Issues | Improvements | Architecture Notes
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: camilooscargbaptista/cto-toolkit — distributed by TomeVault.
- 流狐分类
- 工程开发
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Reviewing Swift/iOS code (SwiftUI, UIKit, Combine) Evaluating iOS architecture (MVVM, TCA, VIPER) App Store compliance review
Review Checklist
[ ] MVVM or TCA architecture consistently applied [ ] View models don't import UIKit/SwiftUI [ ] Protocol-oriented design for dependencies
[ ] Value types (struct) preferred over reference types (class) [ ] let preferred over var (immutability) [ ] Guard clauses for early returns
[ ] Views are small and composable (< 50 lines body) [ ] @State for local, @Binding for parent-child, @ObservedObject for injected [ ] No heavy computation in body (use .task {} modifier)
[ ] No retain cycles ([weak self] in closures) [ ] Instruments profiled for leaks [ ] Images resized to display size (not full resolution)
# Swift / iOS Code Review
## When to Use
- Reviewing Swift/iOS code (SwiftUI, UIKit, Combine)
- Evaluating iOS architecture (MVVM, TCA, VIPER)
- App Store compliance review
- iOS performance and memory review
## Review Checklist
### Architecture
- [ ] MVVM or TCA architecture consistently applied
- [ ] View models don't import UIKit/SwiftUI
- [ ] Protocol-oriented design for dependencies
- [ ] Coordinator pattern for navigation (if UIKit)
- [ ] `@EnvironmentObject` / `@StateObject` used correctly
### Swift Best Practices
- [ ] Value types (`struct`) preferred over reference types (`class`)
- [ ] `let` preferred over `var` (immutability)
- [ ] Guard clauses for early returns
- [ ] `Result<Success, Failure>` for error handling
- [ ] `Codable` for JSON parsing (not manual parsing)
- [ ] `async/await` instead of completion handlers (iOS 15+)
- [ ] Property wrappers for common patterns
- [ ] Access control (`private`, `internal`, `public`) enforced
### SwiftUI
- [ ] Views are small and composable (< 50 lines body)
- [ ] `@State` for local, `@Binding` for parent-child, `@ObservedObject` for injected
- [ ] No heavy computation in `body` (use `.task {}` modifier)
- [ ] Preview providers for all views
- [ ] Accessibility modifiers (`.accessibilityLabel`, `.accessibilityHint`)
- [ ] Dark mode support verified
### Memory & Performance
- [ ] No retain cycles (`[weak self]` in closures)
- [ ] `Instruments` profiled for leaks
- [ ] Images resized to display size (not full resolution)
- [ ] TableView/CollectionView cell reuse
- [ ] Background tasks for heavy work (`DispatchQueue.global()`)
- [ ] Core Data batch operations for large datasets
### App Store Guidelines
- [ ] No private APIs used
- [ ] In-App Purchase for digital goods (not external links)
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to Use → Review Checklist → Architecture → Swift Best Practices → SwiftUI → Memory & Performance
要点 -> Health Score
文件/命令 -> @EnvironmentObject · @StateObject · struct · class · let · var · Result<Success, Failure> · Codable
内容 SHA-256 -> 0816e788331f
原文结构
适用与边界
原文中的明确线索
@EnvironmentObject、@StateObject、struct、class、let、var、Result<Success, Failure>、Codable