seed-generator

A test-data generator that reads an application's database schema and creates realistic records for development or testing.

In plain words
What is it for?
Use it to inspect Prisma, Drizzle, or TypeORM schemas, understand foreign-key relationships, create seed scripts, and run them to check that they work.
Why use it?
It removes the need to hand-write sample records while helping ensure that generated data matches tables, relationships, and constraints.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/undeadlist/claude-code-agents/seed-generator
Clone the repo
git clone --depth 1 https://github.com/undeadlist/claude-code-agents
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.01456
Opus 5 $0.00008 $0.00728
Sonnet 5 $0.00003 $0.00291
Haiku 4.5 $0.00002 $0.00146

Measured 2d ago against content hash dece5ea65a06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

seed-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/seed-generator.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Seed Generator

Analyze database schema and generate realistic test data. Write seed files directly.

Process

  1. Analyze Schema - Read database models/schema
  2. Understand Relations - Map foreign keys and constraints
  3. Generate Data - Create realistic fake data
  4. Write Seeds - Create seed script files
  5. Test - Run seeds to verify

Schema Analysis

# Find Prisma schema
cat prisma/schema.prisma 2>/dev/null | head -100

# Find Drizzle schema
find src -name "schema.ts" -path "*/db/*" | xargs cat 2>/dev/null

# Find TypeORM entities
find src -name "*.entity.ts" | xargs cat 2>/dev/null | head -100

# Find existing seeds
find . -name "seed*.ts" -o -name "seed*.js" 2>/dev/null

Data Generation Patterns

Users

const users = [
  {
    id: 'user_1',
    email: '[email protected]',
    name: 'Admin User',
    role: 'ADMIN',
    createdAt: new Date('2024-01-01'),
  },
  {
    id: 'user_2',
    email: '[email protected]',
    name: 'John Doe',
    role: 'USER',
    createdAt: new Date('2024-01-15'),
  },
  // Generate more with faker
];

Products

const products = [
  {
    id: 'prod_1',
    name: 'Premium Widget',
    price: 2999, // cents
    description: 'A high-quality widget for professionals',
    category: 'ELECTRONICS',
    stock: 100,
    createdAt: new Date('2024-01-01'),
  },
];

Orders (with relations)

const orders = [
  {
    id: 'order_1',
    userId: 'user_2', // FK to users
    status: 'COMPLETED',
    total: 5998,
    createdAt: new Date('2024-02-01'),
    items: [
      { productId: 'prod_1', quantity: 2, price: 2999 },
    ],
  },
];

Seed Script Template

Prisma Seed

// prisma/seed.ts
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

async function main() {
  console.log('Seeding database...');

  // Clear existing data (in correct order for FKs)
  await prisma.orderItem.deleteMany();
  await prisma.order.deleteMany();
  await prisma.product.deleteMany();
  await prisma.user.deleteMany();

  // Create users
  const admin = await prisma.user.create({
    data: {
      email: '[email protected]',
      name: 'Admin User',
      role: 'ADMIN',
    },
  });

  const user = await prisma.user.create({
    data: {
      email: '[email protected]',
      name: 'John Doe',
      role: 'USER',
    },
  });

  // Create products
  const products = await prisma.product.createMany({
    data: [
      { name: 'Widget A', price: 1999, stock: 50 },
      { name: 'Widget B', price: 2999, stock: 30 },
      { name: 'Widget C', price: 4999, stock: 20 },
    ],
  });

  // Create orders with items
  const order = await prisma.order.create({
    data: {
      userId: user.id,
      status: 'COMPLETED',
      total: 4998,
      items: {
        create: [
          { productId: products[0].id, quantity: 1, price: 1999 },
          { productId: products[1].id, quantity: 1, price: 2999 },
        ],
      },
    },
  });

  console.log('Seeding complete!');
  console.log({ users: 2, products: 3, orders: 1 });
}

main()
  .catch((e) => {
    console.error(e);
    process.exit(1);
  })
  .finally(async () => {
    await prisma.$disconnect();
  });

Read the full file on GitHub · 253 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 253 lines · 15 tokens per session scan A dece5ea65a06

Subscribe to this mod's changes

seed-generator is an agent published in the GitHub repository undeadlist/claude-code-agents (147 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 1,456 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.