Help us improve
Share bugs, ideas, or general feedback.
From godmode
Generates idempotent database seed scripts, test fixtures, and fake data using factory patterns (fishery, factory_boy, FactoryBot) and fakers for Prisma, SQLAlchemy, Rails.
npx claudepluginhub arbazkhan971/godmodeHow this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:seedThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/godmode:seed`, "seed the database", "generate test data"
Establishes patterns for test factories, fixtures, database seeding, and test data isolation to create realistic, composable data without coupling tests to database states.
Generates realistic database seed scripts using Faker libraries, respecting foreign keys, constraints, and data types via schema analysis and topological sort. For dev/test environments.
Generates idempotent TypeScript/SQL seed scripts from Drizzle, Prisma, or SQL schemas with realistic data respecting FKs, constraints, and D1 limits. For dev/demo/test DB population.
Share bugs, ideas, or general feedback.
/godmode:seed, "seed the database", "generate test data"# Detect ORM and factory libraries
grep -r "prisma\|typeorm\|sequelize\|django\|sqlalchemy" \
package.json pyproject.toml Gemfile 2>/dev/null
ls prisma/seed.ts db/seeds.rb scripts/seed* 2>/dev/null
grep -r "@faker-js\|faker\|factory_bot\|Bogus" \
package.json pyproject.toml 2>/dev/null
SEEDING ENVIRONMENT:
Language: <TS | Python | Go | Ruby | Java>
ORM: <Prisma | Drizzle | SQLAlchemy | ActiveRecord>
Database: <PostgreSQL | MySQL | SQLite | MongoDB>
Existing seeds: <path or "none detected">
Factory lib: <fishery | factory_boy | none>
Faker lib: <@faker-js/faker | Faker Python | none>
Library selection:
TypeScript: fishery
Python: factory_boy
Ruby: FactoryBot
Go: table-driven builders + gofakeit
C#: Bogus
Java: Instancio
Key patterns:
Base factory with faker defaults + sequence IDs
Traits for variants (admin, inactive, published)
build() for in-memory, create() for persisted
buildList(N) for batches
Override any field at call site
IDEMPOTENT SEED RULES:
1. ALWAYS upsert (insert or update), never plain insert
2. Stable identifiers (slug, email) not auto-increment
3. Dependency order (users before posts)
4. Wrap each group in transaction
5. Log: created vs skipped vs updated
6. Re-runnable: running twice = same result
SEED STRUCTURE:
faker.seed(42) for determinism
Phase 1: reference data (roles, categories via upsert)
Phase 2: core entities (fixed + random users)
Phase 3: dependent entities (posts, comments)
Check count vs target, only create delta
Seed in topological order: reference -> independent -> first-level deps -> second-level deps -> M:N joins -> derived data.
Use Pareto distribution: 20% of parents get 80% of children for realistic associations.
NEVER insert one row at a time.
Batch size: 500-5000 rows per INSERT.
IF 100K+ rows: streaming or raw COPY (PostgreSQL)
IF bulk loading:
SET session_replication_role = 'replica'
(disable FK checks during load)
After: REINDEX, ANALYZE
Performance thresholds:
50 rows: <1s (dev seed)
5K rows: <10s (staging seed)
100K rows: <60s (demo seed via COPY)
faker.seed(42) = same data every runIF production snapshot needed:
Replace emails: user_N@example.com
Replace names, phones, addresses: faker
Remove: credit cards, API keys, tokens, passwords
Add noise to financial amounts (+-10%)
Shift dates by random offset
NEVER copy production without anonymization
Truncate cascade: full reset
Delete by marker: DELETE WHERE source = 'seed'
Transaction rollback: BEGIN->seed->test->ROLLBACK
Database drop/create: CI pipelines
Snapshot restore: pg_restore from dump
ENVIRONMENT-AWARE:
Dev: 50 users, deterministic, minimal
Staging: 5K users, randomized, weekly reset
Demo: 200 curated, deterministic
Production: NEVER seed fake data
Commit: "seed: add <desc> seeding infrastructure"
grep -r "prisma\|typeorm\|sequelize\|django" \
package.json pyproject.toml Gemfile 2>/dev/null
ls prisma/seed.ts db/seeds.rb scripts/seed* 2>/dev/null
Log to .godmode/seed-results.tsv:
step\tentity\torm\tmethod\tstatus\tdetails
Print: Seed: {N} entities, {rows} rows. Idempotent: {yes|no}. Env guard: {active}. Status: {DONE|PARTIAL}.
KEEP if: idempotent (re-run safe) AND batch-inserted
AND dependency order correct
DISCARD if: unique constraint on re-run
OR FK errors OR single-row loops
STOP when:
- All entities seeded idempotently
- Env guard active, --reset works
- User requests stop