Seed

From Hainrixz/claude-db · View interactive version

Seed is an AI agent skill from the GitHub repository Hainrixz/claude-db. Generate FK-aware, deterministic sample/seed data from a database schema, ORM model, or migrations — INSERT statements emitted in dependency order (parents first), values derived from row index so output is stable and reviewable. Read-only; never writes to a database. For dev/test fixtures only. Use

How to use this skill

Skill file

<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-f37b7121 -->

/claude-db:seed

Generates FK-aware, deterministic sample/seed INSERTs from a schema. Read-only — it never connects to or writes to a database. The output is dev/test data only: predictable values derived from the row index (no RNG), suitable for fixtures, local development, and CI — never for production.

$ARGUMENTS = <path-to-schema> [flags]. The target is a schema/DDL, ORM model, or migration file. If no path is given, detect one in the working directory (look for *.sql, schema.prisma, models.py, migration dirs). If nothing is found, say so plainly and suggest pointing at a file or running /claude-db:design to create one.

What to do

  1. Resolve the schema path (from $ARGUMENTS or detection above).
  2. Run the generator:

```bash

node scripts/gen-seed.mjs --file <schema> --rows N [--format sql|json]

```

  1. Present the result:
  1. Offer to save to a file (e.g. seed.sql or fixtures.json) — only write if the user confirms a path. Otherwise leave it inline.

Notes

For dev/test fixtures only. Never run generated seeds against a production database. Respond in the user's language (EN/ES).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.