audit-swiftui-liquid-glass

Audits macOS SwiftUI Liquid Glass code for hallucinated APIs, placement violations, and gating defects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? AI coding agents frequently write incorrect Liquid Glass code for macOS 26 because the API shipped after most training data, producing hallucinated modifiers, glass-on-glass stacking, missing availability gates, and misplaced glass on content instead of navigation chrome. ## Core Features & Use Cases - 18-rule defect index: Detects hallucinated symbols like .glassBackground() and LiquidGlassView, visionOS-only APIs on Mac targets, wrong-arm #available(iOS 26) gates, glass-on-glass stacking, and missing GlassEffectContainer grouping. - Hybrid lint engine: Runs tier-1 ripgrep tells plus tier-2 ast-grep structural rules that express containment and gate scope, emitting unified JSON and SARIF with CI exit codes. - Evidence-grounded verification: Cross-checks uncertain symbols against a corpus of 1,857 shipping macOS apps via the swiftui-ctx CLI and Apple documentation via Sosumi before reporting findings. - Safe auto-fixes: Applies mechanical corrections (hallucinated names, wrong-arm gates, leftover toolbar overrides) under a fix-safety protocol with one commit per finding. - Use Case: Point the audit at a macOS SwiftUI project targeting macOS 15+ that an AI assistant wrote glass code for, and receive per-finding reports with severity, citations, and verified fixes. ## Quick Start Audit the SwiftUI sources in this macOS project for Liquid Glass correctness and fix any hallucinated glass APIs you find.

Frequently Asked Questions about audit-swiftui-liquid-glass

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

FAQPage Schema
How do I audit SwiftUI Liquid Glass code for errors?

Run the audit against your macOS SwiftUI sources; it locates candidates with a hybrid grep and ast-grep lint engine, then reads each file in full before reporting. Findings follow an 18-rule defect index covering hallucinated APIs, placement, gating, and morphing defects.

What hallucinated Liquid Glass APIs does the audit detect?

It flags invented symbols like .glassBackground(), .liquidGlass(), LiquidGlassView, .material(.glass), GlassContainer, and .buttonStyle(.liquidGlass), none of which exist on macOS. It also catches .glassBackgroundEffect(), which is real but visionOS-only.

Does the audit work on iOS or AppKit projects?

No, it is macOS-only and SwiftUI-only. AppKit NSGlassEffectView code is explicitly out of scope, and material or dark-mode contrast issues belong to a separate appearance-color audit skill.

Can the audit automatically fix the defects it finds?

Yes, but only for five mechanical rules: hallucinated names, visionOS-only symbols, wrong-arm availability gates, leftover toolbar overrides, and obsolete LabelStyle annotations. All other findings are flag-only with a verified correct pattern shown.

Why does the audit need the project's deployment target?

Availability-gating findings only fire when the deployment target is below macOS 26, since ungated glass calls compile fine on a macOS-26-only target. The audit reads MACOSX_DEPLOYMENT_TARGET or Package.swift platforms first to suppress false positives.

How does the audit verify uncertain API claims?

It queries a corpus of 1,857 shipping macOS apps via the swiftui-ctx CLI for real usage consensus and fetches Apple documentation through Sosumi. Findings are only reported at 100% certainty; unverifiable claims are carried as advisory flags.