본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

fosmvvm-viewmodel-generator

foscomputerservices 제작

Coding Agents & IDEs
455clawskills.sh가 보고한 다운로드 수
2스타
0조회수
좋아요 0개로그인하면 이 스킬에 좋아요를 누를 수 있습니다
—아직 평가 없음
내 평가

요약

Generate FOSMVVM ViewModels for SwiftUI screens, pages, and components.

설명

이 스킬이 하는 일

Scaffolds ViewModels for SwiftUI screens following FOSMVVM architecture. Handles both server-hosted and client-hosted modes, generating the correct combination of ViewModel structs, Request types, localization YAML, and factory files. Covers display ViewModels, form ViewModels, child ViewModels, and error display patterns.

It encodes the multi-file structure, hosting mode decision, and protocol adoption rules of FOSMVVM so developers don't have to manually reason through each placement decision.

사용 시점

  • Generating a new page ViewModel that fetches data from a server API
  • Scaffolding a settings screen ViewModel backed by local device state
  • Creating a client-hosted error display ViewModel from a caught ResponseError
  • Adding a card or row child ViewModel nested inside a parent list ViewModel
  • Producing localization YAML alongside a new ViewModel struct

예시 워크플로

입력

User asks: Create a ViewModel for a user profile screen that loads data from the server

에이전트
  1. 1

    Determine hosting mode: data comes from server, so server-hosted

  2. 2

    Design ViewModel properties: @LocalizedString for page title, stored properties for profile data, LocalizableDate for join date

  3. 3

    Generate UserProfileViewModel.swift with RequestableViewModel conformance and vmId

  4. 4

    Generate UserProfileRequest.swift with the associated ViewModelRequest type

  5. 5

    Generate UserProfileViewModel.yml with English localization keys

  6. 6

    Generate UserProfileViewModel+Factory.swift with hand-written factory querying the database

출력

Four files: UserProfileViewModel.swift, UserProfileRequest.swift, UserProfileViewModel.yml, UserProfileViewModel+Factory.swift

설치

clawhub install foscomputerservices/fosmvvm-viewmodel-generator

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크