fosmvvm-leaf-view-generator

Generate Leaf templates for FOSMVVM ViewModels in Swift web apps.

3|2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-leaf-view-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fosmvvm-leaf-view-generator
Source: https://github.com/foscomputerservices/FOSUtilities/tree/main/.claude/skills/fosmvvm-leaf-view-generator
Command: npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-leaf-view-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill generates ready-to-use Leaf templates for FOSMVVM ViewModels, enabling rapid creation of full-page and fragment templates for Swift-based web apps.

Core Features & Use Cases

  • Full-page templates that extend a base layout and render ViewModels.
  • Fragment templates for HTML-over-the-wire updates and reusable components (cards, rows, modals).
  • ViewModel alignment & data mapping ensures data attributes, localization, and state rendering match the ViewModel.
  • Guidance & patterns for conditional rendering, looping, and localizable content within templates.

Quick Start

Use the fosmvvm-leaf-view-generator skill to scaffold Leaf templates for a given ViewModel, then adapt to project conventions.

Frequently Asked Questions about fosmvvm-leaf-view-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Leaf templates for Swift web app ViewModels?

You generate Leaf templates for Swift web app ViewModels by using an automated generator that maps data attributes and state directly to ViewModel properties. It outputs full-page templates extending base layouts and reusable fragment templates.

Can I create fragment templates for HTML-over-the-wire updates in Leaf?

Yes, you can create fragment templates for HTML-over-the-wire updates in Leaf. The generator produces reusable component fragments like cards, rows, columns, and modals designed for partial page rendering and dynamic state updates.

Does the Leaf template generator support localization integration?

Yes, the Leaf template generator supports localization integration. It ensures that localizable content, conditional rendering, and looping patterns are correctly mapped and included within the generated template documentation.

How do I align data attributes and IDs with my ViewModel in Leaf templates?

You align data attributes and IDs with your ViewModel in Leaf templates by enforcing ViewModel-name alignment during generation. This mechanism ensures that state rendering and data attribute mappings strictly match the underlying Swift ViewModel structure.

What common UI fragment patterns can I scaffold for FOSMVVM web apps?

You can scaffold common UI fragment patterns for FOSMVVM web apps such as cards, rows, columns, and modals. The generator provides ready-to-use fragment templates with built-in guidance for conditional rendering and looping.

Why are my generated Leaf templates missing base layout extension and troubleshooting guidance?

Generated Leaf templates might miss base layout extension if ViewModel-name alignment fails. The generator inherently provides troubleshooting and pattern documentation, ensuring full-page templates correctly extend base layouts and render state accurately.