快速审核

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用

审查 Swift/iOS 代码(SwiftUI、UIKit、Combine) 评估 iOS 架构(MVVM、TCA、VIPER) App Store 合规性审查 iOS 性能和内存审查

建筑

[ ] 一致应用 MVVM 或 TCA 架构 [ ] 视图模型不导入 UIKit/SwiftUI [ ] 面向协议的依赖设计 [ ] 导航的协调器模式(如果 UIKit ) [ ] @EnvironmentObject / @StateObject 正确使用

斯威夫特最佳实践

[ ] 值类型 (struct) 优于引用类型 (class) [ ] let 优于var(不变性) [ ] 早期返回的保护子句 [ ] Result<Success, Failure> 用于错误处理 [ ] Codable 用于 JSON 解析(非手动解析)

斯威夫特用户界面

[ ] 视图很小且可组合(< 50 行正文) [ ] @State 用于本地,@Binding 用于父子,@ObservedObject 用于注入 [ ] body 中没有大量计算(使用 .task {} 修饰符) [ ] 所有视图的预览提供程序 [ ] 辅助功能修饰符(.accessibilityLabel, .accessibilityHint)

内存与性能

[ ] 无保留周期(闭包中的[weak self]) [ ] Instruments 分析泄漏 [ ] 调整图像大小以显示大小(非全分辨率) [ ] TableView/CollectionView 单元格重用 [ ] 繁重工作的后台任务 (DispatchQueue.global())

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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)
- [ ] Privacy manifest (`PrivacyInfo.xcprivacy`) included
- [ ] Required device capabilities declared
- [ ] App Transport Security exceptions justified
- [ ] No hardcoded test data in release builds

## Output Format
```markdown
## iOS Review: [Module]
**Health Score**: X/10
### Issues | Improvements | Architecture Notes
```

---
> Source: [camilooscargbaptista/cto-toolkit](https://github.com/camilooscargbaptista/cto-toolkit) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。