Comprehensive iOS SDK code review for Payoo iOS Frameworks. Checks Clean Architecture patterns, MVVM implementation, UseCase patterns, memory management, naming conventions, API design, and Swift best practices. Use when "review code", "check code", "code review", "review PR", or analyzing Swift files in this project.
Performs comprehensive iOS SDK code reviews for Payoo frameworks, checking Clean Architecture, MVVM patterns, memory management, and Swift best practices. Activates when reviewing Swift files or using commands like "review code", "check PR", or "code review".
/plugin marketplace add daispacy/py-claude-marketplace/plugin install py-plugin@py-claude-marketplaceThis skill is limited to using the following tools:
examples.mdstandards.mdtemplates.mdPerform comprehensive code reviews for Payoo iOS Frameworks following Clean Architecture, MVVM, and iOS SDK best practices.
Determine what's being reviewed:
Clean Architecture Compliance:
MVVM Pattern:
{Feature}ViewModelType){Feature}ViewModelDelegate)UseCase Pattern:
Retain Cycles:
weak[weak self] or [unowned self] appropriatelydeinitExample issues:
// ❌ BAD: Strong delegate reference
var delegate: SomeDelegate?
// ✅ GOOD: Weak delegate reference
weak var delegate: SomeDelegate?
// ❌ BAD: Strong self in closure
viewModel.loadData { data in
self.updateUI(data)
}
// ✅ GOOD: Weak self in closure
viewModel.loadData { [weak self] data in
self?.updateUI(data)
}
Constructor Injection:
initExample:
// ✅ GOOD: Constructor injection
final class DepositViewModel {
private let depositAmountUC: DepositAmountUseCase
private let bankAccountUC: BankAccountUseCase
init(depositAmountUC: DepositAmountUseCase,
bankAccountUC: BankAccountUseCase) {
self.depositAmountUC = depositAmountUC
self.bankAccountUC = bankAccountUC
}
}
// ❌ BAD: Service locator pattern
let service = ServiceLocator.shared.depositService
File Names:
{Feature}ViewModel.swift{Feature}ViewController.swift{Feature}UseCase.swift{Feature}DataSource.swift{Name}Cell.swiftClass/Protocol Names:
Type for interfaces: DepositViewModelTypeDelegate: DepositViewModelDelegateVariables:
context for PayooEwalletContext{name}UC for UseCase instances: depositAmountUCFor SDK Public APIs:
public, internal, private)Error Handling:
// ✅ GOOD: Proper error handling
enum DepositError: Error, LocalizedError {
case outOfRange(bank: String, min: Double, max: Double)
var errorDescription: String? {
switch self {
case .outOfRange(let bank, let min, let max):
return "Amount out of range for \(bank): \(min)-\(max)"
}
}
}
// ❌ BAD: Generic errors
throw NSError(domain: "Error", code: -1, userInfo: nil)
Code Quality:
!) unless absolutely safeguard let for early returnslet over varfinal for classes not meant to be subclassedSwiftLint Compliance:
Internal/External Builds:
#if INTERNAL#if INTERNAL
// Internal-only features
func debugFunction() { }
#endif
L10n.* (SwiftGen)// ✅ GOOD: Localized strings
let title = L10n.Deposit.Navigation.deposit
let message = L10n.Message.Deposit.outOfRange(min, max, bank)
// ❌ BAD: Hardcoded strings
let title = "Deposit"
Provide review as structured report:
## Code Review: {FileName}
### ✅ Strengths
- [List what's done well]
### ⚠️ Issues Found
#### 🔴 Critical Issues
**Issue:** [Description]
**Location:** {File}:{Line}
**Impact:** [Why this matters]
**Fix:**
\```swift
// Current code
[problematic code]
// Suggested fix
[fixed code]
\```
#### 🟡 Warnings
**Issue:** [Description]
**Location:** {File}:{Line}
**Suggestion:** [How to improve]
#### 🔵 Suggestions
**Enhancement:** [Description]
**Benefit:** [Why this would help]
### 📊 Summary
- Critical Issues: X
- Warnings: Y
- Suggestions: Z
- Overall: [Pass/Needs Work/Fail]
### 🎯 Priority Actions
1. [Most important fix]
2. [Second priority]
3. [Third priority]
{Name}ViewModelType){Name}ViewModelDelegate)weakinit[weak self]analyticsFeature, analyticsScreenName)weakviewDidLoad or dedicated methodIf you need to review specific patterns across the codebase:
# Find all ViewModels
grep -r "class.*ViewModel" --include="*.swift" PayooEwallet/
# Find potential retain cycles (strong self in closures)
grep -r "{ self\." --include="*.swift" PayooEwallet/
# Find force unwraps
grep -r "!" --include="*.swift" PayooEwallet/ | grep -v "!="
# Find hardcoded strings
grep -r "\"[A-Z]" --include="*.swift" PayooEwallet/ | grep -v "L10n"