audit-swiftui-layout-and-tables

Audit macOS SwiftUI layout and Table code for correctness, deprecations, and native conventions.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-layout-and-tables-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-swiftui-layout-and-tables
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/audit-swiftui-layout-and-tables
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-layout-and-tables-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 is trained mostly on iOS patterns, so macOS apps end up with windows that lack min/ideal/max frames, hand-rolled Lists where a sortable Table belongs, oversized control density, and deprecated tableStyle cases. This Skill audits a macOS SwiftUI codebase for exactly those layout and table defects and reports or fixes them. ## Core Features & Use Cases - Eight-rule defect index (lt-01 to lt-08): Detects missing window content frames, missing scene sizing, List-versus-Table misuse, non-sortable Tables, wrong control density, blanket fixedSize, the deprecated tableStyle case, and unnecessary custom Layout conformances. - Hybrid lint engine: Runs tier-1 grep tells plus tier-2 ast-grep structural rules that can prove the absence of a frame or sortOrder across a call span, emitting unified JSON and SARIF output. - Corpus-grounded verification: Confirms uncertain findings against a 1,857-app SwiftSyntax corpus via the swiftui-ctx CLI and Apple docs via Sosumi, then auto-fixes the deprecated tableStyle case under a fix-safety protocol. - Use Case: Point it at a finished macOS SwiftUI project to receive structured findings written to swiftui-audits/layout-and-tables/ with severity, confidence, and permalinked correct examples. ## Quick Start Ask the agent to audit your macOS SwiftUI project's layout and table code for missing window sizing, non-sortable tables, and deprecated tableStyle usage.

Frequently Asked Questions about audit-swiftui-layout-and-tables

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

FAQPage Schema
How do I audit SwiftUI layout code for macOS correctness?

Run the skill against your SwiftUI sources; it executes a shared lint runner with grep tells and ast-grep structural rules, then reads each hit in full before reporting. Confirmed findings are written as structured Markdown files under swiftui-audits/layout-and-tables/.

How do I make a SwiftUI Table sortable on macOS?

Add a sortOrder binding to an array of KeyPathComparator and build columns with the value: parameter so headers become clickable. Then apply .onChange(of: sortOrder) to re-sort your data with data.sort(using:).

When should I use Table instead of List in SwiftUI on macOS?

Use Table when rows represent multiple fields of a struct, since it provides real columns, clickable sortable headers, and free row selection. A List of plain single-field strings is fine and should not be flagged.

Is tableStyle(.inset(alternatesRowBackgrounds:)) deprecated in macOS 26?

Yes, both the inset and bordered variants with alternatesRowBackgrounds are deprecated as of macOS 26.5. The fix is to use .tableStyle(.inset) combined with the .alternatingRowBackgrounds() modifier, which this skill can auto-apply.

Does this audit skill work for iOS SwiftUI projects?

No, it is macOS-only by design. Its rules target resizable window sizing, sortable Tables, and control density conventions that are load-bearing on the Mac but largely irrelevant on iOS.

What are the limitations of the automated lint detection?

The lint engine only locates candidates and never confirms findings; every hit must be read in full and reported only at 100% certainty. Only the deprecated tableStyle case is auto-fixed, while all other defects are flag-only judgment calls.