ios-code-review/SKILL.md
Review Swift and iOS code for best practices, bugs, security issues, and architectural concerns. Use when reviewing pull requests, auditing code quality, checking Swift conventions, finding potential bugs, or ensuring iOS best practices. Triggers on code review, review this, check this code, PR review, audit, Swift best practices.
npx skillsauth add abanoub-ashraf/manus-skills-import ios-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior iOS engineer conducting thorough code reviews. When this skill activates, analyze code for correctness, maintainability, performance, and security.
// 🚫 Avoid force unwrapping
let name = user!.name
// ✅ Safe unwrapping
guard let user = user else { return }
let name = user.name
// ✅ Or provide default
let name = user?.name ?? "Unknown"
// 🚫 Strong reference cycle
class ViewModel {
var onUpdate: (() -> Void)?
func setup() {
service.onChange = {
self.refresh() // Retains self
}
}
}
// ✅ Weak capture
service.onChange = { [weak self] in
self?.refresh()
}
// 🚫 Wrong actor
func updateUI() async {
label.text = await fetchData() // Not on MainActor!
}
// ✅ Correct actor annotation
@MainActor
func updateUI() async {
label.text = await fetchData()
}
// Or explicit hop
func updateUI() async {
let data = await fetchData()
await MainActor.run {
label.text = data
}
}
// 🚫 State in wrong place
struct ParentView: View {
var body: some View {
ChildView() // Child has its own @State that should be here
}
}
// ✅ State lifted to appropriate level
struct ParentView: View {
@State private var value = ""
var body: some View {
ChildView(value: $value)
}
}
// 🚫 Silently ignoring errors
do {
try riskyOperation()
} catch {
// Empty catch - why?
}
// ✅ Proper error handling
do {
try riskyOperation()
} catch {
logger.error("Operation failed: \(error)")
showErrorAlert(error)
}
// 🚫 Everything public
public class UserManager {
public var users: [User] = []
public func internalHelper() { }
}
// ✅ Minimal exposure
public class UserManager {
public private(set) var users: [User] = []
private func internalHelper() { }
}
// 🚫 Magic numbers
view.layer.cornerRadius = 8
padding = 16
// ✅ Named constants
extension CGFloat {
static let cornerRadius: CGFloat = 8
static let standardPadding: CGFloat = 16
}
view.layer.cornerRadius = .cornerRadius
💡 **Suggestion**: Consider using [approach] here because [reason].
Current:
\`\`\`swift
[current code]
\`\`\`
Suggested:
\`\`\`swift
[suggested code]
\`\`\`
⚠️ **Issue**: [Description of problem]
This could cause [consequence].
Recommended fix:
\`\`\`swift
[fixed code]
\`\`\`
🚨 **Critical**: [Description]
This [security issue/crash/data loss risk] must be fixed before merge.
Required change:
\`\`\`swift
[required code]
\`\`\`
✨ **Nice**: Great use of [pattern/technique] here! This makes the code [benefit].
## Code Review Summary
### Overview
[Brief description of what was reviewed]
### Verdict: [Approve / Request Changes / Needs Discussion]
### Critical Issues (0)
[List or "None found"]
### Suggested Improvements
1. [file:line] - [Description]
### Minor Nits
1. [file:line] - [Description]
### Highlights
- [What was done well]
### Testing Checklist
- [ ] Unit tests cover new functionality
- [ ] UI tests for user flows
- [ ] Edge cases handled
- [ ] Error scenarios tested
development
Design principles for building polished, native-feeling SwiftUI apps and widgets. Use this skill when creating or modifying SwiftUI views, iOS widgets (WidgetKit), or any native Apple UI. Ensures proper spacing, typography, colors, and widget implementations that look and feel like quality apps rather than AI-generated slop.
data-ai
Design and implement SwiftUI views, components, and app architecture. Use when creating new SwiftUI views, implementing MVVM/TCA patterns, managing state with @Observable, @State, @Binding, or @Environment, designing navigation flows, or structuring iOS app architecture. Triggers on SwiftUI, view model, state management, navigation, coordinator pattern.
development
Implement, review, or improve SwiftUI animations and transitions. Use when adding implicit or explicit animations with withAnimation, configuring spring animations (.smooth, .snappy, .bouncy), building phase or keyframe animations with PhaseAnimator/KeyframeAnimator, creating hero transitions with matchedGeometryEffect or matchedTransitionSource, adding SF Symbol effects (bounce, pulse, variableColor, breathe, rotate, wiggle), implementing custom Transition or CustomAnimation types, or ensuring animations respect accessibilityReduceMotion.
testing
Audit SwiftUI views for accessibility (iOS + macOS) with patch-ready fixes