home / skills / openclaw / skills / seed-gen

This skill generates realistic seed data from your schema, ensuring coherent relationships, realistic values, and ready-to-run seed scripts.

npx playbooks add skill openclaw/skills --skill seed-gen

Review the files below or copy the command above to add this skill to your agents.

Files (12)
SKILL.md
2.5 KB
---
name: seed-gen
description: Generate realistic database seed data from your schema. Use when you need test data that looks real.
---

# Seed Gen

Fake data that looks real. No more "test user 1" and "lorem ipsum" everywhere. This tool reads your schema and generates seed data that actually makes sense. Real names, realistic emails, proper timestamps, coherent relationships.

**One command. Zero config. Just works.**

## Quick Start

```bash
npx ai-seed prisma/schema.prisma
```

## What It Does

- Generates realistic seed data based on your schema
- Understands field types and generates appropriate values
- Maintains referential integrity across related tables
- Creates data that tells a coherent story (not random garbage)
- Outputs ready-to-use seed scripts

## Usage Examples

```bash
# Generate seed data from schema
npx ai-seed prisma/schema.prisma

# Specify number of records
npx ai-seed prisma/schema.prisma --count 50

# Target specific tables
npx ai-seed prisma/schema.prisma --tables users,posts,comments

# Output as SQL
npx ai-seed prisma/schema.prisma --format sql > seed.sql
```

## Best Practices

- **Match your use case** - E-commerce app? Ask for product-focused data. Social app? User interactions.
- **Start small** - Generate 10-20 records first to check quality before scaling up
- **Check relationships** - Make sure foreign keys point to existing records
- **Add edge cases** - Ask for some empty fields, deleted users, old dates to test your UI

## When to Use This

- Starting a new project and need demo data
- Building UI and need realistic content to design around
- Testing queries and need enough data to see performance issues
- Demoing to stakeholders and want it to look professional

## Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgic.dev

## Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Requires OPENAI_API_KEY environment variable.

```bash
export OPENAI_API_KEY=sk-...
npx ai-seed --help
```

## How It Works

Reads your schema to understand models and relationships. Uses GPT to generate contextually appropriate data that fits your domain. Outputs seed scripts with proper insert order to respect foreign key constraints.

## License

MIT. Free forever. Use it however you want.

Overview

This skill generates realistic, coherent database seed data directly from your schema. It produces ready-to-run seed scripts that respect types and foreign keys so your development and demos look professional. One command, zero config: it aims to just work for common stacks like Prisma and SQL outputs.

How this skill works

It reads your schema to detect models, field types, and relationships, then uses a language model to craft contextually appropriate values (names, emails, timestamps, etc.). It maintains referential integrity by ordering inserts and linking related records. Outputs include SQL or framework-ready seed scripts and options to control record counts and target tables.

When to use it

  • Bootstrapping a new project and you need believable demo data
  • Designing UI with realistic content to validate layouts and edge cases
  • Testing queries, migrations, or performance with a varied dataset
  • Preparing a demo for stakeholders so examples look professional and believable
  • Generating targeted seed sets for specific tables during development

Best practices

  • Start small (10–20 records) to verify formats and relationships before scaling up
  • Specify target tables to focus dataset on areas under development
  • Include edge cases (nulls, deleted flags, old timestamps) to exercise your UI and logic
  • Validate foreign keys and unique constraints after generation in a staging environment
  • Use descriptive domain prompts (e.g., e-commerce, social) to steer generated data toward your use case

Example use cases

  • Generate users, posts, and comments that read like a real social app for design review
  • Create product catalogs, prices, and inventory entries for an e-commerce prototype
  • Produce historical events and timestamps to test analytics and reporting queries
  • Output SQL seed files to feed CI pipelines or local databases for integration tests
  • Quickly assemble demo data for stakeholder presentations without manual entry

FAQ

Do I need to configure anything to run it?

No config is required for basic use—one command reads your schema and generates seeds. You can add optional flags for count, tables, and format.

How does it keep relationships consistent?

It analyzes model associations and generates records in an order that satisfies foreign keys, linking related records to maintain referential integrity.