Token导航 LogoToken导航

Agent Skill · 开发

fosmvvm-fluent-datamodel-generator(fosmvvm 流畅的数据模型生成器)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

fosmvvm-fluent-datamodel-generator 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 1,921。

总安装 22,414周安装 898GitHub Stars 公开资料未说明下载 7,256核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
2.0.6

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fosmvvm-fluent-datamodel-generator(fosmvvm 流畅的数据模型生成器)
来源仓库:https://github.com/foscomputerservices/fosmvvm-fluent-datamodel-generator
安装命令:
openclaw skills install fosmvvm-fluent-datamodel-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install fosmvvm-fluent-datamodel-generator

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

基于 FOSMVVM 持久层自动生成流畅数据模型。包含关系映射与系统分配字段迁移测试。fosmvvm-fluent-datamodel-generator 属于开发类 Skill,可作为该场景下的辅助能力补充。适用于数据库重构与 ORM 框架适配场景。输出结果需经人工校验确保业务逻辑准确。

涉及生产数据时应先脱敏再执行生成操作。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install fosmvvm-fluent-datamodel-generator;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

fosmvvm-fluent-datamodel-generator 怎么安装?

在终端执行 openclaw skills install fosmvvm-fluent-datamodel-generator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

fosmvvm-fluent-datamodel-generator 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

fosmvvm-fluent-datamodel-generator 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

fosmvvm-fluent-datamodel-generator 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

fosmvvm-fluent-datamodel-generator 用的人多吗?

公开数据是累计安装 22,414 次,近一周安装 898 次,下载 7,256 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

fosmvvm-fluent-datamodel-generator 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
fosmvvm-fluent-datamodel-generator

fosmvvm 流畅的数据模型生成器 · 本页

22,414—需要联网MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
fosmvvm-fluent-datamodel-generator
description
Generate Fluent DataModels for FOSMVVM server-side persistence. Scaffolds models, migrations, and tests for database-backed entities.
homepage
https://github.com/foscomputerservices/FOSUtilities
metadata
{"clawdbot": {"emoji": "🗄️", "os": ["darwin", "linux"]}}

FOSMVVM Fluent DataModel Generator

Generate Fluent DataModels for server-side persistence following FOSMVVM architecture.

Dependency: This skill uses fosmvvm-fields-generator for the Fields layer (protocol, messages, YAML). Run that skill first for form-backed models.

Scope Guard

This skill is specifically for Fluent persistence layer (typically in Vapor server apps).

STOP and ask the user if:

  • The project doesn't use Fluent
  • The target is iOS-only with CoreData, SwiftData, or Realm
  • The user mentions a non-Fluent ORM or persistence layer
  • You're unsure whether Fluent is the persistence layer

Check for Fluent indicators:

  • Package.swift imports fluent, fluent-postgres-driver, fluent-sqlite-driver, etc.
  • Existing models use @ID, @Field, @Parent, @Children, @Siblings property wrappers
  • A Migrations/ directory exists with Fluent migration patterns
  • Imports include FluentKit or Fluent

If Fluent isn't present, inform the user: *"This skill generates Fluent DataModels for server-side persistence. Your project doesn't appear to use Fluent. How would you like to proceed?"*


When to Use This Skill

  • User asks to create a new model/entity/table
  • User wants to add a database-backed type (Users, Ideas, Documents, etc.)
  • User mentions needing CRUD operations for a new concept
  • Creating the persistence layer for a new entity

Architecture Context

In FOSMVVM, the Model is the center - the source of truth that reads and writes flow through.

See FOSMVVMArchitecture.md | OpenClaw reference for full context.

DataModel in the Architecture

                    ┌─────────────────────────────────────┐
                    │         Fluent DataModel            │
                    │    (implements Model + Fields)      │
                    │                                     │
                    │  • All fields (system + user)       │
                    │  • Relationships (@Parent, etc.)    │
                    │  • Timestamps, audit fields         │
                    │  • Persistence logic                │
                    └──────────────┬──────────────────────┘
                                   │
              ┌────────────────────┼────────────────────────┐
              │                    │                        │
              ▼                    ▼                        ▼
    ┌─────────────────┐  ┌─────────────────┐    ┌─────────────────┐
    │ ViewModelFactory│  │  CreateRequest  │    │  UpdateRequest  │
    │   (projector)   │  │   RequestBody   │    │   RequestBody   │
    │                 │  │                 │    │                 │
    │ → ViewModel     │  │ → persists to   │    │ → updates       │
    │   (projection)  │  │   DataModel     │    │   DataModel     │
    └─────────────────┘  └─────────────────┘    └─────────────────┘

Fields vs DataModels

Fields protocol = Form input (user-editable subset)

  • What users type into forms
  • Validation, labels, placeholders
  • NO relationships, NO system-assigned fields

DataModel = Complete entity (Fluent implementation)

  • All fields including system-assigned (createdBy, timestamps)
  • All relationships (@Parent, @Siblings, @Children)
  • Fluent property wrappers, migrations, seeds

Not all entities need Fields:

  • Session: system auth, no user form → DataModel-only
  • Audit records: system-generated → DataModel-only
  • Junction tables: pure storage → DataModel-only

File Structure

Each form-backed model requires files across multiple targets:

── fosmvvm-fields-generator ──────────────────────────────────
{ViewModelsTarget}/                  (shared protocol layer)
  FieldModels/
    {Model}Fields.swift              ← Protocol + Enum + Validation
    {Model}FieldsMessages.swift      ← Localization message struct

{ResourcesPath}/                     (localization resources)
  FieldModels/
    {Model}FieldsMessages.yml        ← YAML localization strings

── fosmvvm-fluent-datamodel-generator (this skill) ───────────
{WebServerTarget}/                   (server implementation)
  DataModels/
    {Model}.swift                    ← Fluent model (implements protocol)
  Migrations/
    {Model}+Schema.swift             ← Table creation migration
    {Model}+Seed.swift               ← Seed data migration

Tests/
  {ViewModelsTarget}Tests/
    FieldModels/
      {Model}FieldsTests.swift       ← Unit tests

database.swift                       ← Register migrations

How to Use This Skill

Invocation: /fosmvvm-fluent-datamodel-generator

Prerequisites:

  • Model structure understood from conversation context
  • Fields protocol exists (if form-backed model) via fosmvvm-fields-generator
  • Relationships and system-assigned fields identified
  • Fluent confirmed as the persistence layer

Workflow integration: This skill is used for server-side persistence with Fluent. For form-backed models, run fosmvvm-fields-generator first to create the Fields protocol. The skill references conversation context automatically—no file paths or Q&A needed.

Pattern Implementation

This skill references conversation context to determine DataModel structure:

Model Type Detection

From conversation context, the skill identifies:

  • Entity purpose (user data, system records, audit logs, junction table)
  • User input involvement (form-backed vs system-generated)
  • Fields protocol requirement (if user edits this data)

Relationship Analysis

From requirements already in context:

  • One-to-many relationships (@Parent in DataModel, not in Fields)
  • Many-to-many relationships (Junction table + @Siblings, NOT UUID arrays)
  • Relationship naming (self-documenting names, not vague references)

Field Classification

Based on data source:

  • User-editable fields (from Fields protocol)
  • System-assigned fields (createdBy, timestamps, status - DataModel only)
  • Computed relationships (@Parent, @Children, @Siblings)

File Generation Order

If form-backed model (Fields protocol exists):

  1. Fields layer already created via fosmvvm-fields-generator
  2. DataModel implementation referencing Fields
  3. Schema migration
  4. Seed data migration
  5. Tests
  6. Migration registration

If system-only model (no Fields):

  1. DataModel struct
  2. Schema migration
  3. Seed data migration (if needed)
  4. Tests
  5. Migration registration

Design Validation

Before generating, the skill validates:

  1. Form requirement - System-generated entities skip Fields
  2. Relationship patterns - Junction tables for many-to-many, @Parent for foreign keys
  3. Naming clarity - Relationships have self-documenting names
  4. Field separation - User fields in protocol, system fields in DataModel only

Context Sources

Skill references information from:

  • Prior conversation: Model requirements, relationships discussed
  • Fields protocol: If Claude has read Fields protocol into context or just created it
  • Database schema: From codebase analysis of existing models
  • Migration patterns: From existing migrations in project

File Templates

See reference.md for complete file templates with all patterns.


Key Patterns

Fluent DataModel

import FluentKit
import FOSFoundation
import FOSMVVM
import FOSMVVMVapor
import Foundation

final class {Model}: DataModel, {Model}Fields, Hashable, @unchecked Sendable {
    static let schema = "{models}"  // snake_case plural

    @ID(key: .id) var id: ModelIdType?

    // Fields from protocol
    @Field(key: "field_name") var fieldName: FieldType

    // Validation messages
    let {model}ValidationMessages: {Model}FieldsMessages

    // Timestamps
    @Timestamp(key: "created_at", on: .create) var createdAt: Date?
    @Timestamp(key: "updated_at", on: .update) var updatedAt: Date?

    // CRITICAL: Initialize validationMessages FIRST
    init() {
        self.{model}ValidationMessages = .init()
    }

    init(id: ModelIdType? = nil, fieldName: FieldType) {
        self.{model}ValidationMessages = .init()  // FIRST!
        self.id = id
        self.fieldName = fieldName
    }
}

Relationships (Associated Types Pattern)

PRINCIPLE: Existential types (any Protocol) are a code smell. Always ask "Is there any other way?" before using them.

For required relationships, use associated types in the protocol:

public protocol IdeaFields: ValidatableModel, Codable, Sendable {
    associatedtype User: UserFields

    var createdBy: User { get set }
}

In the Fluent model, @Parent directly satisfies the protocol:

final class Idea: DataModel, IdeaFields, Hashable, @unchecked Sendable {
    @Parent(key: "created_by") var createdBy: User
    // No computed property needed - @Parent satisfies the associated type directly
}

In schema: .field("created_by", .uuid, .required, .references(User.schema, "id", onDelete: .cascade))

When to use each pattern:

  • Associated type (associatedtype User: UserFields): Required relationships
  • Optional associated type: Not supported - use ModelIdType? for optional FKs
  • Plain ModelIdType: Optional FKs, external system references

Migrations

  • Schema migration named: "{Model.schema}-initial"
  • Seed migration named: "{Model.schema}-seed"
  • Seed is environment-aware (debug, test, release)
  • Seed is idempotent: guard count() == 0

Raw SQL in Migrations (PostgreSQL Features)

For PostgreSQL-specific features (tsvector, LTREE, etc.), use SQLKit:

import Fluent
import SQLKit  // Required for raw SQL

// In prepare():
guard let sql = database as? any SQLDatabase else { return }

let schema = Model.schema
try await sql.raw(SQLQueryString("ALTER TABLE \(unsafeRaw: schema) ADD COLUMN search_vector tsvector")).run()

Key points:

  • Import SQLKit (not just Fluent)
  • Cast database: database as? any SQLDatabase
  • Use SQLQueryString with \(unsafeRaw:) for identifiers
  • These columns are database-only (not in protocol or Fluent model)

Tests

  • Use @Suite annotation with descriptive name
  • Conform to LocalizableTestCase
  • Test all form fields
  • Test validation with @Test(arguments:)
  • Create private test struct implementing the Fields protocol

Test structs with associated types:

private struct TestIdea: IdeaFields {
    typealias User = TestUser  // Satisfy the associated type

    var id: ModelIdType?
    var createdBy: TestUser    // Concrete type, not existential
}

private struct TestUser: UserFields {
    var id: ModelIdType? = .init()
    var firstName: String = "Test"
    // ... other required fields with defaults
}

Naming Conventions

ConceptConventionExample
Model classPascalCase singularUser, Idea
Table namesnake_case pluralusers, ideas
Field keyssnake_casecreated_at, user_id
Enum casescamelCasesearchLanguage, inProgress
Enum raw valuessnake_case"search_language", "in_progress"
Protocol{Model}FieldsUserFields, IdeaFields
Messages struct{Model}FieldsMessagesUserFieldsMessages

Common Field Types

Swift TypeFluent TypeDatabase
String.stringVARCHAR/TEXT
Int.intINTEGER
Bool.boolBOOLEAN
Date.datetimeTIMESTAMPTZ
UUID.uuidUUID
[UUID].array(of: .uuid)UUID[]
Custom Enum.stringVARCHAR (stored as raw value)
JSONB.jsonJSONB

See Also


Version History

VersionDateChanges
1.02025-12-23Initial skill based on SystemConfig pattern
1.12025-12-23Added relationship patterns (@Parent), initialization order, imports list
1.22025-12-23Associated types for relationships (not existentials), raw SQL patterns, test struct patterns
1.32025-12-24Factored out Fields layer to fields-generator skill
2.02025-12-26Renamed to fosmvvm-fluent-datamodel-generator, added Scope Guard, generalized from Kairos-specific to FOSMVVM patterns, added architecture context
2.12026-01-24Update to context-aware approach (remove file-parsing/Q&A). Skill references conversation context instead of asking questions or accepting file paths.

平台分布

OpenClaw

91.16%
按下载量换算6,615

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills