generating-database-seed-data

Installation
SKILL.md

Data Seeder Generator

Overview

Generate realistic database seed scripts that populate development and testing environments with representative data. This skill creates seed data that respects foreign key relationships, unique constraints, check constraints, and data type validations using Faker libraries (faker.js, Faker for Python, or raw SQL with random functions).

Prerequisites

  • Database schema definition (SQL DDL, ORM models, or Prisma schema) to understand table structures
  • Target database connection for schema introspection (optional, can work from DDL files)
  • Faker library available: @faker-js/faker (Node.js), faker (Python), or Bogus (.NET)
  • Knowledge of referential integrity constraints (foreign keys, cascades)
  • Target data volume per table (e.g., 100 users, 1000 orders, 5000 line items)

Instructions

  1. Analyze the database schema to catalog all tables, columns, data types, constraints, and foreign key relationships. Build a dependency graph where parent tables (referenced by foreign keys) must be seeded before child tables.

  2. Determine the seeding order by topologically sorting the dependency graph. Tables with no foreign keys are seeded first (users, categories, products), then tables referencing them (orders, reviews), then junction tables and deeply nested tables last.

Related skills
Installs
32
GitHub Stars
2.2K
First Seen
Feb 18, 2026