focus-engine
Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit. Use when managing @FocusState, defaultFocus, focused values, focusable interactions, focus sections, tvOS geometric focus and Siri Remote navigation, watchOS Digital Crown input, visionOS connected-device focus versus gaze hover/input targets, macOS key view loop and Full Keyboard Access, focus restoration after presentation changes, custom focus routing with UIFocusGuide, or debugging focus with UIFocusDebugger.
npx skills add dpearson2699/swift-ios-skills --skill focus-engine --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Focus Engine Focus behavior for SwiftUI and UIKit apps targeting iOS 26+, iPadOS, macOS, tvOS, and visionOS connected-input paths. Covers keyboard focus, directional focus, scene-focused values, focus restoration, and UIKit focus guides. `focusSection()` guidance in this skill applies to macOS and tvOS. visionOS gaze-driven hover is an input affordance, not focus. Accessibility-specific focus for VoiceOver and Switch Control lives in the `ios-accessibility` skill. When a request mixes focus with accessibility or spatial input, keep the boundary explicit: - Use this skill for keyboard, remote, game-controller, and scene focus behavior. - For visionOS, describe gaze, direct touch, and pointer targeting as hover/input affordances, not focus. - For VoiceOver, Switch Control, Voice Control, or accessibility element ordering, give only a brief handoff to `ios-accessibility`. ## Contents - [SwiftUI FocusState](#swiftui-focusstate) - [Default Focus](#default-focus) - [Focused Values and Scene Values](#focused-values-and-scene-values) - [Focusable Interactions](#focusable-interactions) - [Focus Sections](#focus-sections) - [Focus Restoration](#focus-restoration) - [UIKit Focus Guides](#ui
- Contents
- SwiftUI FocusState
- Default Focus
- Focused Values and Scene Values
- Focusable Interactions
- Focus Sections
- Focus Restoration
- UIKit Focus Guides
- Common Mistakes
- Review Checklist
- References
What does the focus-engine skill do?
Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit. Use when managing @FocusState, defaultFocus, focused values, focusable interactions, focus sections, tvOS geometric focus and Siri Remote navigation, watchOS Digital Crown input, visionOS connected-device focus versus gaze hover/input targets, macOS key view loop and Full Keyboard Access, focus restoration after presentation changes, custom focus routing with UIFocusGuide, or debugging focus with UIFocusDebugger.
How do I install it?
Run `npx skills add dpearson2699/swift-ios-skills --skill focus-engine --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.