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.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-accessibility-reviewSkill
- apple-app-marketing-siteSkill
- apple-design-systemSkill
- apple-development-foundationSkill
- apple-error-statesSkill
- apple-platform-plannerSkill
- apple-security-privacy-reviewSkill
- codex-bootstrapSkill
- codex-skill-maintainerSkill
- ios-macos-platform-adaptationSkill
- maestro-apple-app-testingSkill
- reusable-code-extractorSkill
- swift-concurrency-reviewSkill
- swift-package-module-authorSkill
- swift-testing-verificationSkill
- swiftui-component-authorSkill
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
- Distinctive: line 13
Prefer the system tab container.
- Very specific: line 14
Keep loading, onboarding, unrecoverable failures, and other pre-content routing outside the tab shell.
- Distinctive: line 15
Add typed selection state only when programmatic tab changes, restoration, inspection destinations, or deep links require it.
- Distinctive: line 16
Use concise text plus SF Symbols in each tab label.
- Very specific: line 17
If iOS and macOS need genuinely different primary-navigation conventions, invoke ios-macos-platform-adaptation.
- Distinctive: line 18
Read references/liquid-glass-chrome.md for Liquid Glass do/don’t (system chrome first.
≈ “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.
Files
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
- Confirm that the destinations are persistent peers. Use
TabViewfor peer app destinations; keep transient actions, onboarding steps, and drill-down destinations out of the tab bar. - 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. - Keep loading, onboarding, unrecoverable failures, and other pre-content routing outside the tab shell. Give each tab its own
NavigationStackwhen it owns drill-down navigation. - 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.
- 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).
- 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. - 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.
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
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.

