SwiftUI Liquid Glass with AI agents: glassEffect, Icon Composer and HIG materials
Rebuild with the latest Xcode so system bars pick up Liquid Glass, remove custom backgrounds that fight the material, and use glassEffect only on floating controls—with GlassEffectContainer when several views share it. Skills teach when not to overuse glass; Icon Composer MCP builds the layered app icon; HIG Doctor audits the Human Interface Guidelines.
Last updated:
This page is about getting a coding agent to adopt Liquid Glass the way Apple documents it: let system chrome update automatically, apply glassEffect sparingly on custom floating UI, ship a layered icon, and keep content readable. For a Claude Code-only shopping list of skills, see Best Claude Code skills for SwiftUI.
What Apple says: automatic first, custom sparingly
From Adopting Liquid Glass:
Rebuild with the latest Xcode. Standard SwiftUI, UIKit and AppKit bars, sheets, popovers and controls pick up the material on the latest platform releases.
Remove custom backgrounds on controls and navigation that overlay or fight Liquid Glass or the scroll edge effect.
Test with varied display and accessibility settings — translucency adapts (for example a preferred Liquid Glass look).
Avoid overusing Liquid Glass on custom controls so attention stays on underlying content.
Liquid Glass is a functional layer for controls and navigation, not a finish for every surface. The Materials HIG page frames materials as depth and hierarchy between foreground and background.
Rules worth adding to AGENTS.md or CLAUDE.md:
Liquid Glass: prefer system components after a latest-Xcode rebuild. Do not invent custom glass on content cards. Use
glassEffectonly on floating controls; wrap multiple glass views inGlassEffectContainer. Strip custom bar backgrounds that block the system material. Re-check contrast and Reduce Transparency.
Step 1: let system chrome update
Ask the agent to:
Open the project in the latest Xcode and build for a recent simulator or device.
List navigation and control surfaces that still set custom backgrounds, hard-coded bar metrics or non-system button styles.
Prefer system button styles that adopt the material with minimal code (Apple documents Liquid Glass button style APIs in Adopting Liquid Glass) instead of hand-rolled glass.
If the agent proposes wrapping every card in glass, reject it — that contradicts Apple's overuse guidance.
Step 2: custom views with glassEffect
From Applying Liquid Glass to custom views:
Apply
glassEffect(_:in:)to add the effect (default regular glass in a capsule behind the content).Configure shape, optional tint, and interactivity so custom controls react like system buttons.
Use
GlassEffectContainerwhen several views share Liquid Glass — better rendering and shape morphing; spacing controls how soon shapes blend.Use
glassEffectUnion(id:namespace:)when multiple views should contribute to one capsule at rest.Coordinate add/remove animations with
glassEffectTransition.
Example shape (API names from Apple's doc; tune for your view):
swift
GlassEffectContainer {
HStack(spacing: 12) {
Image(systemName: "magnifyingglass")
.padding(10)
.glassEffect()
Image(systemName: "slider.horizontal.3")
.padding(10)
.glassEffect()
}
}Honest limit: sample code in skills must match the SDK you compile against — have the agent re-check the live SwiftUI doc if a symbol fails to resolve.
Step 3: app icons with Icon Composer
Adopting Liquid Glass asks you to reimagine the app icon with layered, optically balanced shapes and to compose and preview in Icon Composer so the system applies reflection, refraction, shadow, blur and highlights. Keep elements centered against the updated grids (rounded rectangle on iOS/iPadOS/macOS; circular on watchOS).
Agents cannot usefully drive Icon Composer.app by eye. Use:
Apple's Icon Composer app / creating your app icon using Icon Composer
Icon Composer MCP to generate
.iconbundles (Liquid Glass rendering needs macOS + Icon Composer.app; flat fallback otherwise)
Step 4: audit and polish with skills
Liquid Glass skill — modifier order, grouping, fallbacks (Dimillian or FWC's
--skill swiftui-liquid-glass).Design / UX skill — anti-generic UI and placement rules (SwiftUI Design Skill; iOS UX Skills).
HIG audit — HIG Doctor CLI/MCP for rule hits with severity and fix hints.
Broader Expert skill — when Liquid Glass is one chapter among state/composition/SDK 27 guidance (AvdLee).
Tools compared (8)
| Tool | Best for | Agents (README) | Install (README) | License | Stars | Last push |
|---|---|---|---|---|---|---|
| SwiftUI Liquid Glass (Dimillian) | Dedicated Liquid Glass skill: modifier order, grouping, interactivity, fallbacks (Codex skills tree) | Codex | Copy the swiftui-liquid-glass folder into $CODEX_HOME/skills | MIT | 4,017 | 29 Mar 2026 ⚠ |
| FWC SwiftUI Skills (FloWritesCode) | Pack for iOS 26+ SwiftUI including a swiftui-liquid-glass skill | Cursor, Codex, Claude Code | npx skills add FloWritesCode/fwc-swiftui-skills --skill swiftui-liquid-glass | MIT | 446 | 8 Oct 2026 |
| Icon Composer MCP (ethbak) | MCP/CLI that builds Apple Icon Composer .icon bundles with Liquid Glass rendering and dark-mode variants | Claude Code, Cursor, VS Code | claude mcp add icon-composer -- npx -y icon-composer-mcp | MIT | 62 | 3 Oct 2026 |
| SwiftUI Design Skill (Wholiver) | Front-end design skill: anti-generic UI rules, brand direction, five-dimensional review | Claude Code, Cursor, Codex, OpenCode | npx skills add wholiver/swiftui-design-skill -g -y | MIT | 211 | 1 May 2026 ⚠ |
| SwiftUI Expert Skill (AvdLee) | State, composition, redraw cost, SDK 27 moves; Liquid Glass sits in that guidance | Claude Code, Cursor, Codex, Gemini | npx skills@latest add https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill | MIT | 3,780 | 6 Oct 2026 |
| HIG Doctor (raintree-technology) | CLI + MCP that audits Apple-platform source against HIG rules (severity, location, fix) | Claude Code, Cursor, Codex, any MCP | npx hig-doctor . / MCP: npx -y hig-mcp | MIT | 148 | 24 Oct 2026 |
| iOS UX Skills (ratul0) | SwiftUI UX heuristics + HIG note that Liquid Glass belongs on navigation, not content | Claude Code, Cursor, Codex | npx skills add ratul0/ios-ux-skills | MIT | 0 | 19 Aug 2026 ⚠ |
| Leo Ho Skills Registry (leoho0722) | ios-hig-ui-ux skill for Liquid Glass-generation HIG design, implement and review | Claude Code, Codex | npx skills add leoho0722/skills-registry -s ios-hig-ui-ux -a claude-code -a codex -g | MIT | 0 | 25 Oct 2026 |
⚠ = no push for more than 4 weeks. Dimillian's skill lives in a large Skills repo, so the star count is for the whole repository. Nearby but out of scope: Claude Design to SwiftUI (HTML prototype → SwiftUI plugin) and apple-platforms-27-skills (platform upgrade pack).
Which one to pick:
Liquid Glass APIs only: SwiftUI Liquid Glass (Codex) or FWC
--skill swiftui-liquid-glass.Icons: Icon Composer MCP once Icon Composer.app is installed.
Design polish / where glass belongs: SwiftUI Design Skill or iOS UX Skills.
HIG compliance sweep: HIG Doctor.
Liquid Glass + state/composition in one skill: SwiftUI Expert.
A prompt that keeps the agent honest
Setting up the agent: Claude Code for iOS development, Codex for iOS development or Cursor rules for SwiftUI. Skill shortlist context: Best Claude Code skills for SwiftUI.
Rebuild with the latest Xcode. Remove custom toolbar backgrounds that block Liquid Glass. Apply
glassEffectonly to the floating filter chip row; wrap those views inGlassEffectContainer. Do not glass the content cards. Propose an Icon Composer layer plan for the app icon. Cite Apple's Adopting Liquid Glass overuse rule in the PR description.
FAQ
- What is Liquid Glass in SwiftUI?
- Apple's Adopting Liquid Glass overview describes a dynamic material that combines the optical properties of glass with fluidity. It forms a functional layer for controls and navigation. Standard SwiftUI, UIKit and AppKit components pick it up automatically when you rebuild with the latest Xcode; custom views use modifiers such as glassEffect(_:in:).
- How should an agent apply glassEffect without overusing it?
- Apple's Applying Liquid Glass to custom views page: add glassEffect to a view (default regular glass in a capsule), prefer GlassEffectContainer when several glass views share morphing, and use glassEffectUnion when multiple views should form one capsule. Adopting Liquid Glass also says to avoid overusing the material on custom controls so content stays primary.
- Do I need Icon Composer for Liquid Glass app icons?
- Yes for the layered icon workflow Apple documents: design in layers, then compose and preview in Icon Composer so the system can apply reflection, refraction, shadow and blur. The Icon Composer MCP server (ethbak) wraps that CLI/MCP path so Claude Code or Cursor can build .icon bundles with Liquid Glass rendering when Icon Composer.app is installed on macOS.
- Which AI tools help with Liquid Glass versus general SwiftUI design?
- Dedicated Liquid Glass skills (Dimillian's SwiftUI Liquid Glass, FWC's swiftui-liquid-glass skill) focus on modifier order, grouping and fallbacks. SwiftUI Design Skill and iOS UX Skills encode broader polish and HIG placement (glass on navigation, not content). HIG Doctor audits source against hundreds of HIG rules. Pick one Liquid Glass skill plus Icon Composer MCP when icons are in scope.
- Is Liquid Glass the same topic as best Claude Code skills for SwiftUI?
- No. The best Claude Code skills for SwiftUI guide is a shortlist of which skills to install in Claude Code. This page owns the adoption workflow across agents: Apple's measure of automatic vs custom glass, glassEffect APIs, Icon Composer, and HIG materials rules.