audit-swiftui-pointer-gestures

Audit macOS SwiftUI code for pointer affordance and gesture defects using lint rules and corpus evidence.

2|1|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-pointer-gestures-yigitkonur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-swiftui-pointer-gestures
Source: https://github.com/yigitkonur/plugin-swiftui/tree/main/plugins/swiftui/skills/audit-swiftui-pointer-gestures
Command: npx skills add https://github.com/yigitkonur/plugin-swiftui --skill audit-swiftui-pointer-gestures-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 for macOS often compiles but behaves like an iPad app in a window: custom views give no hover feedback, draggable handles show no cursor shape, rows lack right-click context menus, and deprecated gestures like MagnificationGesture persist. This Skill audits a macOS SwiftUI project for 12 specific pointer and gesture defects and fixes the mechanical ones. ## Core Features & Use Cases - 12-rule defect index (pg-01 to pg-12): Detects invented PointerStyle cases, missing .onHover/pointerStyle affordances, missing .contextMenu, deprecated MagnificationGesture/RotationGesture, gestures without @GestureState, and wrong-arm #available(iOS) gating. - Hybrid lint engine: Runs tier-1 grep tells plus tier-2 ast-grep structural rules via a shared runner, emitting unified JSON and SARIF with parse-probe warnings. - Evidence-grounded fixes: Verifies findings against a corpus of 1,857 real macOS apps (swiftui-ctx) and Apple docs via Sosumi, then auto-fixes mechanical defects (pg-01, pg-12) under a fix-safety protocol. - Use Case: Point it at a finished macOS SwiftUI project to produce structured findings in swiftui-audits/pointer-gestures/ with commit-pinned GitHub permalinks backing each recommended correction. ## Quick Start Audit the SwiftUI sources in this macOS project for pointer affordance and gesture defects and write findings to swiftui-audits/pointer-gestures.

Frequently Asked Questions about audit-swiftui-pointer-gestures

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

FAQPage Schema
How do I audit SwiftUI pointer and gesture code on macOS?

Run the shared lint runner with --skill audit-swiftui-pointer-gestures against your SwiftUI sources to locate candidates via grep tells and ast-grep rules. Then read each hit in full, verify against the swiftui-ctx corpus and Apple docs, and report findings at 100% certainty.

What pointer and gesture defects does this SwiftUI audit detect?

It detects 12 defects: invented PointerStyle.grabbing cases, missing .onHover or pointerStyle on interactive views, binary hover where continuous position is needed, missing right-click .contextMenu, deprecated MagnificationGesture/RotationGesture, gestures without @GestureState, and wrong-arm #available(iOS) gating.

Does the audit automatically fix SwiftUI gesture issues?

Only two mechanical defects are auto-fixed: the PointerStyle.grabbing rename (pg-01) and wrong-arm iOS gating rewrites (pg-12). All other findings are flag-only, reported with the consensus-correct shape and a permalinked real-world example for the developer to apply.

Can I use this audit for iOS SwiftUI projects?

No, it is macOS-only and SwiftUI-only. The defect rules target Mac-specific pointer interactions like hover, cursor shapes, and right-click menus that do not exist on iOS, and gating checks assume a macOS deployment target.

Why does the lint runner report parse warnings on some Swift files?

The runner runs a per-file parse probe; a parse warning means the file did not fully parse, so structural ast-grep rules may have missed defects in it. Those files must be read by hand so a structural miss cannot masquerade as clean.