fosmvvm-viewmodel-generator

Generate FOSMVVM ViewModels, Requests, and YAML localization templates for Swift UI components.

3|2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-viewmodel-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fosmvvm-viewmodel-generator
Source: https://github.com/foscomputerservices/FOSUtilities/tree/main/.claude/skills/fosmvvm-viewmodel-generator
Command: npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-viewmodel-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of boilerplate FOSMVVM ViewModels, Requests, and localization resources, removing manual scaffolding work and ensuring consistency across projects.

Core Features & Use Cases

  • Generates Top-Level and Child ViewModels for server-hosted and client-hosted Swift applications.
  • Creates associated Request types, Factory glue code, and localization YAML for all ViewModels.
  • Use Case: Start a new screen or reusable component by generating a complete MVVM scaffold with localization.

Quick Start

  • Decide whether the new UI component is server-hosted (backend-backed) or client-hosted (offline).
  • Run the generator command /fosmvvm-viewmodel-generator to emit ViewModel.swift, Request.swift (if server-hosted), plus Factory extension and localization YAML templates.
  • Review and integrate the generated files into your codebase.

Frequently Asked Questions about fosmvvm-viewmodel-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Swift MVVM ViewModel boilerplate for a new screen?

To generate Swift MVVM ViewModel boilerplate, you specify the hosting mode and view hierarchy to produce matching ViewModel.swift files, Request types, Factory extensions, and localization YAML templates.

What is the difference between server-hosted and client-hosted ViewModels in code generation?

Server-hosted ViewModel code generation includes backend Request.swift files and Factory glue code, while client-hosted generation skips Request types for offline Swift components and focuses on local UI scaffolding.

Can I auto-generate localization YAML templates alongside Swift ViewModels?

Yes, you can auto-generate localization YAML templates alongside Swift ViewModels. The generator emits these artifacts simultaneously to ensure UI scaffolding and text resources remain consistent.

Does the FOSMVVM ViewModel generator support nested child components?

Yes, the FOSMVVM ViewModel generator supports nested child components. It covers both top-level screens and reusable child components, producing matching Swift sources for the entire view hierarchy.

What inputs do I need to provide for Swift MVVM code generation to work?

Swift MVVM code generation requires clear input on the hosting mode, whether server-hosted or client-hosted, and the view hierarchy structure to accurately emit the corresponding Swift sources and YAML templates.