swiftui-code-review
БесплатноБез исполняемых скриптовНе проверенReviews SwiftUI code for view composition, state management, performance, and accessibility. Use when reviewing .swift files containing SwiftUI views…
от existential-birds★ 92 звезды на GitHubОб этом скилле
SwiftUI Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| View extraction, modifiers, body complexity | references/view-composition.md |
@State, @Binding, @Observable, @Bindable, @Environment |
references/state-management.md |
LazyVStack, AnyView, ForEach, view identity |
references/performance.md |
| VoiceOver, Dynamic Type, labels, traits | references/accessibility.md |
Gates (review workflow)
Complete in order; do not skip ahead.
- Anchor scope — Pass when: every reviewed file is listed as a repo-relative
.swiftpath (or the review explicitly states “none opened / N/A” with reason). - Reference before critique — Pass when: for any non-trivial body, modifier chain, or wrapper-ownership question, you have opened the matching
references/*.mdrow from the table above or you state “not needed” with one line why. - Evidence-bound findings & protocol — Pass when: every finding satisfies
review-verification-protocol(review-verification-protocol) and includes[FILE:LINE](or a bounded line range) before recommendations; symbols/snippets may supplement but not replace the location anchor; no finding that rests only on “typical SwiftUI” without pointing at this code.
Review Checklist
- Large view bodies (
> 40lines or causing measurable layout/type-checker cost) extracted into reusableViewstructs (not trivial 1–3 line leaf views) - Modifiers in correct order (
paddingbeforebackground,clipShapebeforeshadow) - iOS 17+
@Observable:@Statein owning view (with lightweightinit()), plain property for read-only child access,@Bindablefor two-way bindings,@Environment(Type.self)for environment injection - Legacy
ObservableObject(when supporting< iOS 17or Combine):@StateObjectin owning view,@ObservedObjectwhen passed from parent -
LazyVStack/LazyHStackfor scrolling lists with many items (e.g. 50+) - No
AnyView(use@ViewBuilderor generics instead) -
ForEachuses stableIdentifiableIDs (not array indices) - Interactive icon-only controls have
.accessibilityLabel(...)and decorative SF Symbols use.accessibilityHidden(true) - Custom controls have
.accessibilityAddTraits(.isButton)(and value/selection state) - Dynamic Type supported (semantic text styles rather than fixed font sizes)
-
.taskmodifier for view-scoped async work (notonAppear+ unstructuredTask)
When to Load References
- Complex view bodies or modifier chains -> references/view-composition.md
- Property wrapper usage (
@State,@Bindable,@Observable,@StateObject) -> references/state-management.md - List performance or view identity issues -> references/performance.md
- VoiceOver or accessibility implementation -> references/accessibility.md
Review Questions
- Should a view body over 40 lines (or causing slow type-checking/re-evaluation) be split into dedicated
Viewstructs? - Is modifier order intentional (
padding->background->frame,clipShape->shadow)? - Is ownership clear (
@State+@Observableor legacy@StateObjectin the creator, plain property/@Bindablein children)? - Could
LazyVStack/LazyHStackimprove thisScrollView's performance? - Would VoiceOver users understand interactive icons and decorative symbols?
Установить swiftui-code-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл swiftui-code-review?
Reviews SwiftUI code for view composition, state management, performance, and accessibility. Use when reviewing .swift files containing SwiftUI views, property wrappers (@State, @Binding, @Observable, @Bindable), or UI code.
Как установить скилл swiftui-code-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл swiftui-code-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic