Cursor MCP Tool Boundary
The xclog, xcsym, and xcprof examples below are reference syntax, not executable commands for Cursor. Map each subcommand to the same-named MCP tool—for example, xclog launch to axiom_xclog_launch, xcsym crash to axiom_xcsym_crash, and xcprof record to axiom_xcprof_record—and preserve its arguments as structured fields. Do not run a bare helper binary. If a required MCP tool is unavailable, stop and report that the Axiom MCP integration is missing; do not fall back to a same-named executable.
SwiftUI
You MUST use this skill for ANY SwiftUI work including views, state, navigation, layout, animations, architecture, gestures, and debugging.
Cursor Subagent Routing
Delegate to the appropriate Cursor subagent when this router calls for a specialized auditor.
Quick Reference
| Symptom / Task |
Reference |
| View not updating |
See skills/debugging.md |
| View update still broken after debugging |
See skills/debugging-diag.md |
Slow previews / building good previews / @Previewable / PreviewModifier / variant matrix |
See skills/previews.md |
Preview API reference (#Preview, traits, modes, Development Assets) |
See skills/previews-ref.md |
| Preview crashes / won't load |
See skills/debugging.md (Preview Crashes section) |
| Hot reload / live editing / edit the running app on device |
See skills/hot-reload.md |
| Navigation issues |
See skills/nav.md |
| Navigation still broken after debugging |
See skills/nav-diag.md |
| Navigation API reference |
See skills/nav-ref.md |
| Layout breaks on iPad/rotation |
See skills/layout.md |
| State lost on resize/rotation (scroll, selection, focus, drafts) |
See skills/layout.md (State Survives the Transition) |
| Layout API reference |
See skills/layout-ref.md |
| Performance/lag/slow scroll |
See skills/swiftui-performance.md |
| Architecture/testability |
See skills/architecture.md |
@State object rebuilt every view init, or an init assignment ignored at runtime |
See skills/architecture.md (@State is a macro now) |
| Animation issues |
See skills/animation-ref.md |
| Stacks/grids/outlines |
See skills/containers-ref.md |
| Custom containers / List replacement (iOS 18+) |
See skills/containers-ref.md Part 7 |
| Search implementation |
See skills/search-ref.md |
| Toolbars, ToolbarItem, sheet button placement, customization |
See skills/toolbars.md |
Navigation subtitle: navigationSubtitle, .title / .subtitle / .largeTitle / .largeSubtitle placements (iOS 26) |
See skills/toolbars.md (Pattern 14) |
| Sheets, detents, popovers, fullScreenCover, presentation adaptation |
See skills/presentations.md |
| Multi-column Table, sortable/resizable columns (iPad/Mac; collapses to first column in compact) |
See axiom-macos (skills/swiftui-differences.md) |
Inspector panel (.inspector — trailing column in regular width, sheet in compact) |
See axiom-macos (skills/swiftui-differences.md) |
| Gesture conflicts |
See skills/gestures.md |
| Section index — the vertical A–Z index strip / alphabet scrubber on a list's trailing edge, jump-to-section |
See skills/26-ref.md (Section Index) |
List section margins / insets around a Section |
See skills/26-ref.md (Section Margins) |
Web content — WebView / WebPage, scroll modifiers, WebView-in-NavigationStack |
See skills/26-ref.md (WebView & WebPage) |
| iPhone Duo / foldable iPhone: poses, vertical bars, the fold, arrangements, hinge, scene accessories (SwiftUI and UIKit) |
See skills/iphone-duo.md |
| iOS 26 features |
See skills/26-ref.md |
Non-SwiftUI UI Routes
These topics are part of the broader iOS UI domain but live in separate suites:
UIKit issues
- Auto Layout conflicts → See axiom-uikit (skills/auto-layout-debugging.md)
- Animation timing → See axiom-uikit (skills/uikit-animation-debugging.md)
- SwiftUI ↔ UIKit bridging → See axiom-uikit (skills/uikit-bridging.md)
Design & guidelines
- Liquid Glass adoption → See axiom-design (skills/liquid-glass.md)
- SF Symbols → See axiom-design (skills/sf-symbols.md)
- HIG compliance → See axiom-design (skills/hig.md)
- Typography → See axiom-design (skills/typography-ref.md)
- TextKit/rich text → See axiom-uikit (skills/textkit-ref.md)
Other
- tvOS (focus, remote, text input) → See axiom-swift (skills/tvos.md)
- App-level composition (root, auth, scenes) → See axiom-design (skills/app-composition.md)
- Drag/drop, sharing, copy/paste → See axiom-swift (skills/transferable-ref.md)
- VoiceOver, Dynamic Type →
/skill axiom-accessibility
- UI test flakiness →
/skill axiom-testing
- UX dead ends, dismiss traps → Delegate to the
ux-flow-auditor subagent
watchOS-specific patterns
- Glanceable UI, watch navigation, Smart Stack widgets → See axiom-watchos
Conflict Resolution
axiom-swiftui vs axiom-performance: When UI is slow (e.g., "SwiftUI List slow"):
- Try axiom-swiftui FIRST — Domain-specific fixes (LazyVStack, view identity, @State optimization) often solve UI performance in 5 minutes
- Only use axiom-performance if domain fixes don't help — Profiling takes longer and may confirm what domain knowledge already knows
Decision Tree
digraph swiftui {
start [label="SwiftUI issue" shape=ellipse];
what [label="What's wrong?" shape=diamond];
start -> what;
what -> "skills/debugging.md" [label="view not updating"];
what -> "skills/nav.md" [label="navigation"];
what -> "skills/swiftui-performance.md" [label="slow/lag"];
what -> "skills/layout.md" [label="adaptive layout"];
what -> "skills/containers-ref.md" [label="stacks/grids/outlines"];
what -> "skills/architecture.md" [label="feature architecture"];
what -> "skills/animation-ref.md" [label="animations"];
what -> "skills/gestures.md" [label="gestures"];
what -> "skills/search-ref.md" [label="search"];
what -> "skills/toolbars.md" [label="toolbars / sheet buttons"];
what -> "skills/presentations.md" [label="sheets/detents/popovers"];
what -> "skills/26-ref.md" [label="iOS 26 features"];
what -> "skills/iphone-duo.md" [label="iPhone Duo / foldable"];
what -> "skills/previews.md" [label="slow previews / building good previews"];
what -> "skills/previews-ref.md" [label="preview API reference"];
what -> "skills/debugging.md" [label="preview crashes / won't load"];
what -> "skills/hot-reload.md" [label="hot reload / live editing"];
what -> "axiom-macos (skills/swiftui-differences.md)" [label="Table / .inspector\n(large-window density)"];
what -> "axiom-uikit (skills/uikit-bridging.md)" [label="UIKit interop"];
what -> "axiom-design (skills/app-composition.md)" [label="app-level (root, auth)"];
what -> "axiom-swift (skills/transferable-ref.md)" [label="drag/drop, sharing"];
}
Automated Scanning
- Architecture audit → Delegate to the
swiftui-architecture-auditor subagent
- Performance scan → Delegate to the
swiftui-performance-analyzer subagent or /axiom-audit swiftui-performance
- Navigation audit → Delegate to the
swiftui-nav-auditor subagent or /axiom-audit swiftui-nav
- Layout audit → Delegate to the
swiftui-layout-auditor subagent or /axiom-audit swiftui-layout
- UX flow audit → Delegate to the
ux-flow-auditor subagent or /axiom-audit ux-flow
- Liquid Glass scan → Delegate to the
liquid-glass-auditor subagent or /axiom-audit liquid-glass (detects migration opportunities AND adoption-completeness gaps: variant discipline for media surfaces, glass-on-glass nesting, unstyled pre-26 fallbacks, semantic toolbar placement, Tab(role: .search), the UIDesignRequiresCompatibility opt-out; scores ADOPTED / PARTIAL / NOT ADOPTED)
- TextKit scan → Delegate to the
textkit-auditor subagent or /axiom-audit textkit (detects fallback triggers, glyph APIs that corrupt complex scripts, missing Writing Tools wiring, AND architectural gaps like missing fallback observation, SwiftUI wrappers dropping TextKit 2 properties, missing isWritingToolsActive guards; scores MODERN / MIXED / LEGACY)
Anti-Rationalization
| Thought |
Reality |
| "Simple SwiftUI layout, no need" |
SwiftUI layout has 12 gotchas. skills/layout.md covers all of them. |
| "I know how NavigationStack works" |
Navigation has state restoration, deep linking, and identity traps. skills/nav.md prevents 2-hour debugging. |
| "It's just a view not updating" |
View update failures have 4 root causes. skills/debugging.md diagnoses in 5 min. |
| "I'll just add .animation()" |
Animation issues compound. skills/animation-ref.md has the correct patterns. |
| "No architecture needed" |
Even small features benefit from separation. skills/architecture.md prevents refactoring debt. |
| "I know .searchable" |
Search has 6 gotchas. skills/search-ref.md covers all of them. |
| "I'll just add a Done button" |
Sheets without Cancel break the HIG (updated 2026-03-24). .cancellationAction / .confirmationAction produce HIG-correct placement automatically — skills/toolbars.md Pattern 2 has the rules. |
| "A sheet is a sheet, nothing to configure" |
Detents, compact adaptation, background interaction, and iOS 18 sizing decide how it behaves across window shapes. skills/presentations.md covers the adaptation traps (landscape sheets silently become full-screen covers). |
| "Previews are slow forever, I'll just use the simulator" |
Five concrete fixes in skills/previews.md. Rule 4 (auto-refresh off) is 30 seconds and often halves perceived slowness. |
"@State is lazy in Xcode 27, I read the release notes" |
Only when the property is private/fileprivate and the deployment target is iOS 17 or later — below 17 the private case silently keeps the old eager behavior. skills/architecture.md has the gate, the three TN3211 breaks, and the one that compiles and is wrong at runtime. |
"I'll just write a wrapper view for @State in this preview" |
@Previewable @State (Xcode 16+) eliminates that boilerplate. skills/previews-ref.md has the macro signature. |
| "I'll just rebuild and relaunch every time" |
Hot reload edits the running app in place, state preserved. skills/hot-reload.md has the InjectionNext + Inject setup and the verify-via-xclog loop. |
| "Duo is just a bigger iPhone; my layout already resizes" |
Bars move to the side, the fold divides the screen, and the outer display can't open windows. skills/iphone-duo.md covers what resizing alone misses. |
1---2name: axiom-swiftui-33description: Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations, gestures, debugging, iOS 26 features, iPhone Duo, view-level performance, feature architecture.4---56## Cursor MCP Tool Boundary78The `xclog`, `xcsym`, and `xcprof` examples below are reference syntax, not executable commands for Cursor. Map each subcommand to the same-named MCP tool—for example, `xclog launch` to `axiom_xclog_launch`, `xcsym crash` to `axiom_xcsym_crash`, and `xcprof record` to `axiom_xcprof_record`—and preserve its arguments as structured fields. Do not run a bare helper binary. If a required MCP tool is unavailable, stop and report that the Axiom MCP integration is missing; do not fall back to a same-named executable.91011# SwiftUI1213**You MUST use this skill for ANY SwiftUI work including views, state, navigation, layout, animations, architecture, gestures, and debugging.**1415## Cursor Subagent Routing1617Delegate to the appropriate Cursor subagent when this router calls for a specialized auditor.1819## Quick Reference2021| Symptom / Task | Reference |22|----------------|-----------|23| View not updating | See `skills/debugging.md` |24| View update still broken after debugging | See `skills/debugging-diag.md` |25| Slow previews / building good previews / `@Previewable` / `PreviewModifier` / variant matrix | See `skills/previews.md` |26| Preview API reference (`#Preview`, traits, modes, Development Assets) | See `skills/previews-ref.md` |27| Preview crashes / won't load | See `skills/debugging.md` (Preview Crashes section) |28| Hot reload / live editing / edit the running app on device | See `skills/hot-reload.md` |29| Navigation issues | See `skills/nav.md` |30| Navigation still broken after debugging | See `skills/nav-diag.md` |31| Navigation API reference | See `skills/nav-ref.md` |32| Layout breaks on iPad/rotation | See `skills/layout.md` |33| State lost on resize/rotation (scroll, selection, focus, drafts) | See `skills/layout.md` (State Survives the Transition) |34| Layout API reference | See `skills/layout-ref.md` |35| Performance/lag/slow scroll | See `skills/swiftui-performance.md` |36| Architecture/testability | See `skills/architecture.md` |37| `@State` object rebuilt every view init, or an `init` assignment ignored at runtime | See `skills/architecture.md` (`@State` is a macro now) |38| Animation issues | See `skills/animation-ref.md` |39| Stacks/grids/outlines | See `skills/containers-ref.md` |40| Custom containers / List replacement (iOS 18+) | See `skills/containers-ref.md` Part 7 |41| Search implementation | See `skills/search-ref.md` |42| Toolbars, ToolbarItem, sheet button placement, customization | See `skills/toolbars.md` |43| Navigation subtitle: `navigationSubtitle`, `.title` / `.subtitle` / `.largeTitle` / `.largeSubtitle` placements (iOS 26) | See `skills/toolbars.md` (Pattern 14) |44| Sheets, detents, popovers, fullScreenCover, presentation adaptation | See `skills/presentations.md` |45| Multi-column Table, sortable/resizable columns (iPad/Mac; collapses to first column in compact) | See axiom-macos (skills/swiftui-differences.md) |46| Inspector panel (`.inspector` — trailing column in regular width, sheet in compact) | See axiom-macos (skills/swiftui-differences.md) |47| Gesture conflicts | See `skills/gestures.md` |48| Section index — the vertical A–Z index strip / alphabet scrubber on a list's trailing edge, jump-to-section | See `skills/26-ref.md` (Section Index) |49| List section margins / insets around a `Section` | See `skills/26-ref.md` (Section Margins) |50| Web content — `WebView` / `WebPage`, scroll modifiers, WebView-in-NavigationStack | See `skills/26-ref.md` (WebView & WebPage) |51| iPhone Duo / foldable iPhone: poses, vertical bars, the fold, arrangements, hinge, scene accessories (SwiftUI and UIKit) | See `skills/iphone-duo.md` |52| iOS 26 features | See `skills/26-ref.md` |5354## Non-SwiftUI UI Routes5556These topics are part of the broader iOS UI domain but live in separate suites:5758#### UIKit issues59- Auto Layout conflicts → See axiom-uikit (skills/auto-layout-debugging.md)60- Animation timing → See axiom-uikit (skills/uikit-animation-debugging.md)61- SwiftUI ↔ UIKit bridging → See axiom-uikit (skills/uikit-bridging.md)6263#### Design & guidelines64- Liquid Glass adoption → See axiom-design (skills/liquid-glass.md)65- SF Symbols → See axiom-design (skills/sf-symbols.md)66- HIG compliance → See axiom-design (skills/hig.md)67- Typography → See axiom-design (skills/typography-ref.md)68- TextKit/rich text → See axiom-uikit (skills/textkit-ref.md)6970#### Other71- tvOS (focus, remote, text input) → See axiom-swift (skills/tvos.md)72- App-level composition (root, auth, scenes) → See axiom-design (skills/app-composition.md)73- Drag/drop, sharing, copy/paste → See axiom-swift (skills/transferable-ref.md)74- VoiceOver, Dynamic Type → `/skill axiom-accessibility`75- UI test flakiness → `/skill axiom-testing`76- UX dead ends, dismiss traps → Delegate to the `ux-flow-auditor` subagent7778#### watchOS-specific patterns79- Glanceable UI, watch navigation, Smart Stack widgets → See axiom-watchos8081## Conflict Resolution8283**axiom-swiftui vs axiom-performance**: When UI is slow (e.g., "SwiftUI List slow"):841. **Try axiom-swiftui FIRST** — Domain-specific fixes (LazyVStack, view identity, @State optimization) often solve UI performance in 5 minutes852. **Only use axiom-performance** if domain fixes don't help — Profiling takes longer and may confirm what domain knowledge already knows8687## Decision Tree8889```dot90digraph swiftui {91 start [label="SwiftUI issue" shape=ellipse];92 what [label="What's wrong?" shape=diamond];9394 start -> what;95 what -> "skills/debugging.md" [label="view not updating"];96 what -> "skills/nav.md" [label="navigation"];97 what -> "skills/swiftui-performance.md" [label="slow/lag"];98 what -> "skills/layout.md" [label="adaptive layout"];99 what -> "skills/containers-ref.md" [label="stacks/grids/outlines"];100 what -> "skills/architecture.md" [label="feature architecture"];101 what -> "skills/animation-ref.md" [label="animations"];102 what -> "skills/gestures.md" [label="gestures"];103 what -> "skills/search-ref.md" [label="search"];104 what -> "skills/toolbars.md" [label="toolbars / sheet buttons"];105 what -> "skills/presentations.md" [label="sheets/detents/popovers"];106 what -> "skills/26-ref.md" [label="iOS 26 features"];107 what -> "skills/iphone-duo.md" [label="iPhone Duo / foldable"];108 what -> "skills/previews.md" [label="slow previews / building good previews"];109 what -> "skills/previews-ref.md" [label="preview API reference"];110 what -> "skills/debugging.md" [label="preview crashes / won't load"];111 what -> "skills/hot-reload.md" [label="hot reload / live editing"];112 what -> "axiom-macos (skills/swiftui-differences.md)" [label="Table / .inspector\n(large-window density)"];113 what -> "axiom-uikit (skills/uikit-bridging.md)" [label="UIKit interop"];114 what -> "axiom-design (skills/app-composition.md)" [label="app-level (root, auth)"];115 what -> "axiom-swift (skills/transferable-ref.md)" [label="drag/drop, sharing"];116}117```118119## Automated Scanning120121- Architecture audit → Delegate to the `swiftui-architecture-auditor` subagent122- Performance scan → Delegate to the `swiftui-performance-analyzer` subagent or `/axiom-audit` swiftui-performance123- Navigation audit → Delegate to the `swiftui-nav-auditor` subagent or `/axiom-audit` swiftui-nav124- Layout audit → Delegate to the `swiftui-layout-auditor` subagent or `/axiom-audit` swiftui-layout125- UX flow audit → Delegate to the `ux-flow-auditor` subagent or `/axiom-audit` ux-flow126- Liquid Glass scan → Delegate to the `liquid-glass-auditor` subagent or `/axiom-audit` liquid-glass (detects migration opportunities AND adoption-completeness gaps: variant discipline for media surfaces, glass-on-glass nesting, unstyled pre-26 fallbacks, semantic toolbar placement, `Tab(role: .search)`, the `UIDesignRequiresCompatibility` opt-out; scores ADOPTED / PARTIAL / NOT ADOPTED)127- TextKit scan → Delegate to the `textkit-auditor` subagent or `/axiom-audit` textkit (detects fallback triggers, glyph APIs that corrupt complex scripts, missing Writing Tools wiring, AND architectural gaps like missing fallback observation, SwiftUI wrappers dropping TextKit 2 properties, missing `isWritingToolsActive` guards; scores MODERN / MIXED / LEGACY)128129## Anti-Rationalization130131| Thought | Reality |132|---------|---------|133| "Simple SwiftUI layout, no need" | SwiftUI layout has 12 gotchas. `skills/layout.md` covers all of them. |134| "I know how NavigationStack works" | Navigation has state restoration, deep linking, and identity traps. `skills/nav.md` prevents 2-hour debugging. |135| "It's just a view not updating" | View update failures have 4 root causes. `skills/debugging.md` diagnoses in 5 min. |136| "I'll just add .animation()" | Animation issues compound. `skills/animation-ref.md` has the correct patterns. |137| "No architecture needed" | Even small features benefit from separation. `skills/architecture.md` prevents refactoring debt. |138| "I know .searchable" | Search has 6 gotchas. `skills/search-ref.md` covers all of them. |139| "I'll just add a Done button" | Sheets without Cancel break the HIG (updated 2026-03-24). `.cancellationAction` / `.confirmationAction` produce HIG-correct placement automatically — `skills/toolbars.md` Pattern 2 has the rules. |140| "A sheet is a sheet, nothing to configure" | Detents, compact adaptation, background interaction, and iOS 18 sizing decide how it behaves across window shapes. `skills/presentations.md` covers the adaptation traps (landscape sheets silently become full-screen covers). |141| "Previews are slow forever, I'll just use the simulator" | Five concrete fixes in `skills/previews.md`. Rule 4 (auto-refresh off) is 30 seconds and often halves perceived slowness. |142| "`@State` is lazy in Xcode 27, I read the release notes" | Only when the property is `private`/`fileprivate` **and** the deployment target is iOS 17 or later — below 17 the private case silently keeps the old eager behavior. `skills/architecture.md` has the gate, the three TN3211 breaks, and the one that compiles and is wrong at runtime. |143| "I'll just write a wrapper view for `@State` in this preview" | `@Previewable @State` (Xcode 16+) eliminates that boilerplate. `skills/previews-ref.md` has the macro signature. |144| "I'll just rebuild and relaunch every time" | Hot reload edits the running app in place, state preserved. `skills/hot-reload.md` has the InjectionNext + Inject setup and the verify-via-`xclog` loop. |145| "Duo is just a bigger iPhone; my layout already resizes" | Bars move to the side, the fold divides the screen, and the outer display can't open windows. `skills/iphone-duo.md` covers what resizing alone misses. |