К основному содержанию
скилл CX Codex

uikit-max — скилл для Claude Code: ревью UIKit-кода

Проверяет UIKit-код на устаревшие API, ошибки Auto Layout и утечки памяти. Пригодится, когда правишь экраны на UIViewController и UITableView.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add tornikegomareli/UIKit-Agent-Skill --skill uikit-max -a claude-code
Открыть на GitHub

Что делает uikit-max

Скилл разбирает Swift-код по двенадцати направлениям: устаревшие API, жизненный цикл UIView, автолейаут, архитектура контроллеров, навигация, таблицы и коллекции, доступность, производительность, конкурентность. Каждое направление лежит в отдельном файле внутри references/, поэтому при частичном ревью агент подгружает только нужные. Находки группируются по файлам: строка, нарушенное правило и короткий фрагмент «до/после». В конце — сводка по приоритетам.

Автор советует целиться в iOS 17 как минимальную версию для нового кода и Swift 6.2 с современной конкурентностью. Но проект может быть на более старом таргете, и тогда скилл требует проверять доступность API и оборачивать новые вызовы в if #available. Это главное ограничение: без указания таргета предложения по свежим API могут не собраться.

Замену на SwiftUI скилл не предлагает — он держится UIKit-паттернов, пока об этом не попросят отдельно. Сторонние фреймворки тоже не тянет без вопроса. Для проектов только на SwiftUI или на одном Combine без UIKit он не подходит. Программный UI на якорях автор ставит выше Storyboards и XIB, если проект ещё не завязан на Interface Builder.

Какие задачи решает

  • вычистить устаревшие UIKit-вызовы вроде UIAlertView
  • найти конфликты констрейнтов из-за забытого translatesAutoresizingMaskIntoConstraints
  • разгрузить разросшийся UIViewController
  • перевести таблицы на diffable data sources
  • проверить Dynamic Type и VoiceOver перед релизом

Примеры запросов агенту

  • Проверь ProfileViewController.swift по uikit-max и покажи проблемы по строкам
  • Прогони uikit-max по папке с экранами на UITableView
  • Посмотри этот код на утечки и retain cycles по правилам uikit-max

Как установить uikit-max

1Через Skills CLI (Vercel)

npx skills add tornikegomareli/UIKit-Agent-Skill --skill uikit-max -a claude-code

2Вручную: положить файлы

~/.claude/skills/uikit-max/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/uikit-max/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Похожие

Рядом в теме «Мобильная разработка»

Всё по теме «Мобильная разработка» →

Вопросы о uikit-max

Как установить uikit-max в Claude?

Выполни npx skills add tornikegomareli/UIKit-Agent-Skill --skill uikit-max -a claude-code. После этого файл скилла окажется в ~/.claude/skills/uikit-max/SKILL.md.

Что делает uikit-max?

Ревьюит UIKit-код: ищет устаревшие API, ошибки автолейаута, проблемы архитектуры контроллеров, доступности и производительности. Отдаёт список замечаний с приоритетами.

Подойдёт ли скилл для проекта на SwiftUI?

Нет, для проектов только на SwiftUI или на одном Combine без UIKit он не предназначен.

Исходный текст

SKILL.md · MIT
---
name: uikit-max
description: >-
  Comprehensively 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
  migrating legacy UIKit patterns to modern equivalents. Do not use for
  SwiftUI-only projects or Combine-only logic with no UIKit dependency.
license: MIT
metadata:
  author: tgomareli
  version: "1.0"
---

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.

Review process:

1. Check for deprecated API using `references/api.md`.
1. Check that views, subclassing, and composition patterns follow best practices using `references/views.md`.
1. Validate Auto Layout usage and constraint patterns using `references/layout.md`.
1. Ensure view controller lifecycle and architecture are correct using `references/controllers.md`.
1. Ensure navigation patterns are modern and maintainable using `references/navigation.md`.
1. Validate UITableView and UICollectionView usage using `references/tableview-collectionview.md`.
1. Ensure the code uses designs that are accessible and compliant with Apple's Human Interface Guidelines using `references/design.md`.
1. Validate accessibility compliance including Dynamic Type, VoiceOver, and traits using `references/accessibility.md`.
1. Ensure the code runs efficiently using `references/performance.md`.
1. Check concurrency and thread safety using `references/concurrency.md`.
1. Quick validation of Swift code using `references/swift.md`.
1. Final code hygiene check using `references/hygiene.md`.

If doing a partial review, load only the relevant reference files.


## Core Instructions

- 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.
- Target Swift 6.2 or later, using modern Swift concurrency.
- **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.
- As a UIKit developer, the user expects UIKit patterns. Do not suggest SwiftUI replacements unless explicitly requested.
- Do not introduce third-party frameworks without asking first.
- Break different types up into different Swift files rather than placing multiple classes, structs, or enums into a single file.
- Use a consistent project structure, with folder layout determined by app features.
- Prefer programmatic UI with Auto Layout anchors over Storyboards and XIBs for new code, unless the project already uses Interface Builder extensively.


## Output Format

Organize findings by file. For each issue:

1. State the file and relevant line(s).
2. Name the rule being violated (e.g., "Use `UIAlertController` instead of `UIAlertView`").
3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

Example output:

### ProfileViewController.swift

**Line 8: Use `UIAlertController` instead of deprecated `UIAlertView`.**

```swift
// Before
let alert = UIAlertView(title: "Error", message: msg, delegate: self, cancelButtonTitle: "OK")
alert.show()

// After
let alert = UIAlertController(title: "Error", message: msg, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default))
present(alert, animated: true)
```

**Line 24: Batch constraint activation with `NSLayoutConstraint.activate`.**

```swift
// Before
label.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
label.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true

// After
NSLayoutConstraint.activate([
    label.topAnchor.constraint(equalTo: view.topAnchor),
    label.leadingAnchor.constraint(equalTo: view.leadingAnchor)
])
```

**Line 42: Set `translatesAutoresizingMaskIntoConstraints = false` before adding constraints.**

```swift
// Before
view.addSubview(label)
label.topAnchor.constraint(equalTo: view.topAnchor).isActive = true

// After
label.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(label)
NSLayoutConstraint.activate([
    label.topAnchor.constraint(equalTo: view.topAnchor)
])
```

### Summary

1. **Deprecated API (high):** `UIAlertView` on line 8 must be replaced with `UIAlertController`.
2. **Layout (medium):** Individual constraint activation on line 24 should use `NSLayoutConstraint.activate`.
3. **Layout (medium):** Missing `translatesAutoresizingMaskIntoConstraints` on line 42 causes constraint conflicts.

End of example.


## References

- `references/api.md` — deprecated UIKit APIs and their modern replacements.
- `references/views.md` — UIView lifecycle, composition, subclassing, and custom drawing.
- `references/layout.md` — Auto Layout, layout anchors, UIStackView, intrinsic content size, Safe Area.
- `references/controllers.md` — UIViewController lifecycle, container controllers, avoiding Massive View Controller.
- `references/navigation.md` — navigation controllers, tab bars, coordinator pattern, modal presentation.
- `references/tableview-collectionview.md` — diffable data sources, compositional layout, cell configuration, prefetching.
- `references/design.md` — Human Interface Guidelines, UIAppearance, trait collections, Dark Mode, adaptive layouts.
- `references/accessibility.md` — VoiceOver, Dynamic Type, accessibility traits, labels, and hints.
- `references/performance.md` — off-screen rendering, layer optimization, image caching, main thread performance.
- `references/concurrency.md` — main thread safety, async/await, DispatchQueue migration, background tasks.
- `references/swift.md` — modern Swift code, Swift concurrency, Objective-C interop.
- `references/hygiene.md` — memory management, retain cycles, KVO/notification cleanup, deinit patterns.

© tgomareli · MIT · tornikegomareli/UIKit-Agent-Skill

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой