Generates realistic seed scripts for dev, demo, and test databases, ordered by foreign keys.

CCM score
69 of 100
skills.sh installs
983
GitHub stars
1.1K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers schema discovery from Drizzle files, SQL migrations, raw SQL, and Prisma, then produces TypeScript or raw SQL seed files
  • Includes D1-specific handling for 10-row insert batches, boolean and datetime mapping, JSON text fields, and the 100-parameter limit
  • Enforces parent-before-child insert order, with two-pass inserts for circular foreign keys and delete-then-insert idempotency
  • Designed for developers populating local or demo Cloudflare D1 and SQLite databases with domain-appropriate sample data

Install

$ npx -y skills add jezweb/claude-skills --skill db-seed -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Database Seed Generator

Generate seed scripts that populate databases with realistic, domain-appropriate sample data. Reads your schema and produces ready-to-run seed files.

Workflow

1. Find the Schema

Scan the project for schema definitions:

SourceLocation pattern
Drizzle schemasrc/db/schema.ts, src/schema/*.ts, db/schema.ts
D1 migrationsdrizzle/*.sql, migrations/*.sql
Raw SQLschema.sql, db/*.sql
Prismaprisma/schema.prisma

Read all schema files. Build a mental model of:

  • Tables and their columns
  • Data types and constraints (NOT NULL, UNIQUE, DEFAULT)
  • Foreign key relationships (which tables reference which)
  • JSON fields stored as TEXT (common in D1/SQLite)

2. Determine Seed Parameters

Ask the user:

ParameterOptionsDefault
Purposedev, demo, testingdev
Volumesmall (5-10 rows/table), medium (20-50), large (100+)small
Domain context"e-commerce store", "SaaS app", "blog", etc.Infer from schema
Output formatTypeScript (Drizzle), raw SQL, or bothMatch project's ORM

Details

Repository
github.com/jezweb/claude-skills
Category
Databases
First seen
May 16, 2026

More from jezweb/claude-skills

All 64

Similar to Db Seed

More Databases