fosmvvm-leaf-view-generator
Generate Leaf templates for FOSMVVM WebApps. Create full-page views and HTML-over-the-wire fragments that render ViewModels.
Why use this skill?
Automate the creation of Leaf templates for FOSMVVM WebApps. Generate full-page views and HTML-over-the-wire fragments synced with Swift ViewModels.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-leaf-view-generatorWhat This Skill Does
The fosmvvm-leaf-view-generator is a specialized scaffolding tool designed to streamline the creation of Leaf templates for FOSMVVM-based WebApps. It enforces the Model-View-ViewModel architecture by ensuring strict naming alignment between Swift ViewModels and their corresponding Leaf HTML templates. By automating the generation of both full-page layouts and partial fragment templates, it allows developers to focus on the structure of their UI rather than the boilerplate required for HTML-over-the-wire state management.
Installation
To integrate this skill into your environment, run the following command within your OpenClaw CLI:
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-leaf-view-generator
Use Cases
This skill is essential for developers working on Swift-based web applications using Vapor and FOSMVVM.
- Full-Page Rendering: Quickly scaffold new navigational destinations that inherit from your base application layout.
- Component Development: Generate atomic fragment templates like cards, buttons, or modals that are designed for DOM swapping via HTML-over-the-wire updates.
- Architectural Enforcement: Maintain strict consistency between your ViewModel objects and the rendering layer to ensure long-term maintainability.
Example Prompts
- "Generate a full-page Leaf template for the UserProfileViewModel located in the User feature folder."
- "Create a fragment template for the ProductCardViewModel that includes the necessary data-attributes for dynamic state updates."
- "Scaffold a new Leaf view for OrderSummaryViewModel and ensure it adheres to the FOSMVVM file structure standards."
Tips & Limitations
- Alignment is Key: Always ensure your ViewModel name precisely matches the Leaf file name. The generator relies on this to maintain architectural integrity.
- Fragment Strategy: When creating fragments, avoid using
#extendtags, as these are meant for full-page structures. Fragments should contain a single root node for seamless JS replacement. - Scope: This skill is specifically designed for the FOSMVVM ecosystem. It will not generate standard HTML or generic layouts outside of the FOSMVVM architecture requirements. Ensure your project structure matches the documented
Sources/directory pattern before running the generator.
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-leaf-view-generator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
fosmvvm-react-view-generator
Generate React components that render FOSMVVM ViewModels. Scaffolds ViewModelView pattern with hooks, loading states, and TypeScript types.
fosmvvm-fields-generator
Generate FOSMVVM Fields protocols with validation rules, FormField definitions, and localized messages. Define form contracts once, validate everywhere.
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.