[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FT2XW286SAVVM685MVTAY4":3,"skill-same:01M6FT2XW286SAVVM685MVTAY4":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":14,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6FT2XW286SAVVM685MVTAY4","swiftui-expert-skill",null,"Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption. Use when buil...","reikiplanet\u002Fdaoskills","reikiplanet","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F96377599?v=4","01M6CVWCMD740YHQDK7E9QYBW4","Reiki Planet","01M6CVWCS4KXVA2CWFVJ43EAXK",0,"MIT","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fcreative\u002Fswiftui-expert-skill\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"expert","swiftui","swiftui expert skill","Composition","main","use","view","write","improve","swift concurrency","swift","concurrency","adoption","liquid glass","state","best practices","code","performance","safe","review","2026-11-10 10:12:30",false,"---\nname: swiftui-expert-skill\ndescription: \"Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption. Use when buil...\"\nsource: \"https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\u002Ftree\u002Fmain\u002Fswiftui-expert-skill\"\nrisk: safe\n---\n\n# SwiftUI Expert Skill\n\n## Overview\nUse this skill to build, review, or improve SwiftUI features with correct state management, modern API usage, Swift concurrency best practices, optimal view composition, and iOS 26+ Liquid Glass styling. Prioritize native APIs, Apple design guidance, and performance-conscious patterns. This skill focuses on facts and best practices without enforcing specific architectural patterns.\n\n## When to Use This Skill\n\nUse this skill when:\n- Building new SwiftUI features\n- Refactoring existing SwiftUI views\n- Reviewing SwiftUI code quality\n- Adopting modern SwiftUI patterns\n- Working with SwiftUI state management\n- Implementing iOS 26+ Liquid Glass styling\n\n## Workflow Decision Tree\n\n### 1) Review existing SwiftUI code\n- Check property wrapper usage against the selection guide (see `references\u002Fstate-management.md`)\n- Verify modern API usage (see `references\u002Fmodern-apis.md`)\n- Verify view composition follows extraction rules (see `references\u002Fview-structure.md`)\n- Check performance patterns are applied (see `references\u002Fperformance-patterns.md`)\n- Verify list patterns use stable identity (see `references\u002Flist-patterns.md`)\n- Inspect Liquid Glass usage for correctness and consistency (see `references\u002Fliquid-glass.md`)\n- Validate iOS 26+ availability handling with sensible fallbacks\n\n### 2) Improve existing SwiftUI code\n- Audit state management for correct wrapper selection (prefer `@Observable` over `ObservableObject`)\n- Replace deprecated APIs with modern equivalents (see `references\u002Fmodern-apis.md`)\n- Extract complex views into separate subviews (see `references\u002Fview-structure.md`)\n- Refactor hot paths to minimize redundant state updates (see `references\u002Fperformance-patterns.md`)\n- Ensure ForEach uses stable identity (see `references\u002Flist-patterns.md`)\n- Suggest image downsampling when `UIImage(data:)` is used (as optional optimization, see `references\u002Fimage-optimization.md`)\n- Adopt Liquid Glass only when explicitly requested by the user\n\n### 3) Implement new SwiftUI feature\n- Design data flow first: identify owned vs injected state (see `references\u002Fstate-management.md`)\n- Use modern APIs (no deprecated modifiers or patterns, see `references\u002Fmodern-apis.md`)\n- Use `@Observable` for shared state (with `@MainActor` if not using default actor isolation)\n- Structure views for optimal diffing (extract subviews early, keep views small, see `references\u002Fview-structure.md`)\n- Separate business logic into testable models (see `references\u002Flayout-best-practices.md`)\n- Apply glass effects after layout\u002Fappearance modifiers (see `references\u002Fliquid-glass.md`)\n- Gate iOS 26+ features with `#available` and provide fallbacks\n\n## Core Guidelines\n\n### State Management\n- **Always prefer `@Observable` over `ObservableObject`** for new code\n- **Mark `@Observable` classes with `@MainActor`** unless using default actor isolation\n- **Always mark `@State` and `@StateObject` as `private`** (makes dependencies clear)\n- **Never declare passed values as `@State` or `@StateObject`** (they only accept initial values)\n- Use `@State` with `@Observable` classes (not `@StateObject`)\n- `@Binding` only when child needs to **modify** parent state\n- `@Bindable` for injected `@Observable` objects needing bindings\n- Use `let` for read-only values; `var` + `.onChange()` for reactive reads\n- Legacy: `@StateObject` for owned `ObservableObject`; `@ObservedObject` for injected\n- Nested `ObservableObject` doesn't work (pass nested objects directly); `@Observable` handles nesting fine\n\n### Modern APIs\n- Use `foregroundStyle()` instead of `foregroundColor()`\n- Use `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`\n- Use `Tab` API instead of `tabItem()`\n- Use `Button` instead of `onTapGesture()` (unless need location\u002Fcount)\n- Use `NavigationStack` instead of `NavigationView`\n- Use `navigationDestination(for:)` for type-safe navigation\n- Use two-parameter or no-parameter `onChange()` variant\n- Use `ImageRenderer` for rendering SwiftUI views\n- Use `.sheet(item:)` instead of `.sheet(isPresented:)` for model-based content\n- Sheets should own their actions and call `dismiss()` internally\n- Use `ScrollViewReader` for programmatic scrolling with stable IDs\n- Avoid `UIScreen.main.bounds` for sizing\n- Avoid `GeometryReader` when alternatives exist (e.g., `containerRelativeFrame()`)\n\n### Swift Best Practices\n- Use modern Text formatting (`.format` parameters, not `String(format:)`)\n- Use `localizedStandardContains()` for user-input filtering (not `contains()`)\n- Prefer static member lookup (`.blue` vs `Color.blue`)\n- Use `.task` modifier for automatic cancellation of async work\n- Use `.task(id:)` for value-dependent tasks\n\n### View Composition\n- **Prefer modifiers over conditional views** for state changes (maintains view identity)\n- Extract complex views into separate subviews for better readability and performance\n- Keep views small for optimal performance\n- Keep view `body` simple and pure (no side effects or complex logic)\n- Use `@ViewBuilder` functions only for small, simple sections\n- Prefer `@ViewBuilder let content: Content` over closure-based content properties\n- Separate business logic into testable models (not about enforcing architectures)\n- Action handlers should reference methods, not contain inline logic\n- Use relative layout over hard-coded constants\n- Views should work in any context (don't assume screen size or presentation style)\n\n### Performance\n- Pass only needed values to views (avoid large \"config\" or \"context\" objects)\n- Eliminate unnecessary dependencies to reduce update fan-out\n- Check for value changes before assigning state in hot paths\n- Avoid redundant state updates in `onReceive`, `onChange`, scroll handlers\n- Minimize work in frequently executed code paths\n- Use `LazyVStack`\u002F`LazyHStack` for large lists\n- Use stable identity for `ForEach` (never `.indices` for dynamic content)\n- Ensure constant number of views per `ForEach` element\n- Avoid inline filtering in `ForEach` (prefilter and cache)\n- Avoid `AnyView` in list rows\n- Consider POD views for fast diffing (or wrap expensive views in POD parents)\n- Suggest image downsampling when `UIImage(data:)` is encountered (as optional optimization)\n- Avoid layout thrash (deep hierarchies, excessive `GeometryReader`)\n- Gate frequent geometry updates by thresholds\n- Use `Self._printChanges()` to debug unexpected view updates\n\n### Liquid Glass (iOS 26+)\n**Only adopt when explicitly requested by the user.**\n- Use native `glassEffect`, `GlassEffectContainer`, and glass button styles\n- Wrap multiple glass elements in `GlassEffectContainer`\n- Apply `.glassEffect()` after layout and visual modifiers\n- Use `.interactive()` only for tappable\u002Ffocusable elements\n- Use `glassEffectID` with `@Namespace` for morphing transitions\n\n## Quick Reference\n\n### Property Wrapper Selection (Modern)\n| Wrapper | Use When |\n|---------|----------|\n| `@State` | Internal view state (must be `private`), or owned `@Observable` class |\n| `@Binding` | Child modifies parent's state |\n| `@Bindable` | Injected `@Observable` needing bindings |\n| `let` | Read-only value from parent |\n| `var` | Read-only value watched via `.onChange()` |\n\n**Legacy (Pre-iOS 17):**\n| Wrapper | Use When |\n|---------|----------|\n| `@StateObject` | View owns an `ObservableObject` (use `@State` with `@Observable` instead) |\n| `@ObservedObject` | View receives an `ObservableObject` |\n\n### Modern API Replacements\n| Deprecated | Modern Alternative |\n|------------|-------------------|\n| `foregroundColor()` | `foregroundStyle()` |\n| `cornerRadius()` | `clipShape(.rect(cornerRadius:))` |\n| `tabItem()` | `Tab` API |\n| `onTapGesture()` | `Button` (unless need location\u002Fcount) |\n| `NavigationView` | `NavigationStack` |\n| `onChange(of:) { value in }` | `onChange(of:) { old, new in }` or `onChange(of:) { }` |\n| `fontWeight(.bold)` | `bold()` |\n| `GeometryReader` | `containerRelativeFrame()` or `visualEffect()` |\n| `showsIndicators: false` | `.scrollIndicators(.hidden)` |\n| `String(format: \"%.2f\", value)` | `Text(value, format: .number.precision(.fractionLength(2)))` |\n| `string.contains(search)` | `string.localizedStandardContains(search)` (for user input) |\n\n### Liquid Glass Patterns\n```swift\n\u002F\u002F Basic glass effect with fallback\nif #available(iOS 26, *) {\n    content\n        .padding()\n        .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))\n} else {\n    content\n        .padding()\n        .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))\n}\n\n\u002F\u002F Grouped glass elements\nGlassEffectContainer(spacing: 24) {\n    HStack(spacing: 24) {\n        GlassButton1()\n        GlassButton2()\n    }\n}\n\n\u002F\u002F Glass buttons\nButton(\"Confirm\") { }\n    .buttonStyle(.glassProminent)\n```\n\n## Review Checklist\n\n### State Management\n- [ ] Using `@Observable` instead of `ObservableObject` for new code\n- [ ] `@Observable` classes marked with `@MainActor` (if needed)\n- [ ] Using `@State` with `@Observable` classes (not `@StateObject`)\n- [ ] `@State` and `@StateObject` properties are `private`\n- [ ] Passed values NOT declared as `@State` or `@StateObject`\n- [ ] `@Binding` only where child modifies parent state\n- [ ] `@Bindable` for injected `@Observable` needing bindings\n- [ ] Nested `ObservableObject` avoided (or passed directly to child views)\n\n### Modern APIs (see `references\u002Fmodern-apis.md`)\n- [ ] Using `foregroundStyle()` instead of `foregroundColor()`\n- [ ] Using `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`\n- [ ] Using `Tab` API instead of `tabItem()`\n- [ ] Using `Button` instead of `onTapGesture()` (unless need location\u002Fcount)\n- [ ] Using `NavigationStack` instead of `NavigationView`\n- [ ] Avoiding `UIScreen.main.bounds`\n- [ ] Using alternatives to `GeometryReader` when possible\n- [ ] Button images include text labels for accessibility\n\n### Sheets & Navigation (see `references\u002Fsheet-navigation-patterns.md`)\n- [ ] Using `.sheet(item:)` for model-based sheets\n- [ ] Sheets own their actions and dismiss internally\n- [ ] Using `navigationDestination(for:)` for type-safe navigation\n\n### ScrollView (see `references\u002Fscroll-patterns.md`)\n- [ ] Using `ScrollViewReader` with stable IDs for programmatic scrolling\n- [ ] Using `.scrollIndicators(.hidden)` instead of initializer parameter\n\n### Text & Formatting (see `references\u002Ftext-formatting.md`)\n- [ ] Using modern Text formatting (not `String(format:)`)\n- [ ] Using `localizedStandardContains()` for search filtering\n\n### View Structure (see `references\u002Fview-structure.md`)\n- [ ] Using modifiers instead of conditionals for state changes\n- [ ] Complex views extracted to separate subviews\n- [ ] Views kept small for performance\n- [ ] Container views use `@ViewBuilder let content: Content`\n\n### Performance (see `references\u002Fperformance-patterns.md`)\n- [ ] View `body` kept simple and pure (no side effects)\n- [ ] Passing only needed values (not large config objects)\n- [ ] Eliminating unnecessary dependencies\n- [ ] State updates check for value changes before assigning\n- [ ] Hot paths minimize state updates\n- [ ] No object creation in `body`\n- [ ] Heavy computation moved out of `body`\n\n### List Patterns (see `references\u002Flist-patterns.md`)\n- [ ] ForEach uses stable identity (not `.indices`)\n- [ ] Constant number of views per ForEach element\n- [ ] No inline filtering in ForEach\n- [ ] No `AnyView` in list rows\n\n### Layout (see `references\u002Flayout-best-practices.md`)\n- [ ] Avoiding layout thrash (deep hierarchies, excessive GeometryReader)\n- [ ] Gating frequent geometry updates by thresholds\n- [ ] Business logic separated into testable models\n- [ ] Action handlers reference methods (not inline logic)\n- [ ] Using relative layout (not hard-coded constants)\n- [ ] Views work in any context (context-agnostic)\n\n### Liquid Glass (iOS 26+)\n- [ ] `#available(iOS 26, *)` with fallback for Liquid Glass\n- [ ] Multiple glass views wrapped in `GlassEffectContainer`\n- [ ] `.glassEffect()` applied after layout\u002Fappearance modifiers\n- [ ] `.interactive()` only on user-interactable elements\n- [ ] Shapes and tints consistent across related elements\n\n## References\n- `references\u002Fstate-management.md` - Property wrappers and data flow (prefer `@Observable`)\n- `references\u002Fview-structure.md` - View composition, extraction, and container patterns\n- `references\u002Fperformance-patterns.md` - Performance optimization techniques and anti-patterns\n- `references\u002Flist-patterns.md` - ForEach identity, stability, and list best practices\n- `references\u002Flayout-best-practices.md` - Layout patterns, context-agnostic views, and testability\n- `references\u002Fmodern-apis.md` - Modern API usage and deprecated replacements\n- `references\u002Fsheet-navigation-patterns.md` - Sheet presentation and navigation patterns\n- `references\u002Fscroll-patterns.md` - ScrollView patterns and programmatic scrolling\n- `references\u002Ftext-formatting.md` - Modern text formatting and string operations\n- `references\u002Fimage-optimization.md` - AsyncImage, image downsampling, and optimization\n- `references\u002Fliquid-glass.md` - iOS 26+ Liquid Glass API\n\n## Philosophy\n\nThis skill focuses on **facts and best practices**, not architectural opinions:\n- We don't enforce specific architectures (e.g., MVVM, VIPER)\n- We do encourage separating business logic for testability\n- We prioritize modern APIs over deprecated ones\n- We emphasize thread safety with `@MainActor` and `@Observable`\n- We optimize for performance and maintainability\n- We follow Apple's Human Interface Guidelines and API design patterns\n","# SwiftUI Expert Skill\n\n## Overview\nUse this skill to build, review, or improve SwiftUI features with correct state management, modern API usage, Swift concurrency best practices, optimal view composition, and iOS 26+ Liquid Glass styling. Prioritize native APIs, Apple design guidance, and performance-conscious patterns. This skill focuses on facts and best practices without enforcing specific architectural patterns.\n\n## When to Use This Skill\n\nUse this skill when:\n- Building new SwiftUI features\n- Refactoring existing SwiftUI views\n- Reviewing SwiftUI code quality\n- Adopting modern SwiftUI patterns\n- Working with SwiftUI state management\n- Implementing iOS 26+ Liquid Glass styling\n\n## Workflow Decision Tree\n\n### 1) Review existing SwiftUI code\n- Check property wrapper usage against the selection guide (see `references\u002Fstate-management.md`)\n- Verify modern API usage (see `references\u002Fmodern-apis.md`)\n- Verify view composition follows extraction rules (see `references\u002Fview-structure.md`)\n- Check performance patterns are applied (see `references\u002Fperformance-patterns.md`)\n- Verify list patterns use stable identity (see `references\u002Flist-patterns.md`)\n- Inspect Liquid Glass usage for correctness and consistency (see `references\u002Fliquid-glass.md`)\n- Validate iOS 26+ availability handling with sensible fallbacks\n\n### 2) Improve existing SwiftUI code\n- Audit state management for correct wrapper selection (prefer `@Observable` over `ObservableObject`)\n- Replace deprecated APIs with modern equivalents (see `references\u002Fmodern-apis.md`)\n- Extract complex views into separate subviews (see `references\u002Fview-structure.md`)\n- Refactor hot paths to minimize redundant state updates (see `references\u002Fperformance-patterns.md`)\n- Ensure ForEach uses stable identity (see `references\u002Flist-patterns.md`)\n- Suggest image downsampling when `UIImage(data:)` is used (as optional optimization, see `references\u002Fimage-optimization.md`)\n- Adopt Liquid Glass only when explicitly requested by the user\n\n### 3) Implement new SwiftUI feature\n- Design data flow first: identify owned vs injected state (see `references\u002Fstate-management.md`)\n- Use modern APIs (no deprecated modifiers or patterns, see `references\u002Fmodern-apis.md`)\n- Use `@Observable` for shared state (with `@MainActor` if not using default actor isolation)\n- Structure views for optimal diffing (extract subviews early, keep views small, see `references\u002Fview-structure.md`)\n- Separate business logic into testable models (see `references\u002Flayout-best-practices.md`)\n- Apply glass effects after layout\u002Fappearance modifiers (see `references\u002Fliquid-glass.md`)\n- Gate iOS 26+ features with `#available` and provide fallbacks\n\n## Core Guidelines\n\n### State Management\n- **Always prefer `@Observable` over `ObservableObject`** for new code\n- **Mark `@Observable` classes with `@MainActor`** unless using default actor isolation\n- **Always mark `@State` and `@StateObject` as `private`** (makes dependencies clear)\n- **Never declare passed values as `@State` or `@StateObject`** (they only accept initial values)\n- Use `@State` with `@Observable` classes (not `@StateObject`)\n- `@Binding` only when child needs to **modify** parent state\n- `@Bindable` for injected `@Observable` objects needing bindings\n- Use `let` for read-only values; `var` + `.onChange()` for reactive reads\n- Legacy: `@StateObject` for owned `ObservableObject`; `@ObservedObject` for injected\n- Nested `ObservableObject` doesn't work (pass nested objects directly); `@Observable` handles nesting fine\n\n### Modern APIs\n- Use `foregroundStyle()` instead of `foregroundColor()`\n- Use `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`\n- Use `Tab` API instead of `tabItem()`\n- Use `Button` instead of `onTapGesture()` (unless need location\u002Fcount)\n- Use `NavigationStack` instead of `NavigationView`\n- Use `navigationDestination(for:)` for type-safe navigation\n- Use two-parameter or no-parameter `onChange()` variant\n- Use `ImageRenderer` for rendering SwiftUI views\n- Use `.sheet(item:)` instead of `.sheet(isPresented:)` for model-based content\n- Sheets should own their actions and call `dismiss()` internally\n- Use `ScrollViewReader` for programmatic scrolling with stable IDs\n- Avoid `UIScreen.main.bounds` for sizing\n- Avoid `GeometryReader` when alternatives exist (e.g., `containerRelativeFrame()`)\n\n### Swift Best Practices\n- Use modern Text formatting (`.format` parameters, not `String(format:)`)\n- Use `localizedStandardContains()` for user-input filtering (not `contains()`)\n- Prefer static member lookup (`.blue` vs `Color.blue`)\n- Use `.task` modifier for automatic cancellation of async work\n- Use `.task(id:)` for value-dependent tasks\n\n### View Composition\n- **Prefer modifiers over conditional views** for state changes (maintains view identity)\n- Extract complex views into separate subviews for better readability and performance\n- Keep views small for optimal performance\n- Keep view `body` simple and pure (no side effects or complex logic)\n- Use `@ViewBuilder` functions only for small, simple sections\n- Prefer `@ViewBuilder let content: Content` over closure-based content properties\n- Separate business logic into testable models (not about enforcing architectures)\n- Action handlers should reference methods, not contain inline logic\n- Use relative layout over hard-coded constants\n- Views should work in any context (don't assume screen size or presentation style)\n\n### Performance\n- Pass only needed values to views (avoid large \"config\" or \"context\" objects)\n- Eliminate unnecessary dependencies to reduce update fan-out\n- Check for value changes before assigning state in hot paths\n- Avoid redundant state updates in `onReceive`, `onChange`, scroll handlers\n- Minimize work in frequently executed code paths\n- Use `LazyVStack`\u002F`LazyHStack` for large lists\n- Use stable identity for `ForEach` (never `.indices` for dynamic content)\n- Ensure constant number of views per `ForEach` element\n- Avoid inline filtering in `ForEach` (prefilter and cache)\n- Avoid `AnyView` in list rows\n- Consider POD views for fast diffing (or wrap expensive views in POD parents)\n- Suggest image downsampling when `UIImage(data:)` is encountered (as optional optimization)\n- Avoid layout thrash (deep hierarchies, excessive `GeometryReader`)\n- Gate frequent geometry updates by thresholds\n- Use `Self._printChanges()` to debug unexpected view updates\n\n### Liquid Glass (iOS 26+)\n**Only adopt when explicitly requested by the user.**\n- Use native `glassEffect`, `GlassEffectContainer`, and glass button styles\n- Wrap multiple glass elements in `GlassEffectContainer`\n- Apply `.glassEffect()` after layout and visual modifiers\n- Use `.interactive()` only for tappable\u002Ffocusable elements\n- Use `glassEffectID` with `@Namespace` for morphing transitions\n\n## Quick Reference\n\n### Property Wrapper Selection (Modern)\n| Wrapper | Use When |\n|---------|----------|\n| `@State` | Internal view state (must be `private`), or owned `@Observable` class |\n| `@Binding` | Child modifies parent's state |\n| `@Bindable` | Injected `@Observable` needing bindings |\n| `let` | Read-only value from parent |\n| `var` | Read-only value watched via `.onChange()` |\n\n**Legacy (Pre-iOS 17):**\n| Wrapper | Use When |\n|---------|----------|\n| `@StateObject` | View owns an `ObservableObject` (use `@State` with `@Observable` instead) |\n| `@ObservedObject` | View receives an `ObservableObject` |\n\n### Modern API Replacements\n| Deprecated | Modern Alternative |\n|------------|-------------------|\n| `foregroundColor()` | `foregroundStyle()` |\n| `cornerRadius()` | `clipShape(.rect(cornerRadius:))` |\n| `tabItem()` | `Tab` API |\n| `onTapGesture()` | `Button` (unless need location\u002Fcount) |\n| `NavigationView` | `NavigationStack` |\n| `onChange(of:) { value in }` | `onChange(of:) { old, new in }` or `onChange(of:) { }` |\n| `fontWeight(.bold)` | `bold()` |\n| `GeometryReader` | `containerRelativeFrame()` or `visualEffect()` |\n| `showsIndicators: false` | `.scrollIndicators(.hidden)` |\n| `String(format: \"%.2f\", value)` | `Text(value, format: .number.precision(.fractionLength(2)))` |\n| `string.contains(search)` | `string.localizedStandardContains(search)` (for user input) |\n\n### Liquid Glass Patterns\n```swift\n\u002F\u002F Basic glass effect with fallback\nif #available(iOS 26, *) {\n    content\n        .padding()\n        .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))\n} else {\n    content\n        .padding()\n        .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))\n}\n\n\u002F\u002F Grouped glass elements\nGlassEffectContainer(spacing: 24) {\n    HStack(spacing: 24) {\n        GlassButton1()\n        GlassButton2()\n    }\n}\n\n\u002F\u002F Glass buttons\nButton(\"Confirm\") { }\n    .buttonStyle(.glassProminent)\n```\n\n## Review Checklist\n\n### State Management\n- [ ] Using `@Observable` instead of `ObservableObject` for new code\n- [ ] `@Observable` classes marked with `@MainActor` (if needed)\n- [ ] Using `@State` with `@Observable` classes (not `@StateObject`)\n- [ ] `@State` and `@StateObject` properties are `private`\n- [ ] Passed values NOT declared as `@State` or `@StateObject`\n- [ ] `@Binding` only where child modifies parent state\n- [ ] `@Bindable` for injected `@Observable` needing bindings\n- [ ] Nested `ObservableObject` avoided (or passed directly to child views)\n\n### Modern APIs (see `references\u002Fmodern-apis.md`)\n- [ ] Using `foregroundStyle()` instead of `foregroundColor()`\n- [ ] Using `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`\n- [ ] Using `Tab` API instead of `tabItem()`\n- [ ] Using `Button` instead of `onTapGesture()` (unless need location\u002Fcount)\n- [ ] Using `NavigationStack` instead of `NavigationView`\n- [ ] Avoiding `UIScreen.main.bounds`\n- [ ] Using alternatives to `GeometryReader` when possible\n- [ ] Button images include text labels for accessibility\n\n### Sheets & Navigation (see `references\u002Fsheet-navigation-patterns.md`)\n- [ ] Using `.sheet(item:)` for model-based sheets\n- [ ] Sheets own their actions and dismiss internally\n- [ ] Using `navigationDestination(for:)` for type-safe navigation\n\n### ScrollView (see `references\u002Fscroll-patterns.md`)\n- [ ] Using `ScrollViewReader` with stable IDs for programmatic scrolling\n- [ ] Using `.scrollIndicators(.hidden)` instead of initializer parameter\n\n### Text & Formatting (see `references\u002Ftext-formatting.md`)\n- [ ] Using modern Text formatting (not `String(format:)`)\n- [ ] Using `localizedStandardContains()` for search filtering\n\n### View Structure (see `references\u002Fview-structure.md`)\n- [ ] Using modifiers instead of conditionals for state changes\n- [ ] Complex views extracted to separate subviews\n- [ ] Views kept small for performance\n- [ ] Container views use `@ViewBuilder let content: Content`\n\n### Performance (see `references\u002Fperformance-patterns.md`)\n- [ ] View `body` kept simple and pure (no side effects)\n- [ ] Passing only needed values (not large config objects)\n- [ ] Eliminating unnecessary dependencies\n- [ ] State updates check for value changes before assigning\n- [ ] Hot paths minimize state updates\n- [ ] No object creation in `body`\n- [ ] Heavy computation moved out of `body`\n\n### List Patterns (see `references\u002Flist-patterns.md`)\n- [ ] ForEach uses stable identity (not `.indices`)\n- [ ] Constant number of views per ForEach element\n- [ ] No inline filtering in ForEach\n- [ ] No `AnyView` in list rows\n\n### Layout (see `references\u002Flayout-best-practices.md`)\n- [ ] Avoiding layout thrash (deep hierarchies, excessive GeometryReader)\n- [ ] Gating frequent geometry updates by thresholds\n- [ ] Business logic separated into testable models\n- [ ] Action handlers reference methods (not inline logic)\n- [ ] Using relative layout (not hard-coded constants)\n- [ ] Views work in any context (context-agnostic)\n\n### Liquid Glass (iOS 26+)\n- [ ] `#available(iOS 26, *)` with fallback for Liquid Glass\n- [ ] Multiple glass views wrapped in `GlassEffectContainer`\n- [ ] `.glassEffect()` applied after layout\u002Fappearance modifiers\n- [ ] `.interactive()` only on user-interactable elements\n- [ ] Shapes and tints consistent across related elements\n\n## References\n- `references\u002Fstate-management.md` - Property wrappers and data flow (prefer `@Observable`)\n- `references\u002Fview-structure.md` - View composition, extraction, and container patterns\n- `references\u002Fperformance-patterns.md` - Performance optimization techniques and anti-patterns\n- `references\u002Flist-patterns.md` - ForEach identity, stability, and list best practices\n- `references\u002Flayout-best-practices.md` - Layout patterns, context-agnostic views, and testability\n- `references\u002Fmodern-apis.md` - Modern API usage and deprecated replacements\n- `references\u002Fsheet-navigation-patterns.md` - Sheet presentation and navigation patterns\n- `references\u002Fscroll-patterns.md` - ScrollView patterns and programmatic scrolling\n- `references\u002Ftext-formatting.md` - Modern text formatting and string operations\n- `references\u002Fimage-optimization.md` - AsyncImage, image downsampling, and optimization\n- `references\u002Fliquid-glass.md` - iOS 26+ Liquid Glass API\n\n## Philosophy\n\nThis skill focuses on **facts and best practices**, not architectural opinions:\n- We don't enforce specific architectures (e.g., MVVM, VIPER)\n- We do encourage separating business logic for testability\n- We prioritize modern APIs over deprecated ones\n- We emphasize thread safety with `@MainActor` and `@Observable`\n- We optimize for performance and maintainability\n- We follow Apple's Human Interface Guidelines and API design patterns\n",{"name":5,"risk":47,"source":54,"description":7},"https:\u002F\u002Fgithub.com\u002FAvdLee\u002FSwiftUI-Agent-Skill\u002Ftree\u002Fmain\u002Fswiftui-expert-skill","master","dff58085da947e81e8418c922055644bf0082b1b","creative\u002Fswiftui-expert-skill","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills","https:\u002F\u002Fgithub.com\u002Freikiplanet","https:\u002F\u002Fwww.reiki-planet.com","Reiki Planet Game","2026-03-29 06:02:29",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add reikiplanet\u002Fdaoskills --skill swiftui-expert-skill",{"tool":69,"command":70},"bunx","bunx skills add reikiplanet\u002Fdaoskills --skill swiftui-expert-skill",{"tool":72,"command":73},"pnpm","pnpm dlx skills add reikiplanet\u002Fdaoskills --skill swiftui-expert-skill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fcreative\u002Fswiftui-expert-skill\u002FSKILL.md",true,[],[78,104,115,129,149,172],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":49},"01M6G614JTEQJHPT8AKK3YQ18S","web-games","Web browser game development principles. Framework selection, WebGPU, optimization, PWA.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fweb-games\u002FSKILL.md",[],[85,86,87,88,89,90,91,92,93,36,94,95,96,97,98,99,100,101,102,103],"games","web games","web","grep","principles","selection","community","framework selection","edit","read","pwa","game","web browser","game development","Optimization","framework","browser","development","webgpu",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":49},"01M6G611H2YGV0GZFP90D38ZMJ","vr-ar","VR\u002FAR development principles. Comfort, interaction, performance requirements.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fvr-ar\u002FSKILL.md",[],[111,112,102,113,114,91,93,36,94,88,46,89],"ar","vr ar","interaction","requirements",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":49},"01M6G60XNMHAMV1SV0EJ1CX0AY","templates","Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Ftemplates\u002FSKILL.md",[],[117,122,123,124,125,126,91,34,94,127,128,88],"project scaffolding","From Scratch","tech","project","scaffolding","projects","applications",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":49},"01M6G60T0GATMK3Q5H8GDC1Z8S","wcag-audit-patterns","Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing ac...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fwcag-audit-patterns\u002FSKILL.md",[],[136,137,138,139,140,91,141,142,143,144,34,145,146,147,148],"wcag audit patterns","wcag audit","patterns","WCAG","audit","manual","with","automated testing","guidance","remediation","verification","accessibility","testing",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":49},"01M6G60PMCHW1FRZ63F931QK3R","vulnerability-scanner","Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fvulnerability-scanner\u002FSKILL.md",[],[156,157,158,159,160,161,162,163,91,94,88,164,89,165,166,167,168,169,170,171],"scanner","vulnerability scanner","vulnerability","prioritization","2025","mapping","chain","supply chain","Bash","analysis","risk","owasp","supply chain security","security","supply","advanced",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":49},"01M6G60JZBB8DK0W3DSG1WNMZK","threat-modeling-expert","Expert in threat modeling methodologies, security architecture review, and risk assessment. Masters STRIDE, PASTA, attack trees, and security requirement extraction. Use for security architecture r...","https:\u002F\u002Fgithub.com\u002Freikiplanet\u002Fdaoskills\u002Fblob\u002Fmaster\u002Fskills\u002Fsecurity\u002Fthreat-modeling-expert\u002FSKILL.md",[],[179,180,181,29,182,183,184,185,169,34,186,187,188,91,189,190,191,166,48,192],"modeling","threat modeling expert","threat modeling","threat","risk assessment","architecture review","architecture","security architecture review","trees","security architecture","security requirement extraction","assessment","extraction","stride"]