KS
Killer-Skills

fosmvvm-fields-generator — how to use fosmvvm-fields-generator how to use fosmvvm-fields-generator, fosmvvm-fields-generator alternative, fosmvvm-fields-generator setup guide, what is fosmvvm-fields-generator, fosmvvm-fields-generator vs other FOSMVVM libraries, installing fosmvvm-fields-generator on macOS, fosmvvm-fields-generator for iOS development, FOSMVVM pattern implementation, Swift library for Form Specification generation

v1.0.0
GitHub

About this Skill

Perfect for Cross-Platform Agents needing to generate Form Specifications following FOSMVVM patterns for macOS, iOS, Windows, and Linux fosmvvm-fields-generator is a Swift library that generates Form Specifications, serving as the single source of truth for user input in FOSMVVM-based applications.

Features

Generates Form Specifications as {Name}Fields protocols
Supports FOSMVVM patterns on macOS, iOS, Windows, and Linux
Provides a single source of truth for user input
Defines what data can be provided by the user and how it should be presented
Follows the conceptual foundation outlined in FOSMVVMArchitecture.md

# Core Topics

foscomputerservices foscomputerservices
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
48
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add foscomputerservices/FOSUtilities/fosmvvm-fields-generator

Agent Capability Analysis

The fosmvvm-fields-generator MCP Server by foscomputerservices is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use fosmvvm-fields-generator, fosmvvm-fields-generator alternative, fosmvvm-fields-generator setup guide.

Ideal Agent Persona

Perfect for Cross-Platform Agents needing to generate Form Specifications following FOSMVVM patterns for macOS, iOS, Windows, and Linux

Core Value

Empowers agents to create Model-View-ViewModel architectures using Swift libraries, generating Form Specifications as a single source of truth for user input, including properties and presentation details, implemented as {Name}Fields protocols

Capabilities Granted for fosmvvm-fields-generator MCP Server

Generating Form Specifications for cross-platform applications
Creating Model-View-ViewModel architectures for macOS, iOS, Windows, and Linux
Implementing {Name}Fields protocols for user input validation and presentation

! Prerequisites & Limits

  • Requires Swift libraries
  • Limited to FOSMVVM patterns and Model-View-ViewModel architecture
Project
SKILL.md
8.7 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

FOSMVVM Fields Generator

Generate Form Specifications following FOSMVVM patterns.

Conceptual Foundation

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

A Form Specification (implemented as a {Name}Fields protocol) is the single source of truth for user input. It answers:

  1. What data can the user provide? (properties)
  2. How should it be presented? (FormField with type, keyboard, autofill semantics)
  3. What constraints apply? (validation rules)
  4. What messages should be shown? (localized titles, placeholders, errors)

Why This Matters

The Form Specification is defined once, used everywhere:

swift
1// Same protocol adopted by different consumers: 2struct CreateIdeaRequestBody: ServerRequestBody, IdeaFields { ... } // HTTP transmission 3@ViewModel struct IdeaFormViewModel: IdeaFields { ... } // Form rendering 4final class Idea: Model, IdeaFields { ... } // Persistence validation

This ensures:

  • Consistent validation - Same rules on client and server
  • Shared localization - One YAML file, used everywhere
  • Single source of truth - Change once, applies everywhere

Connection to FOSMVVM

Form Specifications integrate with:

  • Localization System - FormField titles/placeholders and validation messages use LocalizableString
  • Validation System - Implements ValidatableModel protocol
  • Request System - RequestBody types adopt Fields for validated transmission
  • ViewModel System - ViewModels adopt Fields for form rendering

When to Use This Skill

  • Defining a new form (create, edit, filter, search)
  • Adding validation to a request body
  • Any type that needs to conform to ValidatableModel
  • When fosmvvm-fluent-datamodel-generator needs form fields for a DataModel

What This Skill Generates

A complete Form Specification consists of 3 files:

FilePurpose
{Name}Fields.swiftProtocol + FormField definitions + validation methods
{Name}FieldsMessages.swift@FieldValidationModel struct with @LocalizedString properties
{Name}FieldsMessages.ymlYAML localization (titles, placeholders, error messages)

Project Structure Configuration

Replace placeholders with your project's actual paths:

PlaceholderDescriptionExample
{ViewModelsTarget}Shared ViewModels SPM targetViewModels, SharedViewModels
{ResourcesPath}Localization resources pathSources/Resources

Expected Structure:

Sources/
  {ViewModelsTarget}/
    FieldModels/
      {Name}Fields.swift
      {Name}FieldsMessages.swift
  {ResourcesPath}/
    FieldModels/
      {Name}FieldsMessages.yml

How to Use This Skill

Invocation: /fosmvvm-fields-generator

Prerequisites:

  • Form purpose understood from conversation context
  • Field requirements discussed (names, types, constraints)
  • Entity relationship identified (what is this form creating/editing)

Workflow integration: This skill is used when defining form validation and user input contracts. The skill references conversation context automatically—no file paths or Q&A needed. Often precedes fosmvvm-fluent-datamodel-generator for form-backed models.

Pattern Implementation

This skill references conversation context to determine Fields protocol structure:

Form Analysis

From conversation context, the skill identifies:

  • Form purpose (create, edit, filter, login, settings)
  • Entity relation (User, Idea, Document - what's being created/edited)
  • Protocol naming (CreateIdeaFields, UpdateProfile, LoginCredentials)

Field Design

For each field from requirements:

  • Property specification (name, type, optional vs required)
  • Presentation type (FormFieldType: text, textArea, select, checkbox)
  • Input semantics (FormInputType: email, password, tel, date)
  • Constraints (required, length range, value range, date range)
  • Localization (title, placeholder, validation error messages)

File Generation Order

  1. Fields protocol with FormField definitions and validation
  2. FieldsMessages struct with @LocalizedString properties
  3. FieldsMessages YAML with localized strings

Context Sources

Skill references information from:

  • Prior conversation: Form requirements, field specifications discussed
  • Specification files: If Claude has read form specs into context
  • Existing patterns: From codebase analysis of similar Fields protocols

Key Patterns

Protocol Structure

swift
1public protocol {Name}Fields: ValidatableModel, Codable, Sendable { 2 var fieldName: FieldType { get set } 3 var {name}ValidationMessages: {Name}FieldsMessages { get } 4}

FormField Definition

swift
1static var contentField: FormField<String?> { .init( 2 fieldId: .init(id: "content"), 3 title: .localized(for: {Name}FieldsMessages.self, propertyName: "content", messageKey: "title"), 4 placeholder: .localized(for: {Name}FieldsMessages.self, propertyName: "content", messageKey: "placeholder"), 5 type: .textArea(inputType: .text), 6 options: [ 7 .required(value: true) 8 ] + FormInputOption.rangeLength(contentRange) 9) }

FormField Types Reference

FormFieldTypeUse Case
.text(inputType:)Single-line input
.textArea(inputType:)Multi-line input
.checkboxBoolean toggle
.selectDropdown selection
.colorPickerColor selection

FormInputType Reference (common ones)

FormInputTypeKeyboard/Autofill
.textDefault keyboard
.emailAddressEmail keyboard, email autofill
.passwordSecure entry
.telPhone keyboard
.urlURL keyboard
.date, .datetimeLocalDate picker
.givenName, .familyNameName autofill

Validation Method Pattern

swift
1internal func validateContent(_ fields: [FormFieldBase]?) -> [ValidationResult]? { 2 guard fields == nil || (fields?.contains(Self.contentField) == true) else { 3 return nil 4 } 5 6 var result = [ValidationResult]() 7 8 if content.isEmpty { 9 result.append(.init( 10 status: .error, 11 field: Self.contentField, 12 message: {name}ValidationMessages.contentRequiredMessage 13 )) 14 } else if !Self.contentRange.contains(NSString(string: content).length) { 15 result.append(.init( 16 status: .error, 17 field: Self.contentField, 18 message: {name}ValidationMessages.contentOutOfRangeMessage 19 )) 20 } 21 22 return result.isEmpty ? nil : result 23}

Messages Struct Pattern

swift
1@FieldValidationModel public struct {Name}FieldsMessages { 2 @LocalizedString("content", messageGroup: "validationMessages", messageKey: "required") 3 public var contentRequiredMessage 4 5 @LocalizedString("content", messageGroup: "validationMessages", messageKey: "outOfRange") 6 public var contentOutOfRangeMessage 7}

YAML Structure

yaml
1en: 2 {Name}FieldsMessages: 3 content: 4 title: "Content" 5 placeholder: "Enter your content..." 6 validationMessages: 7 required: "Content is required" 8 outOfRange: "Content must be between 1 and 10,000 characters"

Naming Conventions

ConceptConventionExample
Protocol{Name}FieldsIdeaFields, CreateIdeaFields
Messages struct{Name}FieldsMessagesIdeaFieldsMessages
Messages property{name}ValidationMessagesideaValidationMessages
Field definition{fieldName}FieldcontentField
Range constant{fieldName}RangecontentRange
Validate methodvalidate{FieldName}validateContent
Required message{fieldName}RequiredMessagecontentRequiredMessage
OutOfRange message{fieldName}OutOfRangeMessagecontentOutOfRangeMessage

See Also

Version History

VersionDateChanges
1.02024-12-24Initial skill
2.02024-12-26Rewritten with conceptual foundation; generalized from Kairos-specific
2.12026-01-24Update to context-aware approach (remove file-parsing/Q&A). Skill references conversation context instead of asking questions or accepting file paths.

Related Skills

Looking for an alternative to fosmvvm-fields-generator or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication