audit-swiftui-controls-forms

Audits macOS SwiftUI controls and forms for non-native patterns and platform-wrong APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? AI-generated SwiftUI code often carries iOS habits into macOS apps: ungrouped settings Forms, custom controls that drop out of the Tab order, icon-only buttons with no tooltip, wrong list/button/picker styles, and touch-only APIs like .pickerStyle(.wheel) that fail to compile on macOS. This Skill detects those defects in an existing macOS SwiftUI project and reports them in a unified findings schema. ## Core Features & Use Cases - Eight-rule defect index (cf-01 to cf-08): Detects ungrouped Forms, missing .focusable()/@FocusState wiring, missing .help tooltips, wrong listStyle/buttonStyle/pickerStyle, the macOS-absent WheelPickerStyle hard-fail, and the .controlSize(.extraLarge) no-op. - Hybrid lint engine: Runs tier-1 ripgrep tells plus tier-2 ast-grep structural rules that detect the absence of modifiers across a view chain, emitting unified JSON and SARIF output. - Evidence-grounded verification: Confirms uncertain findings against a corpus of 1,857 shipping macOS apps via the swiftui-ctx CLI and Apple documentation fetched through Sosumi, with permalinked real-world examples for every fix. - Use Case: Point it at a macOS SwiftUI settings pane and receive structured findings showing each non-native control pattern, its severity, the correct macOS idiom, and a GitHub permalink to how a shipping app implements it. ## Quick Start Audit my macOS SwiftUI project for non-native controls and forms patterns and write the findings to swiftui-audits/controls-forms.

Frequently Asked Questions about audit-swiftui-controls-forms

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

FAQPage Schema
How do I audit a macOS SwiftUI app for non-native controls?

Run the shared lint runner with --skill audit-swiftui-controls-forms against your Swift sources. It locates candidates via grep tells and ast-grep structural rules, then you read each hit in full and confirm findings at 100% certainty before reporting them to swiftui-audits/controls-forms.

What SwiftUI control defects does this audit detect?

It covers eight rules: ungrouped Forms, custom views missing .focusable()/@FocusState, icon-only buttons without .help tooltips, wrong listStyle/buttonStyle/pickerStyle, the macOS-absent .pickerStyle(.wheel), and the .controlSize(.extraLarge) no-op that resolves to .large on macOS.

Does .pickerStyle(.wheel) work on macOS SwiftUI?

No. WheelPickerStyle has no macOS arm and is a compile error on non-Catalyst macOS targets. Replace it with .menu, .segmented, or .inline depending on the data; never wrap it in an #available gate.

Can this audit automatically fix the defects it finds?

No. Every defect in this domain is flag-only because the correct fix is a judgment call, such as which picker style fits the data or whether a Form is a settings pane. Findings include the correct pattern and a real-world permalink, but the developer applies the fix.

Why does my SwiftUI settings Form look wrong on macOS?

macOS Forms are ungrouped by default, unlike iOS. Add .formStyle(.grouped) (macOS 13.0+) to get the grouped, inset System Settings appearance that Mac users expect.