agentsclimarketplace

Liquid glass troubleshooting

Skill SohrabZ/liquid-glass-skills/liquid-glass-troubleshooting

AI coding agent skills for building iOS 26 Liquid Glass UIs with SwiftUI + UIKit. Install: npx skills add SohrabZ/liquid-glass-skills

Install
npx -y skills add SohrabZ/liquid-glass-skills --skill liquid-glass-troubleshooting

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Fix, adapt, and ship iOS 26 Liquid Glass in the real world: readability over busy/media backgrounds (gradient fade, dimming, tinting, variant choice), correct layering (avoid glass-on-glass), platform differences (iOS/iPadOS/macOS/watchOS/tvOS/visionOS) and minimum OS/device requirements, iOS 18 backward compatibility (availability fallback + opt-out via UIDesignRequiresCompatibility), UIKit integration (UIGlassEffect, UIGlassContainerEffect), known beta bugs with workarounds, and performance/battery implications. Use this skill when the user reports glass that's "hard to read", "looks wrong over an image", "has rendering artifacts", widgets showing a black background, disorienting toolbar animation on navigation, asks "how do I support iOS 18 too", "how do I use glass in UIKit", or "why is my battery draining". Trigger on "glass unreadable", "busy background", "glass-on-glass", "UIDesignRequiresCompatibility", "UIGlassEffect", "glassProminent artifacts", "widget black background".

SKILL.md

5.5 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Liquid Glass Troubleshooting & Real-World Adaptation

Field fixes for readability, layering, platform/version support, UIKit, known bugs, and performance. (Basics: liquid-glass-foundations.)

Readability over complex backgrounds

Glass over busy/colorful/animated content becomes hard to read. Four remedies, roughly in order of preference:

1. Gradient fade — fade a background color in behind the control. A reusable modifier (deliquify()) is in references/BackgroundFade.swift:

ScrollView { ColorfulContent() }.deliquify()

2. Strategic tinting — add semantic color for contrast:

.glassEffect(.regular.tint(.purple.opacity(0.8)))

3. Choose the right variant.regular for most contexts; .clear only over media-rich content with bold foreground.

4. Background dimming — required when using .clear over imagery:

ZStack {
    BackgroundImage().overlay(Color.black.opacity(0.3))   // subtle dimming
    GlassControls().glassEffect(.clear)
}

Layering: avoid glass-on-glass

// ❌ Confusing hierarchy — stacked glass
VStack {
    HeaderView().glassEffect()
    ContentView().glassEffect()
    FooterView().glassEffect()
}

// ✅ One floating glass layer over plain content
ZStack {
    ContentView()                 // no glass
    HeaderView().glassEffect()    // single floating layer
}

Layering philosophy: content (bottom, no glass) → navigation (middle, Liquid Glass) → overlay (top, vibrancy/fills on glass).

Platform differences

PlatformAdaptations
iOSFloating tab bars, bottom search placement
iPadOSFloating sidebars, ambient reflection, larger shadows
macOSConcentric window corners, adaptive search bars, taller controls
watchOSLocation-aware widgets, fluid navigation
tvOSFocused glass effects, directional highlights

Minimums: iOS/iPadOS/macOS Tahoe/watchOS/tvOS/visionOS 26.0+, Xcode 26.0+. Devices: iPhone 11 / iPhone SE (2nd gen) or later get the full effect; older devices fall back to frosted glass with reduced effects.

Backward compatibility (supporting iOS 18)

Recompiling with Xcode 26 adopts glass automatically. To hold off (expires with iOS 27):

<!-- Info.plist -->
<key>UIDesignRequiresCompatibility</key>
<true/>

For code that runs on both iOS 26 and iOS 18, gate on availability with a manual fallback. A drop-in glassedEffect(...) extension is in references/GlassCompat.swift:

Text("Compatible")
    .padding()
    .glassedEffect(in: Capsule(), interactive: true)

UIKit integration

import UIKit

let glassEffect = UIGlassEffect(glass: .regular, isInteractive: true)
let effectView = UIVisualEffectView(effect: glassEffect)
effectView.frame = CGRect(x: 0, y: 0, width: 200, height: 50)
view.addSubview(effectView)

let containerEffect = UIGlassContainerEffect()
let containerView = UIVisualEffectView(effect: containerEffect)

Best practices: remove custom backgrounds so glass shows; update presentation controllers for sheets; handle UIBarButtonItem sizing; use hidesSharedBackground = true to drop glass from specific items.

Known issues & workarounds (beta)

  • Interactive shape mismatch.glassEffect(.regular.interactive(), in: RoundedRectangle()) responds with a Capsule shape. Workaround: use .buttonStyle(.glass) for buttons.
  • .glassProminent + .circle artifacts — add .clipShape(Circle()).
  • Widget black background (Standard/Dark modes) — no complete fix; Tinted and Transparent modes work with Color.clear.
  • Disorienting toolbar animation on navigation — give the item a stable id:
    ToolbarItem(id: "constantID") { Button("Done") { } }
    

Performance implications

  • Battery: early testing showed ~13% drain (iOS 26) vs ~1% (iOS 18) on iPhone 16 Pro Max, plus more heat and higher CPU/GPU load on older devices.
  • Optimize: use GlassEffectContainer for multiple elements; limit continuous animations; let glass rest; test on ~3-year-old devices; profile with Instruments.
  • Memory: real-time blur consumes GPU memory and samples a larger area than the element; shared sampling regions reduce that overhead.

Related skills

  • Performance-first patterns → liquid-glass-advanced
  • Design rules that prevent most of these problems → liquid-glass-best-practices

What ships with it: 2 files

2.8 KB alongside SKILL.md

Gives 0 of the 12 instructions most debug triage skills give in ~1.1k tokens

Counted across 839 of the 1,149 authors here whose files we hold, read 2026-08-07

  • Investigate root cause before proposing any fixin 102 of 839, across 67 files
  • Read error messages completelyin 89 of 839, across 49 files
  • Create a failing test case before fixingin 84 of 839, across 46 files
  • Reproduce the issue consistentlyin 82 of 839, across 41 files
  • Change one variable at a timein 82 of 839, across 42 files
  • Check recent changesin 74 of 839, across 36 files
  • Write the regression test before fixingin 74 of 839, across 40 files
  • Fix the root cause not the symptomin 60 of 839, across 45 files
  • Implement a single fix at a timein 59 of 839, across 20 files
  • Trace data flow backward to the sourcein 50 of 839, across 20 files
  • Remove all debug instrumentationin 49 of 839, across 13 files
  • Form a single hypothesisin 48 of 839, across 18 files

Said here and by no other author read

  • fade a background color behind controls
  • tint glass with semantic colors
  • choose regular variant for most contexts
  • dim backgrounds when using clear variant
  • avoid stacking glass layers
  • gate code on availability for iOS 18

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,984. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.