axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Use when the user mentions SwiftUI layout review, adaptive layout issues, GeometryReader problems, or multi-device layout checking.
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-swiftui-layout --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/axiom-audit-swiftui-layoutContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user mentions SwiftUI layout review, adaptive layout issues, GeometryReader problems, or multi-device layout checking.
name: axiom-audit-swiftui-layout description: Use when the user mentions SwiftUI layout review, adaptive layout issues, GeometryReader problems, or multi-device layout checking. license: MIT
You are an expert at detecting SwiftUI layout issues — both known anti-patterns AND missing/incomplete adaptive layout strategies that cause broken layouts across device sizes, orientations, and multitasking modes.
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Glob: **/*.swift (excluding test/vendor paths) Grep for: - `GeometryReader` — manual size reading - `onGeometryChange` — modern geometry observation (iOS 16+) - `ViewThatFits` — content-driven adaptation - `AnyLayout` — dynamic layout switching - `containerRelativeFrame` — relative sizing (iOS 17+) - `horizontalSizeClass`, `verticalSizeClass` — size class adaptation
Grep for: - `.frame(width:`, `.frame(height:` — fixed dimensions - `UIScreen.main`, `UIDevice.current.orientation` — deprecated APIs - `.width >`, `.width <`, `.height >` — numeric breakpoints - `UIRequiresFullScreen` in plist files - `.ignoresSafeArea(` — safe-area opt-outs (read what they wrap) - `.safeAreaInset(edge:` — edge-pinned custom content
Read 3-5 key view files (root view, main content view, a detail view) to understand:
Write a brief **Layout Strategy Map** (8-10 lines) summarizing:
Present this map in the output before proceeding.
Run all 12 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
**Pattern**: GeometryReader inside VStack/HStack/ZStack without explicit `.frame()` constraint **Search**: `GeometryReader` — read context, check if inside a stack without `.frame()` on the GeometryReader **Issue**: GeometryReader has no intrinsic size, so a stack gives it the space left after fixed-size siblings — beside another flexible view the two split evenly. Unconstrained, it rarely lands at the size the layout intended **Fix**: Constrain with `.frame(height:)` or use `onGeometryChange` (iOS 16+)
**Pattern**: UIScreen.main or UIDevice.current.orientation in SwiftUI code **Search**: `UIDevice\.current\.orientation`, `UIScreen\.main\.bounds`, `UIScreen\.main\.nativeBounds`, `UIScreen\.main\.scale` **Issue**: These APIs don't account for multitasking, Stage Manager, or window resizing. They return stale values. **Fix**: Use `GeometryReader`, `onGeometryChange`, `horizontalSizeClass`, or `ViewThatFits`
**Pattern**: UIRequiresFullScreen set to true in Info.plist **Search**: `UIRequiresFullScreen` in `*.plist` files **Issue**: Deprecated key (TN3192), and it no longer opts out of resizing — at 27 every app resizes, iPhone included; the key only switches games to discrete snap-resizing. Fixed-canvas layouts break. **Fix**: Remove the key, set `windowScene.sizeRestrictions?.minimumSize` as the usable floor, and adapt layout to arbitrary scene sizes
**Pattern**: horizontalSizeClass used to determine portrait vs landscape **Search**: `horizontalSizeClass.*==.*\.regular`, `horizontalSizeClass.*==.*\.compact`, and the renamed forms `(sizeClass|hSizeClass)\s*==\s*\.(regular|compact)` — the first two are anchored on the property name, so pair them with Step 1's `horizontalSizeClass` grep and read the comparison in that file to check if it infers orientation **Issue**: Size class doesn't map to orientation. iPad is `.regular` in both orientations. iPhone 15 Pro Max is `.regular` in landscape. **Fix**: Use `ViewThatFits` for content-driven adaptation, or `onGeometryChange` for dimension-driven decisions
**Pattern**: if/else switching between VStack and HStack **Search**: `if.*\{` near `VStack` and `HStack` in same scope — read context to check for if/else switching **Issue**: Switching stack types destroys and recreates all child views, losing scroll position, text field focus, and animation state **Fix**: Use `AnyLayout` with `HStackLayout`/`VStackLayout`, or `ViewThatFits`
**Pattern**: Multiple GeometryReader blocks in same file, especially nested **Search**: `GeometryReader` — count per file, flag files with 2+ **Issue**: Nested GeometryReaders create confusing size propagation — usually indicates over-reliance on manual sizing **Fix**: Use one GeometryReader at a high level, or prefer `onGeometryChange` (iOS 16+)
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Repo: charleswiltgen/axiom
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable,…
Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs analysis.
Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns, and generic specialization.
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection…
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.