一键导入
swiftui-development
专注于使用 modern SwiftUI 构建用户界面,涵盖 NavigationStack, Observation 框架和 SwiftData 集成。使用此技能编写 SwiftUI 视图文件、设计应用导航结构、处理动画和转场效果,或将 ViewModel 数据绑定到界面时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
专注于使用 modern SwiftUI 构建用户界面,涵盖 NavigationStack, Observation 框架和 SwiftData 集成。使用此技能编写 SwiftUI 视图文件、设计应用导航结构、处理动画和转场效果,或将 ViewModel 数据绑定到界面时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert Git skills covering interactive rebase, worktree management, reflog recovery, bisect debugging, advanced workflows, commit message best practices, and clean history management. Use this skill when needing advanced Git operations, cleaning commit history, managing multiple worktrees, recovering lost commits, debugging with bisect, or implementing sophisticated Git workflows.
Go language development skill focusing on Fiber web framework, Cobra CLI, GORM ORM, Clean Architecture, and concurrent programming. Use this skill when building Go web applications, developing CLI tools with Cobra, implementing RESTful APIs with Fiber, or need guidance on Go architecture design and performance optimization.
Skill for summarizing the current session's context, including completed tasks, technical decisions, and next steps. Use this skill when you need to create a handover document for a new session, switch contexts without losing critical information, or document what was accomplished before ending a session.
Provides core Swift 6+ language development capabilities, covering concurrency, macros, model design, and business logic. Use this skill when writing ViewModel, Service, or Repository layer code, defining data models, implementing algorithms, writing unit tests, or fixing concurrency warnings and data races.
Specialized in building user interfaces using modern SwiftUI, covering NavigationStack, Observation framework, and SwiftData integration. Use this skill when writing SwiftUI view files, designing app navigation, handling animations and transitions, or binding ViewModel data to the interface.
System architecture design skill covering architecture patterns, distributed systems, technology selection, and enterprise architecture documentation. Use this skill when designing system architectures, evaluating technology stacks, planning distributed systems, or creating architecture decision records and documentation.
| name | swiftui-development |
| description | 专注于使用 modern SwiftUI 构建用户界面,涵盖 NavigationStack, Observation 框架和 SwiftData 集成。使用此技能编写 SwiftUI 视图文件、设计应用导航结构、处理动画和转场效果,或将 ViewModel 数据绑定到界面时使用。 |
使用此技能编写声明式、响应式的 UI 代码。始终遵循 iOS 人机交互指南 (HIG)。
@Observable, @State, @Environment) 管理数据流。NavigationStack 和 navigationDestination 处理路由。#Preview 宏快速迭代 UI。@Query) 无缝集成到视图中。.swift 视图文件时。@Observable
class CounterModel {
var count = 0
func increment() {
count += 1
}
}
struct CounterView: View {
@State private var model = CounterModel()
var body: some View {
VStack {
Text("Count: \(model.count)")
.font(.largeTitle)
Button("Add") {
model.increment()
}
}
}
}
#Preview {
CounterView()
}
enum Route: Hashable {
case profile(id: String)
case settings
}
struct ContentView: View {
@State private var path = NavigationPath()
var body: some View {
NavigationStack(path: $path) {
List {
NavigationLink("Go to Profile", value: Route.profile(id: "123"))
NavigationLink("Settings", value: Route.settings)
}
.navigationDestination(for: Route.self) { route in
switch route {
case .profile(let id):
ProfileView(userId: id)
case .settings:
SettingsView()
}
}
}
}
}
.environment() 注入全局依赖或主题数据。struct SubView: View)。@State,当视图仅修改父视图数据时使用 @Binding (@Bindable for Observable)。@Observable 是首选。对于旧版本支持,可能需要退回到 ObservableObject,但应明确标注。