LaunchKit · 2026
Back to Skills

fosmvvm-swiftui-app-setup

Set up the @main App struct for FOSMVVM SwiftUI apps.

0
400 downloads
by @foscomputerservices

Setup & Installation

openclaw skills install @foscomputerservices/fosmvvm-swiftui-app-setup

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install fosmvvm-swiftui-app-setup

What This Skill Does

Generates the @main App struct for SwiftUI apps using the FOSMVVM architecture. Handles MVVMEnvironment configuration, deployment URL setup for production and debug environments, and optional UI test infrastructure. Works from conversation context rather than requiring file paths or Q&A.

Pulls app name, deployment URLs, and resource bundle structure directly from conversation context instead of requiring manual configuration prompts.

When to use it

  • Starting a new FOSMVVM SwiftUI project
  • Migrating an existing SwiftUI app to FOSMVVM
  • Configuring production and staging deployment URLs
  • Setting up UI test infrastructure with view registration
  • Adding localization bundle accessors across multiple modules

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: set up the main App struct for my SwiftUI app called AccelApp with production and debug URLs and test support

AGENT
  1. 1Identifies app name as AccelApp and determines the target file path Sources/App/AccelApp.swift
  2. 2Configures MVVMEnvironment with Bundle.main and detected resource bundle accessors from conversation context
  3. 3Sets up deploymentURLs for .production and .debug environments
  4. 4Wraps WindowGroup content with .testHost modifier inside a DEBUG block
  5. 5Generates registerTestingViews() extension on AccelApp struct with all identified ViewModelViews
OUTPUT

Complete AccelApp.swift file with @main struct, MVVMEnvironment computed property, WindowGroup with environment injection, and DEBUG-only test infrastructure