Axiom axiom-uikit
Use when bridging UIKit and SwiftUI, debugging Auto Layout constraints, working with Combine, TextKit, or UIKit animations.
git clone https://github.com/CharlesWiltgen/Axiom
T=$(mktemp -d) && git clone --depth=1 https://github.com/CharlesWiltgen/Axiom "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude-plugin/plugins/axiom/skills/axiom-uikit" ~/.claude/skills/charleswiltgen-axiom-axiom-uikit && rm -rf "$T"
.claude-plugin/plugins/axiom/skills/axiom-uikit/SKILL.mdUIKit & Bridging
You MUST use this skill for ANY UIKit bridging, Auto Layout, Combine, TextKit, or UIKit animation work.
Quick Reference
| Symptom / Task | Reference |
|---|---|
| UIViewRepresentable, UIViewControllerRepresentable | See |
| Embedding SwiftUI in UIKit (UIHostingController) | See |
| Coordinator pattern, updateUIView lifecycle | See |
| "Unable to simultaneously satisfy constraints" | See |
| Constraint conflicts, ambiguous layout | See |
| Views not appearing, positioned incorrectly | See |
| CAAnimation completion handler not firing | See |
| Spring physics wrong on device, duration mismatch | See |
| Animation jank, CATransaction timing | See |
| Combine publishers, AnyCancellable lifecycle | See |
| @Published properties, Combine ↔ async/await | See |
| When to use Combine vs async/await | See |
| TextKit 2 architecture, NSTextLayoutManager | See |
| Writing Tools integration (iOS 26) | See |
| SwiftUI TextEditor, TextKit 1 migration | See |
Decision Tree
digraph uikit { start [label="UIKit task" shape=ellipse]; what [label="What do you need?" shape=diamond]; start -> what; what -> "skills/uikit-bridging.md" [label="wrap UIKit in SwiftUI\nor SwiftUI in UIKit"]; what -> "skills/auto-layout-debugging.md" [label="constraint errors,\nlayout issues"]; what -> "skills/uikit-animation-debugging.md" [label="CAAnimation bugs,\nspring physics,\ncompletion handlers"]; what -> "skills/combine-patterns.md" [label="publishers, sinks,\n@Published,\nasync/await bridge"]; what -> "skills/textkit-ref.md" [label="text layout,\nWriting Tools,\nTextKit migration"]; }
- UIViewRepresentable / UIViewControllerRepresentable / UIHostingController? →
skills/uikit-bridging.md - "Unable to simultaneously satisfy constraints" / layout bugs? →
skills/auto-layout-debugging.md - CAAnimation completion missing / spring physics wrong / animation jank? →
skills/uikit-animation-debugging.md - Combine publishers / AnyCancellable / @Published / Combine ↔ async bridge? →
skills/combine-patterns.md - TextKit 2 / Writing Tools / TextEditor / TextKit 1 migration? →
skills/textkit-ref.md - Pure SwiftUI view question (no UIKit bridging)? →
/skill axiom-swiftui - Design decisions, HIG, Liquid Glass, SF Symbols, typography? →
/skill axiom-design - Block retain cycles in UIKit callbacks? → See axiom-performance (
)skills/objc-block-retain-cycles.md - Memory leaks from Combine subscriptions? → Start with
, then axiom-performance if leak persistsskills/combine-patterns.md
Conflict Resolution
uikit vs swiftui: When working with UI code:
- Use uikit when wrapping UIKit in SwiftUI or vice versa, or debugging UIKit-specific issues (Auto Layout, CAAnimation)
- Use swiftui for pure SwiftUI views, navigation, layout, animations
uikit vs concurrency: When Combine interacts with async/await:
- Use uikit (
) for bridging Combine pipelines with async/awaitskills/combine-patterns.md - Use concurrency for pure async/await patterns, actors, Sendable
uikit vs performance: When animations or layout cause performance issues:
- Try uikit FIRST — Most animation jank is CATransaction timing or layer state, not a profiling issue
- Only use performance if animation logic is correct but rendering is slow
uikit vs axiom-data: When @Published properties relate to data persistence:
- Use uikit for Combine publisher patterns and @Published lifecycle
- Use axiom-data for SwiftData/Core Data model layer concerns
Anti-Rationalization
| Thought | Reality |
|---|---|
| "I'll just use UIHostingController, it's simple" | Hosting has sizing, lifecycle, and navigation edge cases. covers the gotchas. |
| "Auto Layout error is just a warning, I'll ignore it" | Unsatisfied constraints cause unpredictable layout at runtime. Fix them now. |
| "I know how CAAnimation works" | 90% of CAAnimation bugs are CATransaction timing, not Core Animation. Check . |
| "Combine is dead, just rewrite with async/await" | Combine has no deprecation notice. Rewriting working pipelines wastes time. covers when to migrate vs maintain. |
| "TextKit 1 still works fine" | TextKit 1 misses Writing Tools integration and has known layout bugs Apple won't fix. See . |
| "I'll store cancellables in a local variable" | Local AnyCancellable deallocates immediately, killing the subscription. |
Example Invocations
User: "How do I wrap a UIKit view in SwiftUI?" → Read:
skills/uikit-bridging.md
User: "I'm getting 'Unable to simultaneously satisfy constraints'" → Read:
skills/auto-layout-debugging.md
User: "My CAAnimation completion handler never fires" → Read:
skills/uikit-animation-debugging.md
User: "Should I use Combine or async/await for this?" → Read:
skills/combine-patterns.md
User: "How do I integrate Writing Tools with my text editor?" → Read:
skills/textkit-ref.md
User: "My SwiftUI view has a memory leak from a Combine subscription" → Read:
skills/combine-patterns.md
User: "How do I embed SwiftUI in my UIKit app?" → Read:
skills/uikit-bridging.md