跳到正文
TakoAPI
返回技能列表

fosmvvm-swiftui-app-setup

由 foscomputerservices 提供

DevOps & Cloud
400下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

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

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

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

智能体
  1. 1

    Identifies app name as AccelApp and determines the target file path Sources/App/AccelApp.swift

  2. 2

    Configures MVVMEnvironment with Bundle.main and detected resource bundle accessors from conversation context

  3. 3

    Sets up deploymentURLs for .production and .debug environments

  4. 4

    Wraps WindowGroup content with .testHost modifier inside a DEBUG block

  5. 5

    Generates registerTestingViews() extension on AccelApp struct with all identified ViewModelViews

输出

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

安装

clawhub install foscomputerservices/fosmvvm-swiftui-app-setup

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接