Vai al contenuto
TakoAPI
Torna alle skill

fosmvvm-fluent-datamodel-generator

di foscomputerservices

Coding Agents & IDEs
437Download riportati da clawskills.sh
0Visualizzazioni
0 likeAccedi per mettere like a questa skill
—Non ancora valutato
La tua valutazione

Sintesi

Generate Fluent DataModels for FOSMVVM server-side persistence.

Descrizione

Cosa fa questa skill

Scaffolds Fluent DataModels for FOSMVVM server-side persistence in Vapor apps. Generates the model class, schema migration, seed migration, and unit tests for a given entity. Works alongside fosmvvm-fields-generator for form-backed entities.

Enforces FOSMVVM's strict separation between user-editable fields and system-assigned fields at generation time, catching architectural mistakes before they reach code review.

Quando usarla

  • Adding a new database-backed entity to a Vapor app
  • Creating a User or Session model with Fluent migrations
  • Scaffolding a junction table for many-to-many relationships
  • Generating seed data migrations for a new table
  • Setting up audit or system-only records without a Fields protocol

Esempio di workflow

INPUT

User asks: Create a DataModel for an Idea entity that belongs to a User

AGENT
  1. 1

    Checks Package.swift and existing models to confirm Fluent is the persistence layer

  2. 2

    Reads any existing IdeaFields protocol from context or from fosmvvm-fields-generator output

  3. 3

    Generates Idea.swift with @Parent(key: "created_by") satisfying the IdeaFields associated type

  4. 4

    Generates Idea+Schema.swift migration with foreign key reference to users table

  5. 5

    Generates Idea+Seed.swift idempotent seed migration and IdeaFieldsTests.swift, then registers migrations in database.swift

OUTPUT

Five files created covering the full Fluent persistence layer for the Idea entity

Installazione

clawhub install foscomputerservices/fosmvvm-fluent-datamodel-generator

Esegui il comando CLI oppure incolla il prompt in Claude Code, Cursor, Codex o nell'agente di coding che usi.

Link