Token导航 LogoToken导航

Agent Skill · 研究检索

fosmvvm-swiftui-view-generator(fosmvvm swiftui 视图生成器)

fosmvvm-swiftui-view-generator 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

fosmvvm-swiftui-view-generator 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 6,842。

总安装 20,759周安装 848GitHub Stars 公开资料未说明下载 6,648核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install fosmvvm-swiftui-view-generator

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

生成呈现 FOSMVVM ViewModel 的 SwiftUI 视图。具有绑定、加载状态和预览的支架 ViewModelView 模式。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

fosmvvm-swiftui-view-generator 怎么安装?

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

fosmvvm-swiftui-view-generator 支持哪些 AI 工具?

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

fosmvvm-swiftui-view-generator 需要什么权限?

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

fosmvvm-swiftui-view-generator 是免费的吗?

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

fosmvvm-swiftui-view-generator 用的人多吗?

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

fosmvvm-swiftui-view-generator 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

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

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
fosmvvm-swiftui-view-generator

fosmvvm swiftui 视图生成器 · 本页

20,759—需要联网MIT-0通过

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

SKILL.md 原文

name
fosmvvm-swiftui-view-generator
description
Generate SwiftUI views that render FOSMVVM ViewModels. Scaffolds ViewModelView pattern with binding, loading states, and previews.
homepage
https://github.com/foscomputerservices/FOSUtilities
metadata
{"clawdbot": {"emoji": "📱", "os": ["darwin"]}}

FOSMVVM SwiftUI View Generator

Generate SwiftUI views that render FOSMVVM ViewModels.

Conceptual Foundation

For full architecture context, see FOSMVVMArchitecture.md | OpenClaw reference

In FOSMVVM, Views are thin rendering layers that display ViewModels:

┌─────────────────────────────────────────────────────────────┐
│                    ViewModelView Pattern                     │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  ViewModel (Data)          ViewModelView (SwiftUI)          │
│  ┌──────────────────┐     ┌──────────────────┐             │
│  │ title: String    │────►│ Text(vm.title)   │             │
│  │ items: [Item]    │────►│ ForEach(vm.items)│             │
│  │ isEnabled: Bool  │────►│ .disabled(!...)  │             │
│  └──────────────────┘     └──────────────────┘             │
│                                                              │
│  Operations (Actions)                                        │
│  ┌──────────────────┐     ┌──────────────────┐             │
│  │ submit()         │◄────│ Button(action:)  │             │
│  │ cancel()         │◄────│ .onAppear { }    │             │
│  └──────────────────┘     └──────────────────┘             │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Key principle: Views don't transform or compute data. They render what the ViewModel provides.


View-ViewModel Alignment

The View filename should match the ViewModel it renders.

Sources/
  {ViewModelsTarget}/
    {Feature}/
      {Feature}ViewModel.swift        ←──┐
      {Entity}CardViewModel.swift     ←──┼── Same names
                                          │
  {ViewsTarget}/                          │
    {Feature}/                            │
      {Feature}View.swift             ────┤  (renders {Feature}ViewModel)
      {Entity}CardView.swift          ────┘  (renders {Entity}CardViewModel)

This alignment provides:

  • Discoverability - Find the view for any ViewModel instantly
  • Consistency - Same naming discipline across the codebase
  • Maintainability - Changes to ViewModel are reflected in view location

Core Components

1. ViewModelView Protocol

Every view conforms to ViewModelView:

public struct MyView: ViewModelView {
    private let viewModel: MyViewModel

    public var body: some View {
        Text(viewModel.title)
    }

    public init(viewModel: MyViewModel) {
        self.viewModel = viewModel
    }
}

Required:

  • private let viewModel: {ViewModel}
  • public init(viewModel:)
  • Conforms to ViewModelView protocol

2. Operations (Optional)

Interactive views have operations:

public struct MyView: ViewModelView {
    private let viewModel: MyViewModel
    private let operations: MyViewModelOperations

    #if DEBUG
    @State private var repaintToggle = false
    #endif

    public var body: some View {
        Button(action: performAction) {
            Text(viewModel.buttonLabel)
        }
        #if DEBUG
        .testDataTransporter(viewModelOps: operations, repaintToggle: $repaintToggle)
        #endif
    }

    public init(viewModel: MyViewModel) {
        self.viewModel = viewModel
        self.operations = viewModel.operations
    }

    private func performAction() {
        operations.performAction()
        toggleRepaint()
    }

    private func toggleRepaint() {
        #if DEBUG
        repaintToggle.toggle()
        #endif
    }
}

When views have operations:

  • Store operations from viewModel.operations in init
  • Add @State private var repaintToggle = false (DEBUG only)
  • Add .testDataTransporter(viewModelOps:repaintToggle:) modifier (DEBUG only)
  • Call toggleRepaint() after every operation invocation

3. Child View Binding

Parent views bind child views using .bind(appState:):

public struct ParentView: ViewModelView {
    @Environment(AppState.self) private var appState
    private let viewModel: ParentViewModel

    public var body: some View {
        VStack {
            Text(viewModel.title)

            // Bind child view with subset of parent's data
            ChildView.bind(
                appState: .init(
                    itemId: viewModel.selectedId,
                    isConnected: viewModel.isConnected
                )
            )
        }
    }
}

The .bind() pattern:

  • Child views use .bind(appState:) to receive data from parent
  • Parent creates child's AppState from its own ViewModel data
  • Enables composition without tight coupling

4. Form Views with Validation

Forms use FormFieldView and Validations environment:

public struct MyFormView: ViewModelView {
    @Environment(Validations.self) private var validations
    @Environment(\.focusState) private var focusField
    @State private var error: Error?

    private let viewModel: MyFormViewModel
    private let operations: MyFormViewModelOperations

    public var body: some View {
        Form {
            FormFieldView(
                fieldModel: viewModel.$email,
                focusField: focusField,
                fieldValidator: viewModel.validateEmail,
                validations: validations
            )

            Button(errorBinding: $error, asyncAction: submit) {
                Text(viewModel.submitButtonLabel)
            }
            .disabled(validations.hasError)
        }
        .onAsyncSubmit {
            await submit()
        }
        .alert(
            errorBinding: $error,
            title: viewModel.errorTitle,
            message: viewModel.errorMessage,
            dismissButtonLabel: viewModel.dismissButtonLabel
        )
    }
}

Form patterns:

  • @Environment(Validations.self) for validation state
  • FormFieldView for each input field
  • Button(errorBinding:asyncAction:) for async actions
  • .disabled(validations.hasError) on submit button
  • Separate handling for validation errors vs general errors

5. Previews

Use .previewHost() for SwiftUI previews:

#if DEBUG
#Preview {
    MyView.previewHost(
        bundle: MyAppResourceAccess.localizationBundle
    )
    .environment(AppState())
}

#Preview("With Data") {
    MyView.previewHost(
        bundle: MyAppResourceAccess.localizationBundle,
        viewModel: .stub(title: "Preview Title")
    )
    .environment(AppState())
}
#endif

View Categories

Display-Only Views

Views that just render data (no user interactions):

public struct InfoView: ViewModelView {
    private let viewModel: InfoViewModel

    public var body: some View {
        VStack {
            Text(viewModel.title)
            Text(viewModel.description)

            if viewModel.isActive {
                Text(viewModel.activeStatusLabel)
            }
        }
    }

    public init(viewModel: InfoViewModel) {
        self.viewModel = viewModel
    }
}

Characteristics:

  • No operations property
  • No repaintToggle or testDataTransporter
  • Just renders ViewModel properties
  • May have conditional rendering based on ViewModel state

Interactive Views

Views with user actions:

public struct ActionView: ViewModelView {
    @State private var error: Error?

    private let viewModel: ActionViewModel
    private let operations: ActionViewModelOperations

    #if DEBUG
    @State private var repaintToggle = false
    #endif

    public var body: some View {
        VStack {
            Button(action: performAction) {
                Text(viewModel.actionLabel)
            }

            Button(role: .cancel, action: cancel) {
                Text(viewModel.cancelLabel)
            }
        }
        .alert(
            errorBinding: $error,
            title: viewModel.errorTitle,
            message: viewModel.errorMessage,
            dismissButtonLabel: viewModel.dismissButtonLabel
        )
        #if DEBUG
        .testDataTransporter(viewModelOps: operations, repaintToggle: $repaintToggle)
        #endif
    }

    public init(viewModel: ActionViewModel) {
        self.viewModel = viewModel
        self.operations = viewModel.operations
    }

    private func performAction() {
        operations.performAction()
        toggleRepaint()
    }

    private func cancel() {
        operations.cancel()
        toggleRepaint()
    }

    private func toggleRepaint() {
        #if DEBUG
        repaintToggle.toggle()
        #endif
    }
}

Form Views

Views with validated input fields:

  • Use FormFieldView for each input
  • @Environment(Validations.self) for validation state
  • Button disabled when validations.hasError
  • Separate error handling for validation vs operation errors

Container Views

Views that compose child views:

public struct ContainerView: ViewModelView {
    @Environment(AppState.self) private var appState
    private let viewModel: ContainerViewModel
    private let operations: ContainerViewModelOperations

    public var body: some View {
        VStack {
            switch viewModel.state {
            case .loading:
                ProgressView()

            case .ready:
                ChildAView.bind(
                    appState: .init(id: viewModel.selectedId)
                )

                ChildBView.bind(
                    appState: .init(
                        isActive: viewModel.isActive,
                        level: viewModel.level
                    )
                )
            }
        }
    }
}

When to Use This Skill

  • Creating a new SwiftUI view for a FOSMVVM app
  • Building UI to render a ViewModel
  • Following an implementation plan that requires new views
  • Creating forms with validation
  • Building container views that compose child views

What This Skill Generates

FileLocationPurpose
{ViewName}View.swiftSources/{ViewsTarget}/{Feature}/The SwiftUI view

Note: The corresponding ViewModel and ViewModelOperations should already exist (use fosmvvm-viewmodel-generator skill).

Project Structure Configuration

PlaceholderDescriptionExample
{ViewName}View name (without "View" suffix)TaskList, SignIn
{ViewsTarget}SwiftUI views SPM targetMyAppViews
{Feature}Feature/module groupingTasks, Auth

Pattern Implementation

This skill references conversation context to determine view structure:

View Type Detection

From conversation context, the skill identifies:

  • ViewModel structure (from prior discussion or specifications read by Claude)
  • View category: Display-only, interactive, form, or container
  • Operations needed: Whether view has user-initiated actions
  • Child composition: Whether view binds child views

Component Selection

Based on view type:

  • Display-only: ViewModelView protocol, viewModel property only
  • Interactive: Add operations, repaintToggle, testDataTransporter, toggleRepaint()
  • Form: Add Validations environment, FormFieldView, validation error handling
  • Container: Add child view .bind() calls

Code Generation

Generates view file with:

  1. ViewModelView protocol conformance
  2. Properties (viewModel, operations if needed, repaintToggle if interactive)
  3. Body with rendering logic
  4. Init storing viewModel and operations
  5. Action methods (if interactive)
  6. Test infrastructure (if interactive)
  7. Previews for different states

Context Sources

Skill references information from:

  • Prior conversation: Requirements discussed with user
  • Specification files: If Claude has read specifications into context
  • ViewModel definitions: From codebase or discussion

Key Patterns

Error Handling Pattern

@State private var error: Error?

var body: some View {
    VStack {
        Button(errorBinding: $error, asyncAction: submit) {
            Text(viewModel.submitLabel)
        }
    }
    .alert(
        errorBinding: $error,
        title: viewModel.errorTitle,
        message: viewModel.errorMessage,
        dismissButtonLabel: viewModel.dismissButtonLabel
    )
}

private func submit() async {
    do {
        try await operations.submit()
    } catch {
        self.error = error
    }
    toggleRepaint()
}

Validation Error Pattern

For forms, handle validation errors separately:

private func submit() async {
    let validations = validations
    do {
        try await operations.submit(data: viewModel.data)
    } catch let error as MyRequest.ResponseError {
        if !error.validationResults.isEmpty {
            validations.replace(with: error.validationResults)
        } else {
            self.error = error
        }
    } catch {
        self.error = error
    }
    toggleRepaint()
}

Async Task Pattern

var body: some View {
    VStack {
        if isLoading {
            ProgressView()
        } else {
            contentView
        }
    }
    .task(errorBinding: $error) {
        try await loadData()
    }
}

private func loadData() async throws {
    isLoading = true
    try await operations.loadData()
    isLoading = false
    toggleRepaint()
}

Conditional Rendering Pattern

Use ViewModel state for conditionals:

var body: some View {
    VStack {
        if viewModel.isEmpty {
            Text(viewModel.emptyStateMessage)
        } else {
            ForEach(viewModel.items) { item in
                ItemRow(item: item)
            }
        }
    }
}

Computed View Components Pattern

Extract reusable view fragments as computed properties:

private var headerView: some View {
    HStack {
        Text(viewModel.title)
        Spacer()
        Image(systemName: viewModel.iconName)
    }
}

var body: some View {
    VStack {
        headerView
        contentView
    }
}

Result/Error Handling Pattern

When a view needs to render multiple possible ViewModels (success, various error types), use an enum wrapper:

The Wrapper ViewModel:

@ViewModel
public struct TaskResultViewModel {
    public enum Result {
        case success(TaskViewModel)
        case notFound(NotFoundViewModel)
        case validationError(ValidationErrorViewModel)
        case permissionDenied(PermissionDeniedViewModel)
    }

    public let result: Result
    public var vmId: ViewModelId = .init(type: Self.self)

    public init(result: Result) {
        self.result = result
    }
}

The View:

public struct TaskResultView: ViewModelView {
    private let viewModel: TaskResultViewModel

    public var body: some View {
        switch viewModel.result {
        case .success(let vm):
            TaskView(viewModel: vm)
        case .notFound(let vm):
            NotFoundView(viewModel: vm)
        case .validationError(let vm):
            ValidationErrorView(viewModel: vm)
        case .permissionDenied(let vm):
            PermissionDeniedView(viewModel: vm)
        }
    }

    public init(viewModel: TaskResultViewModel) {
        self.viewModel = viewModel
    }
}

Key principles:

  • Each error scenario has its own ViewModel type
  • The wrapper enum associates specific ViewModels with each case
  • The view switches on the enum and renders the appropriate child view
  • Maintains type safety (no any ViewModel existentials)
  • No generic error handling - each error type is specific and meaningful

ViewModelId Initialization - CRITICAL

IMPORTANT: ViewModelId controls SwiftUI's view identity system via the .id(vmId) modifier. Incorrect initialization causes SwiftUI to treat different data as the same view, breaking updates.

❌ WRONG - Never use this:

public var vmId: ViewModelId = .init()  // NO! Generic identity

✅ MINIMUM - Use type-based identity:

public var vmId: ViewModelId = .init(type: Self.self)

This ensures views of the same type get unique identities.

✅ IDEAL - Use data-based identity when available:

public struct TaskViewModel {
    public let id: ModelIdType
    public var vmId: ViewModelId

    public init(id: ModelIdType, /* other params */) {
        self.id = id
        self.vmId = .init(id: id)  // Ties view identity to data identity
        // ...
    }
}

Why this matters:

  • SwiftUI uses .id() modifier to determine when to recreate vs update views
  • vmId provides this identity for ViewModelViews
  • Wrong identity = views don't update when data changes
  • Data-based identity (.init(id:)) is best because it ties view lifecycle to data lifecycle

File Organization

Sources/{ViewsTarget}/
├── {Feature}/
│   ├── {Feature}View.swift             # Full page → {Feature}ViewModel
│   ├── {Entity}CardView.swift          # Child component → {Entity}CardViewModel
│   ├── {Entity}RowView.swift           # Child component → {Entity}RowViewModel
│   └── {Modal}View.swift               # Modal → {Modal}ViewModel
├── Shared/
│   ├── HeaderView.swift                # Shared components
│   └── FooterView.swift
└── Styles/
    └── ButtonStyles.swift              # Reusable button styles

Common Mistakes

Computing Data in Views

// ❌ BAD - View is transforming data
var body: some View {
    Text("\(viewModel.firstName) \(viewModel.lastName)")
}

// ✅ GOOD - ViewModel provides shaped result
var body: some View {
    Text(viewModel.fullName)  // via @LocalizedCompoundString
}

Forgetting to Call toggleRepaint()

// ❌ BAD - Test infrastructure won't work
private func submit() {
    operations.submit()
    // Missing toggleRepaint()!
}

// ✅ GOOD - Always call after operations
private func submit() {
    operations.submit()
    toggleRepaint()
}

Using Computed Properties for Display

// ❌ BAD - View is computing
var body: some View {
    if !viewModel.items.isEmpty {
        Text("You have \(viewModel.items.count) items")
    }
}

// ✅ GOOD - ViewModel provides the state
var body: some View {
    if viewModel.hasItems {
        Text(viewModel.itemCountMessage)
    }
}

Hardcoding Text

// ❌ BAD - Not localizable
Button(action: submit) {
    Text("Submit")
}

// ✅ GOOD - ViewModel provides localized text
Button(action: submit) {
    Text(viewModel.submitButtonLabel)
}

Missing Error Binding

// ❌ BAD - Errors not handled
Button(action: submit) {
    Text(viewModel.submitLabel)
}

// ✅ GOOD - Error binding for async actions
Button(errorBinding: $error, asyncAction: submit) {
    Text(viewModel.submitLabel)
}

Storing Operations in Body Instead of Init

// ❌ BAD - Recomputed on every render
public var body: some View {
    let operations = viewModel.operations
    Button(action: { operations.submit() }) {
        Text(viewModel.submitLabel)
    }
}

// ✅ GOOD - Store in init
private let operations: MyOperations

public init(viewModel: MyViewModel) {
    self.viewModel = viewModel
    self.operations = viewModel.operations
}

Mismatched Filenames

// ❌ BAD - Filename doesn't match ViewModel
ViewModel: TaskListViewModel
View:      TasksView.swift

// ✅ GOOD - Aligned names
ViewModel: TaskListViewModel
View:      TaskListView.swift

Incorrect ViewModelId Initialization

// ❌ BAD - Generic identity, views won't update correctly
public var vmId: ViewModelId = .init()

// ✅ MINIMUM - Type-based identity
public var vmId: ViewModelId = .init(type: Self.self)

// ✅ IDEAL - Data-based identity (when id available)
public init(id: ModelIdType) {
    self.id = id
    self.vmId = .init(id: id)
}

Force-Unwrapping Localizable Strings

// ❌ BAD - Force-unwrapping to work around missing overload
import SwiftUI

Text(try! viewModel.title.localizedString)  // Anti-pattern - don't do this!
Label(try! viewModel.label.localizedString, systemImage: "star")

// ✅ GOOD - Request the proper SwiftUI overload instead
// The correct solution is to add an init extension like this:
extension Text {
    public init(_ localizable: Localizable) {
        self.init(localizable.localized)
    }
}

extension Label where Title == Text, Icon == Image {
    public init(_ title: Localizable, systemImage: String) {
        self.init(title.localized, systemImage: systemImage)
    }
}

// Then views use it cleanly without force-unwraps:
Text(viewModel.title)
Label(viewModel.label, systemImage: "star")

Why this matters:

FOSMVVM provides the Localizable protocol for all localized strings and includes SwiftUI init overloads for common elements like Text. However, not every SwiftUI element has a Localizable overload yet.

When you encounter a SwiftUI element that doesn't accept Localizable directly:

  1. DON'T work around it with try! localizable.localizedString - this bypasses the type system and spreads force-unwrap calls throughout the view code
  2. DO request that we add the proper init overload to FOSUtilities for that SwiftUI element
  3. The pattern is simple: Extensions that accept Localizable and pass .localized to the standard initializer

This approach keeps the codebase clean, type-safe, and eliminates force-unwraps from view code entirely.


File Templates

See reference.md for complete file templates.

Naming Conventions

ConceptConventionExample
View struct{Name}ViewTaskListView, SignInView
ViewModel propertyviewModelAlways viewModel
Operations propertyoperationsAlways operations
Error stateerrorAlways error
Repaint togglerepaintToggleAlways repaintToggle

Common Modifiers

FOSMVVM-Specific Modifiers

// Error alert with ViewModel strings
.alert(
    errorBinding: $error,
    title: viewModel.errorTitle,
    message: viewModel.errorMessage,
    dismissButtonLabel: viewModel.dismissButtonLabel
)

// Async task with error handling
.task(errorBinding: $error) {
    try await loadData()
}

// Async submit handler
.onAsyncSubmit {
    await submit()
}

// Test data transporter (DEBUG only)
.testDataTransporter(viewModelOps: operations, repaintToggle: $repaintToggle)

// UI testing identifier
.uiTestingIdentifier("submitButton")

Standard SwiftUI Modifiers

Apply standard modifiers as needed for layout, styling, etc.

How to Use This Skill

Invocation:

/fosmvvm-swiftui-view-generator

Prerequisites:

  • ViewModel and its structure are understood from conversation
  • Optionally, specification files have been read into context
  • View requirements (display-only, interactive, form, container) are clear from discussion

Output:

  • {ViewName}View.swift - SwiftUI view conforming to ViewModelView protocol

Workflow integration: This skill is typically used after discussing requirements or reading specification files. The skill references that context automatically—no file paths or Q&A needed.

See Also

Version History

VersionDateChanges
1.02026-01-23Initial skill for SwiftUI view generation

平台分布

OpenClaw

83.08%
按下载量换算5,523

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills