swiftui-expert-dev

Implements SwiftUI state, navigation, concurrency, and accessibility patterns for native iOS code.

2.4k|292|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/The-Vibe-Company/companion --skill swiftui-expert-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-expert-dev
Source: https://github.com/The-Vibe-Company/companion/tree/main/.agents/skills/swiftui-expert-dev
Command: npx skills add https://github.com/The-Vibe-Company/companion --skill swiftui-expert-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI code often breaks down through unclear state ownership, unstable view identity, unstructured async tasks, and missed accessibility requirements. This Skill provides focused implementation guidance for refactoring and building SwiftUI surfaces safely without changing product behavior or API contracts.

Core Features & Use Cases

  • State and identity guidance: Establishes single sources of truth, stable ForEach IDs, value-driven NavigationStack routes, and narrow observation ownership.
  • Concurrency correctness: Applies structured async/await, task cancellation, stale-result suppression, and main-actor UI mutation boundaries.
  • Accessibility and performance hardening: Covers Dynamic Type, VoiceOver labels, Reduce Motion and Reduce Transparency, lazy collections, and avoiding expensive work in view bodies.
  • Use Case: When a chat screen's polling publishes stale results after navigation, use this Skill to redesign state ownership, add version guards and cancellation, and keep session logic in the shared model layer.

Quick Start

Ask the agent to refactor a SwiftUI view so its state ownership, navigation, cancellation, and accessibility states are correct without changing the API contract.

Frequently Asked Questions about swiftui-expert-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix stale async results in SwiftUI polling?

Tie network work to structured tasks with cancellation and task IDs, and apply a response only when it matches the current resource and version. A cancelled task must never publish a stale result over newer state.

How to choose state ownership in a SwiftUI view?

Identify one source of truth per piece of state: keep transient UI state local to the view, and keep session or server state in an injected model with a stable lifetime. Use bindings only at the boundary that edits state.

Why does my SwiftUI list redraw too much when one item changes?

Check for unstable identity, broad observation, expensive work in body, and unnecessary type erasure. Give ForEach stable domain IDs instead of array offsets and measure before optimizing.

Does SwiftUI accessibility require more than VoiceOver labels?

Yes. Correct accessibility includes Dynamic Type support, Reduce Motion and Reduce Transparency handling, adequate hit targets, and status meaning conveyed by words rather than color alone.

When should SwiftUI implementation work be handed to other skills?

Product intent and API parity decisions belong to the product owner skill, visual direction to the design skill, and builds, tests, and simulator runs to the Xcode build tooling skill. This Skill covers only implementation mechanics.