Agent skill

Liquid Glass Design

by affaan-m in affaan-m/ECC

iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

MITAuto-check passedMobile

Install Liquid Glass Design

skills CLI
$ npx skills add affaan-m/ECC --skill liquid-glass-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC liquid-glass-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/zh-CN/skills/liquid-glass-design .claude/skills/liquid-glass-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
liquid-glass-design
GitHub stars
277k
Used in
3 other repos
Token cost
~1.7k tokens
SKILL.md length
142 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

  • Tasks that involve iOS development
  • SKILL.md covers 何时启用, 核心模式 — SwiftUI, 核心模式 — UIKit and 核心模式 — WidgetKit, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Liquid Glass Design is an agent skill from affaan-m/ECC. iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering iOS development. It works with SwiftUI and iOS. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Tasks that involve iOS development

Example prompts

  • “/liquid-glass-design”

What it can do on your machine

Read from SKILL.md and the folder at commit 2d515e4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Liquid Glass Design loads about 1.7k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 142 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 2d515e4, republished under its MIT licence (© affaan-m). 142 words, ~1,672 tokens.

Download SKILL.mdSave it as .claude/skills/liquid-glass-design/SKILL.md (or your agent's skills folder).
name
liquid-glass-design
description
iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

Liquid Glass 设计系统 (iOS 26)

实现苹果 Liquid Glass 的模式指南——这是一种动态材质,会模糊其后的内容,反射周围内容的颜色和光线,并对触摸和指针交互做出反应。涵盖 SwiftUI、UIKit 和 WidgetKit 集成。

何时启用

  • 为 iOS 26+ 构建或更新采用新设计语言的应用程序时
  • 实现玻璃风格的按钮、卡片、工具栏或容器时
  • 在玻璃元素之间创建变形过渡时
  • 将 Liquid Glass 效果应用于小组件时
  • 将现有的模糊/材质效果迁移到新的 Liquid Glass API 时

核心模式 — SwiftUI

基本玻璃效果

为任何视图添加 Liquid Glass 的最简单方法:

swift
Text("Hello, World!")
    .font(.title)
    .padding()
    .glassEffect()  // Default: regular variant, capsule shape
自定义形状和色调
swift
Text("Hello, World!")
    .font(.title)
    .padding()
    .glassEffect(.regular.tint(.orange).interactive(), in: .rect(cornerRadius: 16.0))

关键自定义选项:

  • .regular — 标准玻璃效果
  • .tint(Color) — 添加颜色色调以增强突出度
  • .interactive() — 对触摸和指针交互做出反应
  • 形状:.capsule(默认)、.rect(cornerRadius:)、.circle
玻璃按钮样式
swift
Button("Click Me") { /* action */ }
    .buttonStyle(.glass)

Button("Important") { /* action */ }
    .buttonStyle(.glassProminent)
用于多个元素的 GlassEffectContainer

出于性能和变形考虑,始终将多个玻璃视图包装在一个容器中:

swift
GlassEffectContainer(spacing: 40.0) {
    HStack(spacing: 40.0) {
        Image(systemName: "scribble.variable")
            .frame(width: 80.0, height: 80.0)
            .font(.system(size: 36))
            .glassEffect()

        Image(systemName: "eraser.fill")
            .frame(width: 80.0, height: 80.0)
            .font(.system(size: 36))
            .glassEffect()
    }
}

spacing 参数控制合并距离——距离更近的元素会将其玻璃形状融合在一起。

统一玻璃效果

使用 glassEffectUnion 将多个视图组合成单个玻璃形状:

swift
@Namespace private var namespace

GlassEffectContainer(spacing: 20.0) {
    HStack(spacing: 20.0) {
        ForEach(symbolSet.indices, id: \.self) { item in
            Image(systemName: symbolSet[item])
                .frame(width: 80.0, height: 80.0)
                .glassEffect()
                .glassEffectUnion(id: item < 2 ? "group1" : "group2", namespace: namespace)
        }
    }
}
变形过渡

在玻璃元素出现/消失时创建平滑的变形效果:

swift
@State private var isExpanded = false
@Namespace private var namespace

GlassEffectContainer(spacing: 40.0) {
    HStack(spacing: 40.0) {
        Image(systemName: "scribble.variable")
            .frame(width: 80.0, height: 80.0)
            .glassEffect()
            .glassEffectID("pencil", in: namespace)

        if isExpanded {
            Image(systemName: "eraser.fill")
                .frame(width: 80.0, height: 80.0)
                .glassEffect()
                .glassEffectID("eraser", in: namespace)
        }
    }
}

Button("Toggle") {
    withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)
将水平滚动延伸到侧边栏下方

要允许水平滚动内容延伸到侧边栏或检查器下方,请确保 ScrollView 内容到达容器的 leading/trailing 边缘。当布局延伸到边缘时,系统会自动处理侧边栏下方的滚动行为——无需额外的修饰符。

核心模式 — UIKit

基本 UIGlassEffect
swift
let glassEffect = UIGlassEffect()
glassEffect.tintColor = UIColor.systemBlue.withAlphaComponent(0.3)
glassEffect.isInteractive = true

let visualEffectView = UIVisualEffectView(effect: glassEffect)
visualEffectView.translatesAutoresizingMaskIntoConstraints = false
visualEffectView.layer.cornerRadius = 20
visualEffectView.clipsToBounds = true

view.addSubview(visualEffectView)
NSLayoutConstraint.activate([
    visualEffectView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
    visualEffectView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
    visualEffectView.widthAnchor.constraint(equalToConstant: 200),
    visualEffectView.heightAnchor.constraint(equalToConstant: 120)
])

// Add content to contentView
let label = UILabel()
label.text = "Liquid Glass"
label.translatesAutoresizingMaskIntoConstraints = false
visualEffectView.contentView.addSubview(label)
NSLayoutConstraint.activate([
    label.centerXAnchor.constraint(equalTo: visualEffectView.contentView.centerXAnchor),
    label.centerYAnchor.constraint(equalTo: visualEffectView.contentView.centerYAnchor)
])
用于多个元素的 UIGlassContainerEffect
swift
let containerEffect = UIGlassContainerEffect()
containerEffect.spacing = 40.0

let containerView = UIVisualEffectView(effect: containerEffect)

let firstGlass = UIVisualEffectView(effect: UIGlassEffect())
let secondGlass = UIVisualEffectView(effect: UIGlassEffect())

containerView.contentView.addSubview(firstGlass)
containerView.contentView.addSubview(secondGlass)
滚动边缘效果
swift
scrollView.topEdgeEffect.style = .automatic
scrollView.bottomEdgeEffect.style = .hard
scrollView.leftEdgeEffect.isHidden = true
工具栏玻璃集成
swift
let favoriteButton = UIBarButtonItem(image: UIImage(systemName: "heart"), style: .plain, target: self, action: #selector(favoriteAction))
favoriteButton.hidesSharedBackground = true  // Opt out of shared glass background

核心模式 — WidgetKit

渲染模式检测
swift
struct MyWidgetView: View {
    @Environment(\.widgetRenderingMode) var renderingMode

    var body: some View {
        if renderingMode == .accented {
            // Tinted mode: white-tinted, themed glass background
        } else {
            // Full color mode: standard appearance
        }
    }
}
用于视觉层次结构的强调色组
swift
HStack {
    VStack(alignment: .leading) {
        Text("Title")
            .widgetAccentable()  // Accent group
        Text("Subtitle")
            // Primary group (default)
    }
    Image(systemName: "star.fill")
        .widgetAccentable()  // Accent group
}
强调模式下的图像渲染
swift
Image("myImage")
    .widgetAccentedRenderingMode(.monochrome)
容器背景
swift
VStack { /* content */ }
    .containerBackground(for: .widget) {
        Color.blue.opacity(0.2)
    }

关键设计决策

决策理由
使用 GlassEffectContainer 包装性能优化,实现玻璃元素之间的变形
spacing 参数控制合并距离——微调元素需要多近才能融合
@Namespace + glassEffectID在视图层次结构变化时实现平滑的变形过渡
interactive() 修饰符明确选择加入触摸/指针反应——并非所有玻璃都应响应
UIKit 中的 UIGlassContainerEffect与 SwiftUI 保持一致的容器模式
小组件中的强调色渲染模式当用户选择带色调的主屏幕时,系统会应用带色调的玻璃效果

最佳实践

  • 始终使用 GlassEffectContainer 来为多个兄弟视图应用玻璃效果——它支持变形并提高渲染性能
  • 在其他外观修饰符(frame、font、padding)之后应用 .glassEffect()
  • 仅在响应用户交互的元素(按钮、可切换项目)上使用 .interactive()
  • 仔细选择容器中的间距,以控制玻璃效果何时合并
  • 在更改视图层次结构时使用 withAnimation,以启用平滑的变形过渡
  • 在各种外观模式下测试——浅色模式、深色模式和强调色/色调模式
  • 确保可访问性对比度——玻璃上的文本必须保持可读性

应避免的反模式

  • 使用多个独立的 .glassEffect() 视图而不使用 GlassEffectContainer
  • 嵌套过多玻璃效果——会降低性能和视觉清晰度
  • 对每个视图都应用玻璃效果——保留给交互元素、工具栏和卡片
  • 在 UIKit 中使用圆角时忘记 clipsToBounds = true
  • 忽略小组件中的强调色渲染模式——破坏带色调的主屏幕外观
  • 在玻璃效果后面使用不透明背景——破坏了半透明效果

使用场景

  • 采用 iOS 26 新设计的导航栏、工具栏和标签栏
  • 浮动操作按钮和卡片式容器
  • 需要视觉深度和触摸反馈的交互控件
  • 应与系统 Liquid Glass 外观集成的小组件
  • 相关 UI 状态之间的变形过渡

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/zh-CN/skills/liquid-glass-design of affaan-m/ECC.

Open the folder on GitHubat commit 2d515e4

Used in 3 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Liquid Glass Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Liquid Glass Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Liquid Glass Design this skillaffaan-m/ECC277k3 repos~1.7kAutomated safety check: PassMIT
Update Swiftui APIsAvdLee/SwiftUI-Agent-Skill3.7k—~1.2kAutomated safety check: PassMIT
Swiftui Liquid Glassharperreed/dotfiles3348 repos~941Automated safety check: PassNone
Swiftui Expert Skillomarshahine/HomeClaw1764 repos~2.8kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1445 repos~1.2kAutomated safety check: PassMIT
Liquid Glass DesignAstraFoundry/KumoApp2915 repos~2.3kAutomated safety check: PassAGPL-3.0

Similar skills

  • Update Swiftui APIs

    AvdLee/SwiftUI-Agent-Skill

    Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements.

    3.7k GitHub stars~1.2k tokensUpdated 5 days ago
    MobileAuto-check passed
  • Swiftui Liquid Glass

    harperreed/dotfiles

    Implement, review, or improve SwiftUI features using the iOS 26+ Liquid Glass API.

    334 GitHub starsUsed in 8 repos~941 tokens
    MobileAuto-check passed
  • Swiftui Expert Skill

    omarshahine/HomeClaw

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…

    176 GitHub starsUsed in 4 repos~2.8k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    144 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Liquid Glass Design

    AstraFoundry/KumoApp

    iOS 26 Liquid Glass design system — dynamic glass material with blur, reflection, and interactive morphing for SwiftUI, UIKit, and WidgetKit.

    291 GitHub starsUsed in 5 repos~2.3k tokens
    MobileAuto-check passed
  • Swiftui Expert Skill

    ilyas-hallak/romm-ios-app

    Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, and iOS 26+ Liquid Glass adoption.

    173 GitHub starsUsed in 1 repo~2.9k tokens
    MobileAuto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Works with

Categories

Questions about Liquid Glass Design

What does Liquid Glass Design do?

iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。. Liquid Glass Design is an agent skill from affaan-m/ECC.

When should I use Liquid Glass Design?

Liquid Glass Design fits situations like: tasks that involve iOS development.

How do I install Liquid Glass Design in Claude Code?

Run `npx skills add affaan-m/ECC --skill liquid-glass-design -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/liquid-glass-design in affaan-m/ECC) into .claude/skills/liquid-glass-design in your project. Claude Code loads it when a task matches its description.

How do I install Liquid Glass Design in Codex?

Run `npx skills add affaan-m/ECC --skill liquid-glass-design -a codex`. Or copy the skill folder (docs/zh-CN/skills/liquid-glass-design in affaan-m/ECC) into .agents/skills/liquid-glass-design in your project. Codex loads it when a task matches its description.

Can I use Liquid Glass Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill liquid-glass-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/liquid-glass-design, .gemini/skills/liquid-glass-design, .github/skills/liquid-glass-design and .opencode/skills/liquid-glass-design in your project.

What does Liquid Glass Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Liquid Glass Design is instructions for the agent only.

Does Liquid Glass Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Liquid Glass Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Liquid Glass Design use?

Liquid Glass Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Liquid Glass Design use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Liquid Glass Design?

Skills that share tags, products or a category with Liquid Glass Design: Update Swiftui APIs (AvdLee/SwiftUI-Agent-Skill, 3.7k stars), Swiftui Liquid Glass (harperreed/dotfiles, 334 stars), Swiftui Expert Skill (omarshahine/HomeClaw, 176 stars) and Hig Project Context (raintree-technology/hig-doctor, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Liquid Glass Design?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,673 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 11, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.