fosmvvm-fields-generator
Generate FOSMVVM Fields protocols with validation rules, FormField definitions, and localized messages. Define form contracts once, validate everywhere.
Why use this skill?
Automate the creation of FOSMVVM form specifications in Swift. Generate protocols, validation models, and localization files with a single command.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-fields-generatorWhat This Skill Does
The fosmvvm-fields-generator is an essential developer tool for OpenClaw that standardizes input handling within the FOSMVVM architecture. It automates the boilerplate creation of Form Specifications, which act as the single source of truth for your application's data. By generating a tripartite structure—a protocol for properties, a validation model for error handling, and a YAML file for internationalization—this skill ensures that your validation rules, UI rendering logic, and network request contracts remain perfectly synchronized across your entire codebase.
Installation
To integrate this skill, navigate to your OpenClaw command console and execute the following: clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-fields-generator. Ensure your project has an established FOSMVVM architecture as this skill assumes a modularized SPM structure. Once installed, configure your project paths (ViewModelsTarget and ResourcesPath) within your local environment to ensure the generated files are routed to the correct source directories.
Use Cases
Use this skill whenever you are initializing a new user-facing interface, such as a login screen, a complex search filter, or a user profile settings page. It is highly effective for ensuring consistency between front-end validation (UI) and back-end constraints. It is also the recommended tool when refactoring existing model-based forms to follow the protocol-oriented approach of FOSMVVM, or when you need to extend a DataModel with form-specific behaviors like input validation and localized field labeling.
Example Prompts
- "Generate a new form specification for a user registration flow named 'UserRegistration' with fields for username, email, and password."
- "Create field definitions for a search filter form named 'ProductSearch' including categories and price range inputs."
- "Update the 'BillingInfo' form specification to include fields for credit card number, expiry, and CVV, ensuring all fields include localized error messages."
Tips & Limitations
To maximize effectiveness, always define your localization keys in the generated YAML file immediately after generation; the skill relies on these keys for the internal binding of field labels and validation alerts. Remember that this skill focuses on the structure of the form. While it generates the boilerplate, the specific business logic for custom asynchronous validations (like checking if a username is taken via an API) should be implemented in the generated Fields.swift file manually. Keep your Fields protocols granular; it is better to have several specific forms than one monolithic form protocol that creates tight coupling between unrelated UI components.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-foscomputerservices-fosmvvm-fields-generator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write
Related Skills
fosmvvm-leaf-view-generator
Generate Leaf templates for FOSMVVM WebApps. Create full-page views and HTML-over-the-wire fragments that render ViewModels.
fosmvvm-react-view-generator
Generate React components that render FOSMVVM ViewModels. Scaffolds ViewModelView pattern with hooks, loading states, and TypeScript types.
fosmvvm-fluent-datamodel-generator
Generate Fluent DataModels for FOSMVVM server-side persistence. Scaffolds models, migrations, and tests for database-backed entities.
fosmvvm-swiftui-app-setup
Set up the @main App struct for FOSMVVM SwiftUI apps. Configures MVVMEnvironment, deployment URLs, and test infrastructure.
fosmvvm-ui-tests-generator
Generate UI tests for FOSMVVM SwiftUI views using XCTest and FOSTestingUI. Covers accessibility identifiers, ViewModelOperations, and test data transport.