fosmvvm-fluent-datamodel-generator
Generate Fluent DataModels for FOSMVVM server-side persistence. Scaffolds models, migrations, and tests for database-backed entities.
Why use this skill?
Automate Fluent DataModel generation, migrations, and schema scaffolding for FOSMVVM server-side projects with this OpenClaw skill.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-fluent-datamodel-generatorWhat This Skill Does
The fosmvvm-fluent-datamodel-generator is a specialized engineering utility designed for developers building high-performance server-side applications using the FOSMVVM architecture. Its primary purpose is to automate the boilerplate-heavy process of scaffolding Fluent DataModels. When you create a new entity in your database, this skill generates the Swift class conformant to the Fluent Model protocol, including mandatory properties like UUID identifiers, field definitions, relationships, and audit timestamps.
Beyond simple data structures, it intelligently integrates with your existing fosmvvm-fields-generator implementation. By acting as the persistence-layer counterpart to your field-based form models, it creates a robust bridge between the user-input layer and the database storage. It also handles the generation of Fluent Migration files, ensuring that your database schema stays in perfect synchronization with your code-based data definitions.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-fluent-datamodel-generator
Ensure that your workspace is already initialized with an FOSMVVM-compatible directory structure, as the generator relies on specific file paths to correctly place migrations and model files.
Use Cases
Use this skill whenever you are architecting new database entities in a Vapor-based backend. It is most effective when:
- You are adding a new domain entity (e.g., 'InventoryItem', 'SystemLog', or 'UserSubscription') that requires persistence.
- You are scaling a project and need to implement complex relational mappings between tables using
@Parentor@Childrenwrappers. - You are performing a schema migration and need to quickly spin up a new table definition coupled with its initial data migration.
Example Prompts
- "I need to create a new Fluent DataModel for a 'Product' entity. It should have a title, price (decimal), and a parent category. Please generate the model and the corresponding migration."
- "Generate the Fluent boilerplate for a 'UserActivity' entity that tracks audit timestamps and links to a 'User' model."
- "Add a new data model for 'SystemNotifications' following the FOSMVVM structure. I have already run the fields generator for this entity."
Tips & Limitations
- Check Prerequisites: Always verify that your
Package.swiftcontains the Fluent dependency. This tool is strictly for server-side persistence; it will not work for iOS local storage solutions like SwiftData or CoreData. - Dependency Order: Always invoke the fields generator first. The Fluent model depends on the protocols defined by the fields package; running them out of order will lead to compilation errors.
- Scope Guard: If the tool detects that you are working in a non-Fluent project, it will pause. Follow the instructions provided by the agent to re-configure your workspace if you intended to use a different ORM.
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-fluent-datamodel-generator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
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-fields-generator
Generate FOSMVVM Fields protocols with validation rules, FormField definitions, and localized messages. Define form contracts once, validate everywhere.
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.