Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates realistic database seed scripts with Faker libraries, respecting foreign keys, unique constraints, and configurable data volumes.
88% 100%+13 ptsof test cases passed
Passed 24 of 24 test cases with the skill, and 21 of 24 without it.
3 of 3 safety checks passed
Not used yet
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).
@faker-js/faker (Node.js), faker (Python), or Bogus (.NET)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.
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.
Map each column to an appropriate Faker generator based on column name and data type:
first_name, last_name -> faker.person.firstName(), faker.person.lastName()email -> faker.internet.email() with unique enforcementphone -> faker.phone.number()address, city, state, zip -> faker.location.*created_at, updated_at -> faker.date.between({ from: '2023-01-01', to: '2024-12-31' })price, amount -> faker.commerce.price({ min: 1, max: 999 })description, bio -> faker.lorem.paragraph()status -> Random selection from CHECK constraint values or enum valuesuuid -> faker.string.uuid()Generate foreign key values by referencing previously inserted parent records. Store parent IDs in arrays during generation and randomly select from them for child records. Ensure every parent has at least one child (if the relationship is expected) and distribute children realistically (e.g., Zipf distribution where some users have many orders, most have few).
Handle unique constraints by tracking generated values in a Set and regenerating on collision. For email addresses, append a counter or use faker.internet.email({ firstName, lastName }) with unique names.
Respect CHECK constraints and ENUM types by reading the allowed values from the schema and restricting random selection to valid options. For range constraints (CHECK (age >= 18 AND age <= 120)), configure Faker to generate within the valid range.
Generate the seed script in the appropriate format:
INSERT INTO users (name, email, ...) VALUES ('John Doe', '[email protected]', ...); with proper escapingprisma.user.createMany() or repository.save()Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.