agentleFS
brbndonbrbndon/AppleDevelopmentFoundation/.agents/skills/swiftui-tab-navigation/SKILL.md

swiftui-tab-navigation

Skill2 starsChanged 2 months agoMITView on GitHub

Use when adding, replacing, or refactoring an app-level SwiftUI tab shell, including adopting the system Liquid Glass tab-bar appearance on iOS 26. Do not use for page-style TabView content, segmented controls, business-specific screen implementation, or navigation that has no peer destinations.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer the system tab container.

    line 13
  2. Very specific:

    Keep loading, onboarding, unrecoverable failures, and other pre-content routing outside the tab shell.

    line 14
  3. Distinctive:

    Add typed selection state only when programmatic tab changes, restoration, inspection destinations, or deep links require it.

    line 15
  4. Distinctive:

    Use concise text plus SF Symbols in each tab label.

    line 16
  5. Very specific:

    If iOS and macOS need genuinely different primary-navigation conventions, invoke ios-macos-platform-adaptation.

    line 17
  6. Distinctive:

    Read references/liquid-glass-chrome.md for Liquid Glass do/don’t (system chrome first.

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SwiftUI tab navigation

Build primary navigation from native SwiftUI containers in the consumer workspace. Inspect repository guidance, deployment targets, root routing, existing deep links, tests, and platform conventions before editing.

Workflow

  1. Confirm that the destinations are persistent peers. Use TabView for peer app destinations; keep transient actions, onboarding steps, and drill-down destinations out of the tab bar.
  2. Prefer the system tab container. On supported iOS versions, native tab chrome adopts the current system appearance, including Liquid Glass on iOS 26. Treat a Liquid Glass request as native chrome adoption; do not imitate it with glassEffect, materials, overlays, or a custom safe-area bar.
  3. Keep loading, onboarding, unrecoverable failures, and other pre-content routing outside the tab shell. Give each tab its own NavigationStack when it owns drill-down navigation.
  4. Add typed selection state only when programmatic tab changes, restoration, inspection destinations, or deep links require it. Preserve existing direct inspection and deep-link routes.
  5. Use concise text plus SF Symbols in each tab label. Keep selection semantics and interaction native; apply only semantic app tinting (one primary accent, not every bar item).
  6. If iOS and macOS need genuinely different primary-navigation conventions, invoke ios-macos-platform-adaptation; do not force an iOS tab bar onto a macOS app that calls for a sidebar, windows, or commands.
  7. Read references/liquid-glass-chrome.md for Liquid Glass do/don’t (system chrome first; Regular/Clear; no glass-on-glass or glass-as-content). Read references/native-tab-shell.md when implementing the shell or updating UI automation.

Verification

Use swift-testing-verification and XcodeBuildMCP with one exact target. Build and run, capture a screenshot or hierarchy on the newest supported runtime, exercise every tab and nested back path, and verify any minimum-OS fallback the project supports. When chrome changes, confirm no custom bar/sheet background fights system materials. Run affected XCTest or Maestro journeys after selector changes.

Inspect the runtime hierarchy before choosing UI-test selectors. SwiftUI creates the actual tab buttons; an accessibility identifier placed inside .tabItem may not propagate to those generated controls. Prefer an exposed stable identifier when present, otherwise use the visible accessibility label and scope XCTest queries to tabBars.

Inputs: an existing or requested primary navigation shell, its peer destinations, supported platforms, and current routing/tests. Output: a native tab shell in the consumer app, preserved routing behavior, updated navigation tests, and visual/build evidence on relevant runtimes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.