Agent skill

Focus Engine

by dpearson2699 in dpearson2699/swift-ios-skills

Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit.

Custom licenceAuto-check passedMobile

Install Focus Engine

skills CLI
$ npx skills add dpearson2699/swift-ios-skills --skill focus-engine -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dpearson2699/swift-ios-skills focus-engine --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dpearson2699/swift-ios-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/focus-engine .claude/skills/focus-engine && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
focus-engine
GitHub stars
1.2k
Token cost
~2.4k tokens
SKILL.md length
671 words
Files
5 (incl. references)
Skills in repo
86
Repo updated
First seen
Licence
Custom licence

At a glance

Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit.

  • Works in 8 steps: Mixing accessibility focus and keyboard… → Storing @FocusState in shared models… → Setting multiple competing default focus… → …
  • Managing @FocusState
  • SKILL.md covers Contents, SwiftUI FocusState, Default Focus and Focused Values and Scene Values, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Focus Engine is an agent skill from dpearson2699/swift-ios-skills. 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.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/evals.json`, `references/focus-debugging.md` and `references/focus-patterns.md`).

It sits in Mobile, covering iOS development. It works with SwiftUI, macOS and iOS. The repository describes itself as: Agent Skills for iOS 26+, Swift 6.3, SwiftUI, and modern Apple frameworks.

When your agent uses it

  • Managing @FocusState
  • Focusable interactions
  • TvOS geometric focus and Siri Remote navigation
  • WatchOS Digital Crown input

Example prompts

  • “Use the focus-engine skill to implement keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit”
  • “/focus-engine”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Mixing accessibility focus and keyboard or directional focus in the same mental model.
  2. Storing @FocusState in shared models instead of the owning view.
  3. Setting multiple competing default focus targets on one screen.
  4. Using .focusable() on decorative views.
  5. Forgetting focus restoration after sheets, popovers, or custom overlays.
  6. Reaching for UIFocusGuide before trying focusSection() on macOS or tvOS, or better layout grouping in SwiftUI.
  7. Using gesture handlers for primary actions on custom focusable controls instead of a semantic Button when possible.
  8. Treating visionOS gaze hover as focus; reserve focus guidance for connected input such as keyboards and game controllers.

What it can do on your machine

Read from SKILL.md and the folder at commit 8d90fd1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Focus Engine loads about 2.4k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 130 tokens; SKILL.md has 671 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~130
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 671 words (~2,443 tokens).

“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…”

— opening of SKILL.md by dpearson2699, Custom licence
name
focus-engine

Read the full SKILL.md on GitHub

Files

SKILL.md and 4 other files (references) in skills/focus-engine of dpearson2699/swift-ios-skills.

  • SKILL.md
  • evals/evals.json
  • references/focus-debugging.md
  • references/focus-patterns.md
  • references/multi-platform-focus.md

Open the folder on GitHubat commit 8d90fd1

Compare with similar skills

Focus Engine next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Focus Engine compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Focus Engine this skilldpearson2699/swift-ios-skills1.2k—~2.4kAutomated safety check: PassCustom licence
Swiftui Expert SkillAvdLee/SwiftUI-Agent-Skill3.7k—~2.9kAutomated safety check: PassMIT
Swiftui Expert SkillEslzzyl/Pixiv-SwiftUI1115 repos~3.1kAutomated safety check: PassAGPL-3.0
Hig Project Contextraintree-technology/hig-doctor1425 repos~1.2kAutomated safety check: PassMIT
Hig Components Contentraintree-technology/hig-doctor1425 repos~1.3kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill210—~2.8kAutomated safety check: PassMIT

Similar skills

  • Swiftui Expert Skill

    AvdLee/SwiftUI-Agent-Skill

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display…

    3.7k GitHub stars~2.9k tokensUpdated yesterday
    MobileAuto-check passed
  • Swiftui Expert Skill

    Eslzzyl/Pixiv-SwiftUI

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management and @Observable data flow, view composition and invalidation/performance…

    111 GitHub starsUsed in 5 repos~3.1k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    142 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    142 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • SwiftUI Design Skill

    Wholiver/swiftui-design-skill

    Guides the agent to design distinctive SwiftUI interfaces for iOS and macOS, with six anti-generic rules, a design direction workflow and a five-dimension review.

    210 GitHub stars~2.8k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Swiftui Backports

    shaps80/SwiftUIBackports

    Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target.

    1.1k GitHub stars~604 tokensUpdated 3 mo ago
    MobileAuto-check passed

More from dpearson2699/swift-ios-skills

All 86 skills in this repo
  • iOS Memgraph Analysis

    dpearson2699/swift-ios-skills

    A skill your agent uses when capturing or analyzing an iOS .memgraph, especially when the task mentions a memory leak, heap growth, persistent memory increase, ownership path, or matched-capture…

    1.2k GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Natural Language

    dpearson2699/swift-ios-skills

    Tokenize, tag, and analyze natural language text using Apple's NaturalLanguage framework and translate between languages with the Translation framework.

    1.2k GitHub starsUsed in 1 repo~3.5k tokens
    Auto-check passed
  • iOS Ettrace Performance

    dpearson2699/swift-ios-skills

    A skill your agent uses when capturing or analyzing ETTrace profiles for a focused iOS launch or runtime flow, including exact-build dSYM UUID matching, Simulator or device capture, processed…

    1.2k GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Accessorysetupkit

    dpearson2699/swift-ios-skills

    Discover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit.

    1.2k GitHub stars~3.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Activitykit

    dpearson2699/swift-ios-skills

    Implement, review, or improve Live Activities and Dynamic Island experiences in iOS apps using ActivityKit.

    1.2k GitHub stars~4.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Adattributionkit

    dpearson2699/swift-ios-skills

    Measure ad effectiveness with privacy-preserving attribution using AdAttributionKit.

    1.2k GitHub stars~3.5k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Focus Engine

What does Focus Engine do?

Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit. Focus Engine is an agent skill from dpearson2699/swift-ios-skills. Implements keyboard, directional, and scene-level focus behavior across SwiftUI and UIKit.

When should I use Focus Engine?

Focus Engine fits situations like: managing @FocusState; focusable interactions; tvOS geometric focus and Siri Remote navigation; watchOS Digital Crown input.

How do I install Focus Engine in Claude Code?

Run `npx skills add dpearson2699/swift-ios-skills --skill focus-engine -a claude-code`. Or copy the skill folder (skills/focus-engine in dpearson2699/swift-ios-skills) into .claude/skills/focus-engine in your project. Claude Code loads it when a task matches its description.

How do I install Focus Engine in Codex?

Run `npx skills add dpearson2699/swift-ios-skills --skill focus-engine -a codex`. Or copy the skill folder (skills/focus-engine in dpearson2699/swift-ios-skills) into .agents/skills/focus-engine in your project. Codex loads it when a task matches its description.

Can I use Focus Engine in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dpearson2699/swift-ios-skills --skill focus-engine -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/focus-engine, .gemini/skills/focus-engine, .github/skills/focus-engine and .opencode/skills/focus-engine in your project.

What does Focus Engine need to run?

SKILL.md names no scripts, command-line tools or credentials: Focus Engine is instructions for the agent only.

Does Focus Engine access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Focus Engine safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Focus Engine use?

Focus Engine has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Focus Engine use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.8k tokens, read only when the agent opens those files.

What are the alternatives to Focus Engine?

Skills that share tags, products or a category with Focus Engine: Swiftui Expert Skill (AvdLee/SwiftUI-Agent-Skill, 3.7k stars), Swiftui Expert Skill (Eslzzyl/Pixiv-SwiftUI, 111 stars), Hig Project Context (raintree-technology/hig-doctor, 142 stars) and Hig Components Content (raintree-technology/hig-doctor, 142 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Focus Engine?

dpearson2699 (a GitHub user) maintains it in dpearson2699/swift-ios-skills, which has 1,173 GitHub stars. The repository holds 86 skills in this directory. The repository was last updated on July 31, 2026.

Source: dpearson2699/swift-ios-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.