Agent skill
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), or UI code.
Install this agent skill to your Project
npx add-skill https://github.com/existential-birds/beagle/tree/main/plugins/beagle-ios/skills/swiftui-code-review
SKILL.md
SwiftUI Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| View extraction, modifiers, body complexity | references/view-composition.md |
| @State, @Binding, @Observable, @Bindable | references/state-management.md |
| LazyStacks, AnyView, ForEach, identity | references/performance.md |
| VoiceOver, Dynamic Type, labels, traits | references/accessibility.md |
Review Checklist
- View body under 10 composed elements (extract subviews)
- Modifiers in correct order (padding before background)
- @StateObject for view-owned objects, @ObservedObject for passed objects
- @Bindable used for two-way bindings to @Observable (iOS 17+)
- LazyVStack/LazyHStack for scrolling lists with 50+ items
- No AnyView (use @ViewBuilder or generics instead)
- ForEach uses stable Identifiable IDs (not array indices)
- All images/icons have accessibilityLabel
- Custom controls have accessibilityAddTraits(.isButton)
- Dynamic Type supported (no fixed font sizes)
- .task modifier for async work (not onAppear + Task)
When to Load References
- Complex view bodies or modifier chains -> view-composition.md
- Property wrapper usage (@State, @Observable) -> state-management.md
- List performance or view identity issues -> performance.md
- VoiceOver or accessibility implementation -> accessibility.md
Review Questions
- Could this large view body be split into smaller, reusable Views?
- Is modifier order intentional? (padding -> background -> frame)
- Is @StateObject/@ObservedObject usage correct for ownership?
- Could LazyVStack improve this ScrollView's performance?
- Would VoiceOver users understand this interface?
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
review-python
Comprehensive Python/FastAPI backend code review with optional parallel agents
review-verification-protocol
Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings.
sqlalchemy-code-review
Reviews SQLAlchemy code for session management, relationships, N+1 queries, and migration patterns. Use when reviewing SQLAlchemy 2.0 code, checking session lifecycle, relationship() usage, or Alembic migrations.
fastapi-code-review
Reviews FastAPI code for routing patterns, dependency injection, validation, and async handlers. Use when reviewing FastAPI apps, checking APIRouter setup, Depends() usage, or response models.
pytest-code-review
Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns.
postgres-code-review
Reviews PostgreSQL code for indexing strategies, JSONB operations, connection pooling, and transaction safety. Use when reviewing SQL queries, database schemas, JSONB usage, or connection management.
Didn't find tool you were looking for?