Token导航 LogoToken导航

Agent Skill · 效率

swiftui-expert-skill(swiftui 专家技能)

swiftui-expert-skill 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

swiftui-expert-skill 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 10,693。

总安装 5,028周安装 216GitHub Stars 公开资料未说明下载 1,763核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:swiftui-expert-skill(swiftui 专家技能)
来源仓库:https://github.com/soponcd/swiftui-expert-skill
安装命令:
openclaw skills install swiftui-expert-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install swiftui-expert-skill

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

基于现代 SwiftUI 最佳实践编写与审查代码。覆盖状态管理、视图组合与性能优化要点。swiftui-expert-skill 属于效率类 Skill,可作为该场景下的辅助能力补充。输出改进建议与重构方案,不直接修改生产代码。需确认 iOS 版本与开发工具链兼容性。建议配合 Xcode 预览功能验证界面效果。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install swiftui-expert-skill;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

swiftui-expert-skill 怎么安装?

在终端执行 openclaw skills install swiftui-expert-skill。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

swiftui-expert-skill 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

swiftui-expert-skill 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

swiftui-expert-skill 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

swiftui-expert-skill 用的人多吗?

公开数据是累计安装 5,028 次,近一周安装 216 次,下载 1,763 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

swiftui-expert-skill 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
swiftui-expert-skill

swiftui 专家技能 · 本页

5,028—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
swiftui-expert-skill
description
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 building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.
domain
ios-macos
homepage
https://github.com/soponcd/timeflow-skills/tree/main/teams/skills/swiftui-expert-skill
metadata
clawdbot
emoji
📱

SwiftUI Expert Skill

Overview

Use 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.

Workflow Decision Tree

1) Review existing SwiftUI code

  • Check property wrapper usage against the selection guide (see references/state-management.md)
  • Verify modern API usage (see references/modern-apis.md)
  • Verify view composition follows extraction rules (see references/view-structure.md)
  • Check performance patterns are applied (see references/performance-patterns.md)
  • Verify list patterns use stable identity (see references/list-patterns.md)
  • Check animation patterns for correctness (see references/animation-basics.md, references/animation-transitions.md)
  • Inspect Liquid Glass usage for correctness and consistency (see references/liquid-glass.md)
  • Validate iOS 26+ availability handling with sensible fallbacks

2) Improve existing SwiftUI code

  • Audit state management for correct wrapper selection (prefer @Observable over ObservableObject)
  • Replace deprecated APIs with modern equivalents (see references/modern-apis.md)
  • Extract complex views into separate subviews (see references/view-structure.md)
  • Refactor hot paths to minimize redundant state updates (see references/performance-patterns.md)
  • Ensure ForEach uses stable identity (see references/list-patterns.md)
  • Improve animation patterns (use value parameter, proper transitions, see references/animation-basics.md, references/animation-transitions.md)
  • Suggest image downsampling when UIImage(data:) is used (as optional optimization, see references/image-optimization.md)
  • Adopt Liquid Glass only when explicitly requested by the user

3) Implement new SwiftUI feature

  • Design data flow first: identify owned vs injected state (see references/state-management.md)
  • Use modern APIs (no deprecated modifiers or patterns, see references/modern-apis.md)
  • Use @Observable for shared state (with @MainActor if not using default actor isolation)
  • Structure views for optimal diffing (extract subviews early, keep views small, see references/view-structure.md)
  • Separate business logic into testable models (see references/layout-best-practices.md)
  • Use correct animation patterns (implicit vs explicit, transitions, see references/animation-basics.md, references/animation-transitions.md, references/animation-advanced.md)
  • Apply glass effects after layout/appearance modifiers (see references/liquid-glass.md)
  • Gate iOS 26+ features with #available and provide fallbacks

Core Guidelines

State Management

  • Always prefer @Observable over ObservableObject for new code
  • Mark @Observable classes with @MainActor unless using default actor isolation
  • Always mark @State and @StateObject as private (makes dependencies clear)
  • Never declare passed values as @State or @StateObject (they only accept initial values)
  • Use @State with @Observable classes (not @StateObject)
  • @Binding only when child needs to modify parent state
  • @Bindable for injected @Observable objects needing bindings
  • Use let for read-only values; var + .onChange() for reactive reads
  • Legacy: @StateObject for owned ObservableObject; @ObservedObject for injected
  • Nested ObservableObject doesn't work (pass nested objects directly); @Observable handles nesting fine

Modern APIs

  • Use foregroundStyle() instead of foregroundColor()
  • Use clipShape(.rect(cornerRadius:)) instead of cornerRadius()
  • Use Tab API instead of tabItem()
  • Use Button instead of onTapGesture() (unless need location/count)
  • Use NavigationStack instead of NavigationView
  • Use navigationDestination(for:) for type-safe navigation
  • Use two-parameter or no-parameter onChange() variant
  • Use ImageRenderer for rendering SwiftUI views
  • Use .sheet(item:) instead of .sheet(isPresented:) for model-based content
  • Sheets should own their actions and call dismiss() internally
  • Use ScrollViewReader for programmatic scrolling with stable IDs
  • Avoid UIScreen.main.bounds for sizing
  • Avoid GeometryReader when alternatives exist (e.g., containerRelativeFrame())

Swift Best Practices

  • Use modern Text formatting (.format parameters, not String(format:))
  • Use localizedStandardContains() for user-input filtering (not contains())
  • Prefer static member lookup (.blue vs Color.blue)
  • Use .task modifier for automatic cancellation of async work
  • Use .task(id:) for value-dependent tasks

View Composition

  • Prefer modifiers over conditional views for state changes (maintains view identity)
  • Extract complex views into separate subviews for better readability and performance
  • Keep views small for optimal performance
  • Keep view body simple and pure (no side effects or complex logic)
  • Use @ViewBuilder functions only for small, simple sections
  • Prefer @ViewBuilder let content: Content over closure-based content properties
  • Separate business logic into testable models (not about enforcing architectures)
  • Action handlers should reference methods, not contain inline logic
  • Use relative layout over hard-coded constants
  • Views should work in any context (don't assume screen size or presentation style)

Performance

  • Pass only needed values to views (avoid large "config" or "context" objects)
  • Eliminate unnecessary dependencies to reduce update fan-out
  • Check for value changes before assigning state in hot paths
  • Avoid redundant state updates in onReceive, onChange, scroll handlers
  • Minimize work in frequently executed code paths
  • Use LazyVStack/LazyHStack for large lists
  • Use stable identity for ForEach (never .indices for dynamic content)
  • Ensure constant number of views per ForEach element
  • Avoid inline filtering in ForEach (prefilter and cache)
  • Avoid AnyView in list rows
  • Consider POD views for fast diffing (or wrap expensive views in POD parents)
  • Suggest image downsampling when UIImage(data:) is encountered (as optional optimization)
  • Avoid layout thrash (deep hierarchies, excessive GeometryReader)
  • Gate frequent geometry updates by thresholds
  • Use Self._printChanges() to debug unexpected view updates

Animations

  • Use .animation(_:value:) with value parameter (deprecated version without value is too broad)
  • Use withAnimation for event-driven animations (button taps, gestures)
  • Prefer transforms (offset, scale, rotation) over layout changes (frame) for performance
  • Transitions require animations outside the conditional structure
  • Custom Animatable implementations must have explicit animatableData
  • Use .phaseAnimator for multi-step sequences (iOS 17+)
  • Use .keyframeAnimator for precise timing control (iOS 17+)
  • Animation completion handlers need .transaction(value:) for reexecution
  • Implicit animations override explicit animations (later in view tree wins)

Liquid Glass (iOS 26+)

Only adopt when explicitly requested by the user.

  • Use native glassEffect, GlassEffectContainer, and glass button styles
  • Wrap multiple glass elements in GlassEffectContainer
  • Apply .glassEffect() after layout and visual modifiers
  • Use .interactive() only for tappable/focusable elements
  • Use glassEffectID with @Namespace for morphing transitions

Quick Reference

Property Wrapper Selection (Modern)

WrapperUse When
@StateInternal view state (must be private), or owned @Observable class
@BindingChild modifies parent's state
@BindableInjected @Observable needing bindings
letRead-only value from parent
varRead-only value watched via .onChange()

Legacy (Pre-iOS 17):

WrapperUse When
@StateObjectView owns an ObservableObject (use @State with @Observable instead)
@ObservedObjectView receives an ObservableObject

Modern API Replacements

DeprecatedModern Alternative
foregroundColor()foregroundStyle()
cornerRadius()clipShape(.rect(cornerRadius:))
tabItem()Tab API
onTapGesture()Button (unless need location/count)
NavigationViewNavigationStack
onChange(of:) { value in }onChange(of:) { old, new in } or onChange(of:) { }
fontWeight(.bold)bold()
GeometryReadercontainerRelativeFrame() or visualEffect()
showsIndicators: false.scrollIndicators(.hidden)
String(format: "%.2f", value)Text(value, format: .number.precision(.fractionLength(2)))
string.contains(search)string.localizedStandardContains(search) (for user input)

Liquid Glass Patterns

// Basic glass effect with fallback
if #available(iOS 26, *) {
    content
        .padding()
        .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
    content
        .padding()
        .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}

// Grouped glass elements
GlassEffectContainer(spacing: 24) {
    HStack(spacing: 24) {
        GlassButton1()
        GlassButton2()
    }
}

// Glass buttons
Button("Confirm") { }
    .buttonStyle(.glassProminent)

Review Checklist

State Management

  • [ ] Using @Observable instead of ObservableObject for new code
  • [ ] @Observable classes marked with @MainActor (if needed)
  • [ ] Using @State with @Observable classes (not @StateObject)
  • [ ] @State and @StateObject properties are private
  • [ ] Passed values NOT declared as @State or @StateObject
  • [ ] @Binding only where child modifies parent state
  • [ ] @Bindable for injected @Observable needing bindings
  • [ ] Nested ObservableObject avoided (or passed directly to child views)

Modern APIs (see references/modern-apis.md)

  • [ ] Using foregroundStyle() instead of foregroundColor()
  • [ ] Using clipShape(.rect(cornerRadius:)) instead of cornerRadius()
  • [ ] Using Tab API instead of tabItem()
  • [ ] Using Button instead of onTapGesture() (unless need location/count)
  • [ ] Using NavigationStack instead of NavigationView
  • [ ] Avoiding UIScreen.main.bounds
  • [ ] Using alternatives to GeometryReader when possible
  • [ ] Button images include text labels for accessibility

Sheets & Navigation (see references/sheet-navigation-patterns.md)

  • [ ] Using .sheet(item:) for model-based sheets
  • [ ] Sheets own their actions and dismiss internally
  • [ ] Using navigationDestination(for:) for type-safe navigation

ScrollView (see references/scroll-patterns.md)

  • [ ] Using ScrollViewReader with stable IDs for programmatic scrolling
  • [ ] Using .scrollIndicators(.hidden) instead of initializer parameter

Text & Formatting (see references/text-formatting.md)

  • [ ] Using modern Text formatting (not String(format:))
  • [ ] Using localizedStandardContains() for search filtering

View Structure (see references/view-structure.md)

  • [ ] Using modifiers instead of conditionals for state changes
  • [ ] Complex views extracted to separate subviews
  • [ ] Views kept small for performance
  • [ ] Container views use @ViewBuilder let content: Content

Performance (see references/performance-patterns.md)

  • [ ] View body kept simple and pure (no side effects)
  • [ ] Passing only needed values (not large config objects)
  • [ ] Eliminating unnecessary dependencies
  • [ ] State updates check for value changes before assigning
  • [ ] Hot paths minimize state updates
  • [ ] No object creation in body
  • [ ] Heavy computation moved out of body

List Patterns (see references/list-patterns.md)

  • [ ] ForEach uses stable identity (not .indices)
  • [ ] Constant number of views per ForEach element
  • [ ] No inline filtering in ForEach
  • [ ] No AnyView in list rows

Layout (see references/layout-best-practices.md)

  • [ ] Avoiding layout thrash (deep hierarchies, excessive GeometryReader)
  • [ ] Gating frequent geometry updates by thresholds
  • [ ] Business logic separated into testable models
  • [ ] Action handlers reference methods (not inline logic)
  • [ ] Using relative layout (not hard-coded constants)
  • [ ] Views work in any context (context-agnostic)

Animations (see references/animation-basics.md, references/animation-transitions.md, references/animation-advanced.md)

  • [ ] Using .animation(_:value:) with value parameter
  • [ ] Using withAnimation for event-driven animations
  • [ ] Transitions paired with animations outside conditional structure
  • [ ] Custom Animatable has explicit animatableData implementation
  • [ ] Preferring transforms over layout changes for animation performance
  • [ ] Phase animations for multi-step sequences (iOS 17+)
  • [ ] Keyframe animations for precise timing (iOS 17+)
  • [ ] Completion handlers use .transaction(value:) for reexecution

Liquid Glass (iOS 26+)

  • [ ] #available(iOS 26, *) with fallback for Liquid Glass
  • [ ] Multiple glass views wrapped in GlassEffectContainer
  • [ ] .glassEffect() applied after layout/appearance modifiers
  • [ ] .interactive() only on user-interactable elements
  • [ ] Shapes and tints consistent across related elements

References

  • references/state-management.md - Property wrappers and data flow (prefer @Observable)
  • references/view-structure.md - View composition, extraction, and container patterns
  • references/performance-patterns.md - Performance optimization techniques and anti-patterns
  • references/list-patterns.md - ForEach identity, stability, and list best practices
  • references/layout-best-practices.md - Layout patterns, context-agnostic views, and testability
  • references/modern-apis.md - Modern API usage and deprecated replacements
  • references/animation-basics.md - Core animation concepts, implicit/explicit animations, timing, performance
  • references/animation-transitions.md - Transitions, custom transitions, Animatable protocol
  • references/animation-advanced.md - Transactions, phase/keyframe animations (iOS 17+), completion handlers (iOS 17+)
  • references/sheet-navigation-patterns.md - Sheet presentation and navigation patterns
  • references/scroll-patterns.md - ScrollView patterns and programmatic scrolling
  • references/text-formatting.md - Modern text formatting and string operations
  • references/image-optimization.md - AsyncImage, image downsampling, and optimization
  • references/liquid-glass.md - iOS 26+ Liquid Glass API

Philosophy

This skill focuses on facts and best practices, not architectural opinions:

  • We don't enforce specific architectures (e.g., MVVM, VIPER)
  • We do encourage separating business logic for testability
  • We prioritize modern APIs over deprecated ones
  • We emphasize thread safety with @MainActor and @Observable
  • We optimize for performance and maintainability
  • We follow Apple's Human Interface Guidelines and API design patterns

平台分布

OpenClaw

79.8%
按下载量换算1,407

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills