swiftship/internal/skills/data/ui/view-complexity/SKILL.md
View complexity management: 30-line body rule, computed property extraction, subview decomposition, type-check timeout prevention. Use when a view body is getting long, refactoring large views, or hitting Swift type-checker timeouts. Triggers: long body, refactor view, extract subview, type-check timeout, view too complex.
npx skillsauth add abdullah4ai/apple-developer-toolkit view-complexityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
VIEW BODY COMPLEXITY (CRITICAL):
body grows beyond about 30 lines, extract sections into computed properties.headerSectioncontentSectionfooterSectionREQUIRED PATTERN:
var body: some View {
VStack(spacing: AppTheme.Spacing.medium) {
headerSection
contentSection
actionsSection
}
}
private var headerSection: some View { ... }
private var contentSection: some View { ... }
private var actionsSection: some View { ... }
TYPE-CHECK TIMEOUT FIX:
HStack/VStack/ZStack branches into computed propertiesChart blocks into computed propertiesWHEN EDITING EXISTING FILES:
testing
Use for 3D games: racing, 3D sports, board games, marble maze, tower defense, bowling. SceneKit + SceneView architecture, 3D scene hierarchy, physics, game loop, primitives, materials, cameras, particles, audio.
documentation
Game UI patterns: SwiftUI HUD overlays on SpriteKit, menus (main/pause/game-over), virtual joystick/d-pad, score displays, health bars, tutorial onboarding.
tools
Download free game sprites/textures/3D models and generate procedural assets. Covers nw_download_asset tool, texture factories, sprite atlas organization, 3D model loading, and programmatic asset creation.
testing
Use for 2D games: arcade, puzzle, sports, ping pong, platformer, shooter, 2D racing. SpriteKit + SpriteView architecture, scene hierarchy, physics, game loop, audio, particles, game feel.