/ios-skills:arimunandar--code-review-checklistfrom ios-skills
Systematic code review guidelines for iOS/Swift covering architecture (VIP+W pattern), memory management, retain cycles, thread safety, and best practices.
Ships in ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Comprehensive checklist for reviewing iOS/Swift code. Use this systematically to ensure thorough reviews.
!)✅ CORRECT ❌ INCORRECT
─────────────────────────────────────────────────────────────
ViewController only displays ViewController has business logic
Interactor orchestrates logic Interactor makes API calls directly
Worker handles async operations Worker knows about Presenter
Presenter formats for display Presenter has business logic
Router handles navigation Navigation in ViewController
Review Questions:
interactor?.methodName(request:)?// ✅ GOOD - Protocol-based dependency
protocol UserServiceProtocol {
func fetchUser(id: String) async throws -> User
}
class UserInteractor {
private let service: UserServiceProtocol // Abstraction
init(service: UserServiceProtocol) {
self.service = service
}
}
// ❌ BAD - Concrete dependency
class UserInteractor {
private let service = UserService() // Concrete type
}
Checklist:
// ❌ RETAIN CYCLE
button.onTap = {
self.handleTap() // Strong capture
}
// ✅ FIXED
button.onTap = { [weak self] in
self?.handleTap()
}
Checklist:
[weak self] or [unowned self]weakdeinit// Add to ViewControllers during development
deinit {
print("✅ \(Self.self) deallocated")
}
Review for:
deinit logging (development)// ❌ WRONG - UI update from background
Task {
let data = await fetchData()
label.text = data.title // Crash risk!
}
// ✅ CORRECT
Task {
let data = await fetchData()
await MainActor.run {
label.text = data.title
}
}
// ✅ ALSO CORRECT
@MainActor
func updateUI(with data: Data) {
label.text = data.title
}
Checklist:
// ✅ GOOD - Actor for shared mutable state
actor UserCache {
private var cache: [String: User] = [:]
func get(_ id: String) -> User? {
cache[id]
}
func set(_ user: User) {
cache[user.id] = user
}
}
// ❌ BAD - Silent failure
func loadData() {
do {
let data = try fetchData()
process(data)
} catch {
// Silent failure!
}
}
// ❌ BAD - Force try
func loadData() {
let data = try! fetchData() // Crash if error
}
// ✅ GOOD - Proper handling
func loadData() {
do {
let data = try fetchData()
process(data)
} catch {
presenter?.presentError(error)
}
}
Checklist:
try! or try? without justification// ✅ GOOD - Explicit success/failure
func authenticate() async -> Result<User, AuthError> {
do {
let user = try await worker.login()
return .success(user)
} catch let error as AuthError {
return .failure(error)
} catch {
return .failure(.unknown)
}
}
// ❌ DANGEROUS
let name = user.name!
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")!
// ✅ SAFE
guard let name = user.name else { return }
guard let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") as? MyCell else {
fatalError("Cell not registered") // Explicit failure with message
}
// ✅ ALSO GOOD - Nil coalescing
let name = user.name ?? "Unknown"
Checklist:
! force unwraps (except IBOutlets)// ❌ AVOID (except IBOutlets)
var viewModel: ViewModel!
// ✅ PREFER
var viewModel: ViewModel? // Or make non-optional with proper init
// ✅ GOOD NAMES
func fetchUser(byID id: String) -> User?
var isLoading: Bool
let maximumRetryCount = 3
class UserProfileViewController
protocol UserServiceProtocol
// ❌ BAD NAMES
func getUser(_ id: String) -> User? // Missing label
var loading: Bool // Not a question
let MAX_RETRY = 3 // Not camelCase
class UserProfileVC // Abbreviated
protocol UserServiceDelegate // Wrong suffix for non-delegate
Checklist:
fetchUser, updateProfileisLoading, hasError, canSubmitmaximumCount, not MAX_COUNTUserProfileProtocol suffix for abstractions, Delegate for delegates| Component | Naming Pattern |
|---|---|
| ViewController | LoginViewController |
| Interactor | LoginInteractor |
| Presenter | LoginPresenter |
| Worker | LoginWorker |
| Router | LoginRouter |
| Models | Login.Request, Login.Response, Login.ViewModel |
| Protocols | LoginDisplayLogic, LoginBusinessLogic |
// ❌ SLOW - Multiple passes
let filtered = users.filter { $0.isActive }
let mapped = filtered.map { $0.name }
let sorted = mapped.sorted()
// ✅ FAST - Single pass with lazy
let result = users.lazy
.filter { $0.isActive }
.map { $0.name }
.sorted()
Checklist:
lazy for chained operationsfirst(where:) instead of filter().firstcontains(where:) instead of filter().isEmpty == false// ❌ BAD - Load full image for thumbnail
imageView.image = UIImage(named: "large_photo")
// ✅ GOOD - Downscale to display size
imageView.image = UIImage(named: "large_photo")?.downscaled(to: imageView.bounds.size)
Checklist:
// ❌ BAD - Hardcoded secrets
let apiKey = "sk_live_abc123"
// ✅ GOOD - From secure storage
let apiKey = KeychainService.shared.get("api_key")
// ❌ BAD - Logging sensitive data
print("User token: \(token)")
// ✅ GOOD - Masked logging
print("User authenticated successfully")
Checklist:
// ✅ GOOD - Secure file storage
let fileURL = try FileManager.default.url(
for: .applicationSupportDirectory,
in: .userDomainMask,
appropriateFor: nil,
create: true
)
try data.write(to: fileURL, options: .completeFileProtection)
| Principle | Check |
|---|---|
| Single Responsibility | Does this class/function do ONE thing? |
| Open/Closed | Can behavior be extended without modification? |
| Liskov Substitution | Can subclasses replace base classes? |
| Interface Segregation | Are protocols focused and minimal? |
| Dependency Inversion | Are we depending on abstractions? |
// ❌ BAD
if retryCount > 3 { ... }
view.layer.cornerRadius = 8
// ✅ GOOD
private let maximumRetryCount = 3
private enum Layout {
static let cornerRadius: CGFloat = 8
}
if retryCount > maximumRetryCount { ... }
view.layer.cornerRadius = Layout.cornerRadius
// ✅ GOOD TEST - Clear naming, single assertion
func test_authenticate_withInvalidPassword_shouldReturnError() {
// Arrange
let request = Login.Request(email: "[email protected]", password: "wrong")
mockWorker.result = .failure(.invalidCredentials)
// Act
sut.authenticate(request: request)
// Assert
XCTAssertTrue(mockPresenter.presentErrorCalled)
}
// ❌ BAD TEST - Multiple assertions, unclear name
func testLogin() {
sut.authenticate(request: request)
XCTAssertTrue(mockPresenter.called)
XCTAssertEqual(mockPresenter.result, expected)
XCTAssertFalse(mockPresenter.errorCalled)
}
🔴 **Change Required**
[Description of issue]
**Current:**
```code```
**Suggested:**
```code```
**Reason:** [Why this change is needed]
🟡 **Suggestion**
Consider [suggestion] because [reason].
This would [benefit].
🔵 **Question**
Could you explain [specific part]?
I'm wondering about [concern].
🟢 **LGTM**
Looks good! Nice work on [specific positive aspect].
| Level | Icon | Meaning | Action |
|---|---|---|---|
| Blocker | 🔴 | Must fix before merge | Requires changes |
| Warning | 🟡 | Should fix, can discuss | Suggestion |
| Info | 🔵 | FYI, question | Discussion |
| Praise | 🟢 | Good work | Approval |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jordancoin/ios-skills-collection --plugin ios-skills2 plugins ship this exact skill · first indexed Sep 10, 2026
206 skills in this plugin
/aso-appstore-screenshotsGenerate high-converting App Store screenshots by analyzing your app's codebase, discovering core benefits, and creating ASO-optimized screenshot images using Nano Banana Pro./cleanseReview code for readability, then simplify it to be easy to follow and understand. Use this skill when the user wants to simplify code, improve readability, clean up for handoff, make code skimmable, reduce complexity, refactor for clarity, strip boilerplate, prepare code for future maintainers, or make a codebase easier to pick up. Trigger liberally — any request touching readability, simplification, cleanup, or "make this easier to understand" should use this skill. Also trigger when the user says things like "review this", "clean this up", "tidy this", "make this simpler", "reduce complexity", "flatten this", "strip the noise", or "I want to understand this code quickly next time I open it".
/critical-reasoningApply critical rationalist epistemology (Popper, Deutsch) to evaluate reasoning, identify errors, and refine understanding. Use when the user explicitly requests help with reasoning - phrases like "help me think this through", "does this make sense", "any flaws in this", "what am I missing", "critique this", "is this reasoning sound", "stress test this idea", "devil's advocate", or any request to evaluate arguments, identify logical problems, or improve thinking. Also use when errors in reasoning are significant enough to materially affect the user's goals, even if not explicitly requested.Other plugins' skills for the same job