fosmvvm-react-view-generator
Generate React components that render FOSMVVM ViewModels. Scaffolds ViewModelView pattern with hooks, loading states, and TypeScript types.
Why use this skill?
Automate your React component creation with the FOSMVVM React View Generator. Scaffolds ViewModelView patterns, hooks, and tests for optimized developer workflows.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-react-view-generatorWhat This Skill Does
The fosmvvm-react-view-generator is a specialized developer-tools skill designed to accelerate the creation of React components within the FOSMVVM architectural pattern. It automates the boilerplate associated with the ViewModelView pattern, ensuring that components serve strictly as thin rendering layers that observe and display ViewModel state. By leveraging OpenClaw's contextual awareness, the skill creates corresponding unit tests and React files in a single pass, following a TDD-first workflow that enforces project consistency and naming conventions.
Installation
To integrate this skill into your environment, run the following command within your terminal or OpenClaw interface:
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-react-view-generator
Ensure that your project structure adheres to the expected /src/viewmodels and /src/components hierarchy to enable the automated file generation logic to function correctly.
Use Cases
- Rapid Prototyping: Quickly scaffold complex UI views from defined ViewModels without writing manual hooks or loading state boilerplate.
- Architecture Enforcement: Maintain strict adherence to the FOSMVVM pattern by automatically generating code that separates business logic (in ViewModels) from display logic (in React components).
- TDD Compliance: Streamline the developer experience by generating tests before component code, ensuring high test coverage and robust implementations.
- Refactoring: Update component structures based on existing ViewModel changes without manually realigning prop types or binding logic.
Example Prompts
- "Generate a UserProfileView for the UserProfileViewModel, ensuring it handles loading states and displays the user's avatar and bio."
- "Create a component for the ProductGridViewModel that includes test files and correctly binds the processRequest action to the search button."
- "Scaffold the OrderStatusView using the OrderStatusViewModel and include test coverage for the error handling states."
Tips & Limitations
- Naming Conventions: Always ensure your ViewModel files are named consistently with the target component (e.g.,
OrderViewModel.jsandOrderView.jsx). Failure to do so may cause the generator to struggle with identifying the correct target file. - Thin Components: This skill assumes you are following the FOSMVVM philosophy; avoid injecting complex business logic into the generated React components, as this violates the architecture.
- File System: The skill requires write access to your project directory. Ensure your IDE has the necessary permissions for the tool to create and modify files in the target folders.
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-react-view-generator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
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-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.