$npx -y skills add tornikegomareli/UIKit-Agent-Skill --skill uikit-maxComprehensively reviews UIKit code for best practices on modern APIs, architecture, and performance. Use when reading, writing, or reviewing UIKit-based iOS projects, including UIViewController, UITableView, UICollectionView, Auto Layout, or programmatic UI code. Also use when mi
| 1 | Review Swift and UIKit code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems — do not nitpick or invent issues. |
| 2 | |
| 3 | Review process: |
| 4 | |
| 5 | 1. Check for deprecated API using `references/api.md`. |
| 6 | 1. Check that views, subclassing, and composition patterns follow best practices using `references/views.md`. |
| 7 | 1. Validate Auto Layout usage and constraint patterns using `references/layout.md`. |
| 8 | 1. Ensure view controller lifecycle and architecture are correct using `references/controllers.md`. |
| 9 | 1. Ensure navigation patterns are modern and maintainable using `references/navigation.md`. |
| 10 | 1. Validate UITableView and UICollectionView usage using `references/tableview-collectionview.md`. |
| 11 | 1. Ensure the code uses designs that are accessible and compliant with Apple's Human Interface Guidelines using `references/design.md`. |
| 12 | 1. Validate accessibility compliance including Dynamic Type, VoiceOver, and traits using `references/accessibility.md`. |
| 13 | 1. Ensure the code runs efficiently using `references/performance.md`. |
| 14 | 1. Check concurrency and thread safety using `references/concurrency.md`. |
| 15 | 1. Quick validation of Swift code using `references/swift.md`. |
| 16 | 1. Final code hygiene check using `references/hygiene.md`. |
| 17 | |
| 18 | If doing a partial review, load only the relevant reference files. |
| 19 | |
| 20 | |
| 21 | ## Core Instructions |
| 22 | |
| 23 | - iOS 26 exists and is the latest iOS version. Target iOS 17 or later as the minimum deployment target for new code, unless the project specifies otherwise. |
| 24 | - Target Swift 6.2 or later, using modern Swift concurrency. |
| 25 | - **Respect the project's deployment target.** Before suggesting a modern API, check its availability. If the project targets an older iOS version, recommend the best available alternative and wrap newer APIs in `if #available` checks. Reference files mark key APIs with their iOS version (e.g., "iOS 15+"). Do not suggest APIs unavailable at the project's minimum target without providing a fallback. |
| 26 | - As a UIKit developer, the user expects UIKit patterns. Do not suggest SwiftUI replacements unless explicitly requested. |
| 27 | - Do not introduce third-party frameworks without asking first. |
| 28 | - Break different types up into different Swift files rather than placing multiple classes, structs, or enums into a single file. |
| 29 | - Use a consistent project structure, with folder layout determined by app features. |
| 30 | - Prefer programmatic UI with Auto Layout anchors over Storyboards and XIBs for new code, unless the project already uses Interface Builder extensively. |
| 31 | |
| 32 | |
| 33 | ## Output Format |
| 34 | |
| 35 | Organize findings by file. For each issue: |
| 36 | |
| 37 | 1. State the file and relevant line(s). |
| 38 | 2. Name the rule being violated (e.g., "Use `UIAlertController` instead of `UIAlertView`"). |
| 39 | 3. Show a brief before/after code fix. |
| 40 | |
| 41 | Skip files with no issues. End with a prioritized summary of the most impactful changes to make first. |
| 42 | |
| 43 | Example output: |
| 44 | |
| 45 | ### ProfileViewController.swift |
| 46 | |
| 47 | **Line 8: Use `UIAlertController` instead of deprecated `UIAlertView`.** |
| 48 | |
| 49 | ```swift |
| 50 | // Before |
| 51 | let alert = UIAlertView(title: "Error", message: msg, delegate: self, cancelButtonTitle: "OK") |
| 52 | alert.show() |
| 53 | |
| 54 | // After |
| 55 | let alert = UIAlertController(title: "Error", message: msg, preferredStyle: .alert) |
| 56 | alert.addAction(UIAlertAction(title: "OK", style: .default)) |
| 57 | present(alert, animated: true) |
| 58 | ``` |
| 59 | |
| 60 | **Line 24: Batch constraint activation with `NSLayoutConstraint.activate`.** |
| 61 | |
| 62 | ```swift |
| 63 | // Before |
| 64 | label.topAnchor.constraint(equalTo: view.topAnchor).isActive = true |
| 65 | label.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true |
| 66 | |
| 67 | // After |
| 68 | NSLayoutConstraint.activate([ |
| 69 | label.topAnchor.constraint(equalTo: view.topAnchor), |
| 70 | label.leadingAnchor.constraint(equalTo: view.leadingAnchor) |
| 71 | ]) |
| 72 | ``` |
| 73 | |
| 74 | **Line 42: Set `translatesAutoresizingMaskIntoConstraints = false` before adding constraints.** |
| 75 | |
| 76 | ```swift |
| 77 | // Before |
| 78 | view.addSubview(label) |
| 79 | label.topAnchor.constraint(equalTo: view.topAnchor).isActive = true |
| 80 | |
| 81 | // After |
| 82 | label.translatesAutoresizingMaskIntoConstraints = false |
| 83 | view.addSubview(label) |
| 84 | NSLayoutConstraint.activate([ |
| 85 | label.topAnchor.constraint(equalTo: view.topAnchor) |
| 86 | ]) |
| 87 | ``` |
| 88 | |
| 89 | ### Summary |
| 90 | |
| 91 | 1. **Deprecated API (high):** `UIAlertView` on line 8 must be replaced with `UIAlertController`. |
| 92 | 2. **Layout (medium):** Individual constraint activation on line 24 should use `NSLayoutConstraint.activate`. |
| 93 | 3. **Layout (medium):** Missing `translatesAutoresizingMaskIntoConstraints` on line 42 causes constraint conflicts. |
| 94 | |
| 95 | End of example. |
| 96 | |
| 97 | |
| 98 | ## References |
| 99 | |
| 100 | - `re |