audit-swiftui-navigation-toolbars

Audit macOS SwiftUI navigation shells and toolbar code for deprecated APIs and platform-wrong patterns.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-navigation-toolbars-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-swiftui-navigation-toolbars
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/audit-swiftui-navigation-toolbars
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-navigation-toolbars-yigitkonur

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ast-grep, and includes scripts (resource) and references (resource) components.

What problem does it solve? AI-generated SwiftUI code often uses iOS navigation idioms on macOS: deprecated NavigationView containers, NavigationStack as the app shell, iOS-only toolbar placements like .topBarLeading that fail to compile, and no-op modifiers like navigationBarTitle. This Skill audits a macOS SwiftUI project to detect and, where safe, fix these navigation and toolbar defects. ## Core Features & Use Cases - 12-rule defect index (nav-01 to nav-12): Detects deprecated NavigationView, wrong shell containers, frame-hack column hiding, platform-absent toolbar placements, iOS-bar title no-ops, and ungated macOS 26 APIs. - Hybrid lint engine: Runs tier-1 grep tells plus a tier-2 ast-grep structural rule via the shared swiftui-lint.sh runner, emitting unified JSON and SARIF output with a CI exit code on hard-failures. - Evidence-grounded verification: Cross-checks uncertain findings against a corpus of 1,857 shipping macOS apps via swiftui-ctx and Apple documentation via Sosumi before reporting. - Use Case: Point it at a macOS SwiftUI codebase before release to catch a .topBarLeading placement that would fail compilation and auto-fix it to a semantic placement like .primaryAction. ## Quick Start Audit the SwiftUI sources in my macOS project for navigation and toolbar problems and write the findings to swiftui-audits/navigation-toolbars.

Frequently Asked Questions about audit-swiftui-navigation-toolbars

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

FAQPage Schema
How do I audit SwiftUI navigation code on macOS?

Run the shared lint runner with this skill's rule set against your SwiftUI sources, then read each located file in full before reporting. The workflow orients on the deployment target, locates candidates with grep and ast-grep, verifies uncertain findings, and writes findings to disk.

What toolbar placements work on macOS SwiftUI?

Use semantic placements: .navigation for leading items, .principal or .status for centered items, and .primaryAction which resolves to the leading edge on macOS. The placements .topBarLeading and .topBarTrailing are unavailable on macOS and cause compile errors.

Can this skill fix deprecated NavigationView automatically?

No, NavigationView migration is flag-only because it requires structural judgment about shell versus drill-down roles. Only the mechanical placement and title renames (nav-05, nav-06, nav-07) are auto-fixed under the fix-safety protocol with one commit per finding.

Does the audit work on iOS SwiftUI projects?

No, this skill is macOS-only and SwiftUI-only. Its rules encode macOS-specific idioms like the persistent multi-column sidebar and window titlebar, and it flags iOS-only APIs as defects rather than valid patterns.

Why does navigationSplitViewColumnWidth not work on the detail column?

The modifier constrains leading columns only; on the detail column it is a practitioner-confirmed no-op that this skill carries as an unverified finding. The recommended alternatives are the .inspector modifier for metadata panels or HSplitView for a user-resizable structural pane.