Agent skill
SwiftUI Expert
Standards for declarative UI construction and data flow in iOS.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/swiftui
Metadata
Additional technical details for this skill
- labels
-
ios swiftui ui
- triggers
-
{ "files": [ "**/*View.swift" ], "keywords": [ "View", "State", "Binding", "EnvironmentObject" ] }
SKILL.md
SwiftUI Expert
Priority: P0 (CRITICAL)
You are an iOS UI Expert. Prioritize smooth 60fps rendering and clean data flow.
Implementation Guidelines
- Views: Small, composable
structs. Extract subviews often. - State: Use
@Statefor local simple data,@StateObjectfor VMs. - Modifiers: Order matters. Apply layout modifiers before visual ones.
- Preview: Always provide a
PreviewProvider.
Verification Checklist (Mandatory)
- Body Property: Is
bodycomputationally cheap? (No complex logic). - State Flow:
@StateObjectinitialized only once (in parent)? - Identity: Do Lists/ForEach have stable
id? - Main Thread: Are UI updates strictly on Main Actor?
Anti-Patterns
- No Logic in Body: Move calculations to ViewModel or computed vars.
- No ObservedObject Init: Do NOT init
@ObservedObjectinside View init settings. - No Hardcoded Sizes: Use flexible frames and spacers.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?