Token导航 LogoToken导航

Agent Skill · 前端设计

ent-seed-sql-generator(ENT seed SQL 生成器)

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

ent-seed-sql-generator 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 5,438。

总安装 674周安装 27GitHub Stars 公开资料未说明下载 218核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ent-seed-sql-generator(ENT seed SQL 生成器)
来源仓库:https://github.com/go-sphere/skills
仓库路径:skills/ent-seed-sql-generator
安装命令:
npx skills add https://github.com/go-sphere/skills --skill ent-seed-sql-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/go-sphere/skills --skill ent-seed-sql-generator

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

基于 Ent schema 与混合证据生成确定性 ID 的生产级 seed SQL。确保外键关系有效、数据分布合理,避免运行时约束冲突。输出单一可执行 SQL 文件,简化测试环境与 demo 数据初始化流程。生成前需确认方言与策略匹配,防止 PostgreSQL/MySQL 语法差异导致失败。

ent-seed-sql-generator 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ent-seed-sql-generator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/go-sphere/skills --skill ent-seed-sql-generato…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

ent-seed-sql-generator 怎么安装?

在终端执行 npx skills add https://github.com/go-sphere/skills --skill ent-seed-sql-generator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ent-seed-sql-generator 支持哪些 AI 工具?

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

ent-seed-sql-generator 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

ent-seed-sql-generator 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ent-seed-sql-generator 用的人多吗?

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

ent-seed-sql-generator 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
ent-seed-sql-generator

ENT seed SQL 生成器 · 本页

674—只读未明确通过

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

SKILL.md 原文

Ent Seed SQL Generator

Produce one executable seed SQL artifact from Ent schemas and mixed evidence — with deterministic IDs, valid relationships, and realistic production-like data. Confirm the generation plan before writing SQL so that dialect, strategy, and scope mismatches are caught before they waste effort.

Trigger / Non-Trigger

Use this skill when the task is to generate or revise seed SQL from Ent schema context, docs, demo behavior, or prompt requirements.

Do not use this skill for schema migration design, runtime repository/service implementation, or query performance tuning.

Reference Loading Plan

Load only what is needed for the current task:

Checklist

Work through these in order. Create a task for each item.

  1. Collect inputs — prompt, Ent schema files, existing seeds, product docs
  2. Detect dialect and resolve ambiguities — ask one question at a time if unclear
  3. Present generation plan — entities, strategy, row counts; get approval
  4. Build schema map — dependency order, FK graph, enum values
  5. Generate SQL artifact — following output-sql-pattern.md
  6. Run quality gates — orphan FKs, unique violations, missing required fields

Process Flow

digraph ent_seed_sql_generator {
    "Collect inputs" [shape=box];
    "Any ambiguities?" [shape=diamond];
    "Ask clarifying question\n(one at a time)" [shape=box];
    "Present generation plan" [shape=box];
    "Plan approved?" [shape=diamond];
    "Build schema map\n& dependency order" [shape=box];
    "Generate SQL artifact" [shape=box];
    "Quality gates" [shape=box];
    "Deliver artifact" [shape=doublecircle];

    "Collect inputs" -> "Any ambiguities?";
    "Any ambiguities?" -> "Ask clarifying question\n(one at a time)" [label="yes"];
    "Ask clarifying question\n(one at a time)" -> "Any ambiguities?";
    "Any ambiguities?" -> "Present generation plan" [label="no"];
    "Present generation plan" -> "Plan approved?";
    "Plan approved?" -> "Present generation plan" [label="revise"];
    "Plan approved?" -> "Build schema map\n& dependency order" [label="yes"];
    "Build schema map\n& dependency order" -> "Generate SQL artifact";
    "Generate SQL artifact" -> "Quality gates";
    "Quality gates" -> "Deliver artifact";
}

Phase 1: Collect Inputs and Clarify

Gather available inputs in this order:

  1. Current prompt requirements
  2. Ent schemas and migration/DDL files (ent/schema/*.go, ent/migrate/)
  3. Existing seed files and demo code behavior
  4. Product docs and domain notes

Then detect the SQL dialect:

  • Check ent/client.go or config for driver name (mysql, postgres, sqlite)
  • Look at migration files for dialect-specific syntax
  • Check go.mod for dialect imports (ent/dialect/mysql, etc.)

If any of the following are unclear after reading available inputs, ask one question at a time:

  • Dialect: "I couldn't determine the database dialect from the project files. Which are you targeting — MySQL, PostgreSQL, or SQLite?"
  • Strategy: "Should this seed be one-shot (fresh setup only), idempotent (INSERT OR IGNORE / ON CONFLICT DO NOTHING), or upsert (ON CONFLICT DO UPDATE)?"
  • Scope: "Should I seed all entities, or a specific subset? If a subset, which ones?"
  • Row counts: "How many rows per entity? (3-10 is typical for development seeds)"

Do not ask questions that can be answered from the available files. Ask only what genuinely changes the output.

Phase 2: Generation Plan

Before writing SQL, present a compact plan:

Dialect: MySQL Strategy: idempotent Entity order (by dependency): 1. organizations — 3 rows, no dependencies 2. users — 5 rows, FK → organizations 3. projects — 4 rows, FK → organizations + users ID ranges: organizations 2000–2999, users 1000–1999, projects 3000–3999 Assumptions: password fields will use a fixed bcrypt hash for test credentials Does this look right before I start writing?

Scale the plan to the complexity of the task. For a single entity with no FKs, a one-line summary is enough. For multi-tenant systems with many tables, list the full dependency order.

Phase 3: Build Schema Map

After plan approval, read references/model-extraction.md and extract from ent/schema/*.go:

  • Fields: type, Optional, Nillable, Unique, Default, Immutable, Sensitive
  • Enums: all valid values from field.Enum or validate rules
  • Edges: edge.To, edge.From, Required, Unique, Ref — derive FK ownership
  • Indexes: unique constraints and composite indexes

Compute topological dependency order: tables with no FK references first, dependent tables after. Join tables last.

Phase 4: Generate SQL Artifact

Follow references/output-sql-pattern.md. Apply references/id-and-relation-rules.md for ID ranges and FK integrity.

ID Assignment:

  • Integer PKs: use non-overlapping ranges per entity type
  • String PKs: use semantic IDs (usr_admin, org_acme)
  • UUIDs: deterministic from business keys, never random

Data Coherence:

  • Timestamps: created_at <= updated_at, spread across realistic ranges
  • Status progressions: realistic lifecycle (draft → active → archived)
  • Ownership: every owner_id references an existing user row
  • Text content: meaningful strings, not Lorem Ipsum; real email patterns

For credential fields, read references/password-hashing.md.

Dialect-specific patterns:

TypePostgreSQLMySQLSQLite
JSON'{"k":"v"}'::jsonb'{"k":"v"}''{"k":"v"}'
ArrayARRAY['a','b']not nativenot native
BoolTRUE/FALSE1/01/0
Timestamp'2026-01-01 09:00:00''2026-01-01 09:00:00''2026-01-01 09:00:00'

Special cases to handle inline:

  • Soft deletes: set deleted_at to NULL for active records
  • Self-referential (trees): insert root first, children reference valid parent IDs
  • Multi-tenant: seed tenant table first; all dependent tables must carry valid tenant FK
  • Composite unique constraints: verify all column combinations are unique across rows

Phase 5: Quality Gates

Before delivering, verify:

  • No orphan FKs — every referenced ID exists
  • No unique constraint violations — including composite unique indexes
  • No placeholder or TODO values
  • All IDs are deterministic (no random or auto-generated values)
  • Timestamps are internally consistent (created_at <= updated_at)
  • All required fields (Required() in Ent schema) are present in every INSERT
  • No invalid enum values
  • JSON columns contain valid JSON strings

Output Contract

Deliver exactly one SQL artifact (inline or file, per user request) with:

  1. Header comments: source inputs, dialect, strategy, assumptions
  2. Optional cleanup block (only for idempotent/upsert strategies)
  3. INSERT blocks grouped by dependency order, each group preceded by a comment
  4. Optional verification SELECT queries (only when requested)

Guardrails

  • Never invent tables or columns without evidence — mark inferences as comments
  • Never use random IDs — seed IDs must be stable across runs
  • Never break FK dependency order — parents before children, join tables last
  • Never bloat row counts — 3–10 rows per core table is usually sufficient
  • Never expose production credentials — use test-only values
  • Never mix dialects in one file
  • Never omit required fields

平台分布

Codex

35.52%
按下载量换算77

Claude

28%
按下载量换算61

Cursor

20.58%
按下载量换算45

Gemini CLI

10.09%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills