ln-723-seed-data-generator
Generates seed data from ORM schemas or entity definitions to any target format. Use when populating databases for development.
What this skill does
> **Paths:** File paths (`references/`, `../ln-*`) are relative to this skill directory.
# ln-723-seed-data-generator
**Type:** L3 Worker
**Category:** 7XX Project Bootstrap
Universal seed data generator with two modes: MIGRATE (parse existing ORM schemas) or GENERATE (create from entity definitions). Outputs to any target format (C#, TypeScript, Python, JSON, SQL).
---
## Purpose & Scope
| Aspect | Description |
|--------|-------------|
| **Input** | ORM schema files (MIGRATE) or entity list (GENERATE) |
| **Output** | Seed data files in target format |
| **Modes** | MIGRATE: parse existing ORM → seed data. GENERATE: entity definitions → seed data |
**Scope boundaries:**
- Parses ORM schema definitions or accepts entity lists
- Generates seed data in requested target format
- Creates realistic sample data using faker libraries
- Does not generate database migrations, EF Core configs, or ORM models
---
## Mode Selection
| Mode | When | Input | Source |
|------|------|-------|--------|
| **MIGRATE** | TRANSFORM pipeline — existing ORM schemas found | ORM schema files | Drizzle, Prisma, TypeORM, EF Core, SQLAlchemy, Django ORM |
| **GENERATE** | CREATE pipeline — no existing schemas | Entity list from ln-700 Phase 0 | User-provided or starter template (User, Role) |
If GENERATE mode receives no entity list, generate starter template with `User` (id, name, email, role, createdAt) and `Role` (id, name, description).
---
## Target Formats
| Format | Output File | Faker Library | Use Case |
|--------|-------------|---------------|----------|
| C# MockData | `MockData.cs` | Bogus | .NET projects |
| TypeScript fixtures | `seed.ts` | Faker.js | Node/React projects |
| Python factories | `factories.py` | Faker (Python) | Django/Flask projects |
| JSON | `seed.json` | — | API testing, import scripts |
| SQL | `seed.sql` | — | Direct DB seeding |
---
## Workflow
| Phase | Name | Actions | Output |
|-------|------|---------|--------|
| 1 | Parse/Define | 1A: Parse ORM schema (MIGRATE) or 1B: Accept entity list (GENERATE) | Entity model |
| 2 | Map Types | Apply universal type mapping to target format | Target type definitions |
| 3 | Generate Seed Data | Create seed files with faker-based realistic data | Seed data files |
| 4 | Verify | Validate relationships, check syntax | Valid seed files |
---
## Phase 1: Parse/Define
### 1A: MIGRATE Mode — Parse ORM Schema
| Step | Action | Reference |
|------|--------|-----------|
| 1A.1 | Locate schema file(s) | — |
| 1A.2 | Auto-detect ORM type | `orm_patterns.md` — ORM Auto-Detection table |
| 1A.3 | Extract table/model definitions | `orm_patterns.md` — per-ORM parsing section |
| 1A.4 | Extract column definitions with types | `orm_patterns.md` |
| 1A.5 | Identify constraints (PK, FK, nullable, unique) | `orm_patterns.md` |
| 1A.6 | Extract enum definitions | `orm_patterns.md` |
### 1B: GENERATE Mode — Accept Entity Definitions
| Step | Action | Reference |
|------|--------|-----------|
| 1B.1 | Receive entity list from orchestrator (or use starter template) | — |
| 1B.2 | Parse entity definitions (name, fields, types) | — |
| 1B.3 | Infer relationships from field names (`userId` → FK to User) | `relationship_mapping.md` |
| 1B.4 | Apply default constraints (id = PK, `*Id` = FK) | — |
**Output:** Entity model with columns, types, and constraints.
---
## Phase 2: Map Types
Convert entity types to target format types.
| Step | Action | Reference |
|------|--------|-----------|
| 2.1 | Select target format (from orchestrator params) | — |
| 2.2 | Map column types to target format | `type_mapping.md` — Universal Type Mapping table |
| 2.3 | Determine nullable status per target | `type_mapping.md` |
| 2.4 | Map foreign keys and relationships | `relationship_mapping.md` |
| 2.5 | Transform names to target convention | See Name Conventions table below |
**Name Conventions by Target:**
| Target | Class/Model | Property/Field | File |
|--------|-------------|----------------|------|
| C# | PascalCase singular | PascalCase | PascalCase.cs |
| TypeScript | PascalCase singular | camelCase | camelCase.ts |
| Python | PascalCase singular | snake_case | snake_case.py |
| JSON | camelCase | camelCase | kebab-case.json |
| SQL | snake_case plural | snake_case | snake_case.sql |
---
## Phase 3: Generate Seed Data
Create seed files with realistic data using faker libraries.
| Step | Action | Reference |
|------|--------|-----------|
| 3.1 | Determine generation order (parents → children) | `relationship_mapping.md` |
| 3.2 | Generate IDs (GUIDs/UUIDs) for all entities | `data_generation.md` |
| 3.3 | Generate field values using faker | `data_generation.md`, `type_mapping.md` — Faker Integration |
| 3.4 | Ensure FK relationships valid (child references existing parent ID) | `relationship_mapping.md` |
| 3.5 | Write seed file in target format | — |
**Faker integration rule:** All generated seed files MUST use faker libraries for realistic data with **deterministic seeding** (fixed seed value for reproducibility).
| Target | Faker Setup |
|--------|-------------|
| C# | `var faker = new Bogus.Faker(); Randomizer.Seed = new Random(42);` |
| TypeScript | `import { faker } from '@faker-js/faker'; faker.seed(42);` |
| Python | `from faker import Faker; fake = Faker(); Faker.seed(42)` |
**Generation order by dependency:**
| Order | Entity Type | Generate After |
|-------|-------------|----------------|
| 1 | Root entities (no FK) | First |
| 2 | First-level children | Parents exist |
| 3 | Second-level children | Grandparents exist |
| N | Deepest children | All ancestors exist |
---
## Phase 4: Verify
| Check | Method | Expected |
|-------|--------|----------|
| Syntax valid | Language-specific check | No syntax errors |
| FKs valid | Cross-reference | All FKs point to existing IDs |
| Types correct | Type analysis | Proper types for target format |
| Names follow convention | Pattern check | Per-target naming convention |
| Faker deterministic | Re-run with same seed | Identical output |
---
## Supported ORM Detection
| ORM | Detection Pattern | Ecosystem |
|-----|-------------------|-----------|
| Drizzle | `pgTable()`, `mysqlTable()`, `sqliteTable()` | Node.js |
| Prisma | `model X {` syntax in `.prisma` files | Node.js |
| TypeORM | `@Entity()`, `@Column()` decorators | Node.js |
| EF Core | `DbContext`, `DbSet<>`, `[Table]` attributes | .NET |
| SQLAlchemy | `Base = declarative_base()`, `Column()` | Python |
| Django ORM | `models.Model`, `models.CharField()` | Python |
---
## Entity Transformation Rules
| Source | Target | Transformation |
|--------|--------|----------------|
| Table name (plural, snake) | Class name (singular, Pascal) | `user_profiles` → `UserProfile` |
| Column name (snake) | Property name (target convention) | `created_at` → `CreatedAt` / `createdAt` / `created_at` |
| Enum name | Enum type (Pascal) | `status_enum` → `StatusEnum` |
| FK column | Navigation property | `user_id` → `UserId` / `userId` |
---
## Sample Data Guidelines
| Field Type | Sample Count | Distribution |
|------------|--------------|--------------|
| Root entities | 3-5 items | Varied status/priority |
| Child entities | 5-10 items | Distributed across parents |
| Leaf entities | 10-20 items | Realistic variety |
---
## Critical Rules
- **Single Responsibility:** Generate only seed data, no ORM models or migrations
- **Idempotent:** Can re-run with same seed to produce identical output
- **Valid Relationships:** All FKs must reference existing parent IDs
- **Faker Required:** Use faker libraries for realistic data, never random strings
- **Deterministic Seeding:** Fixed seed value (42) for reproducibility across re-runs
- **Generation Order:** Parents before children, always
- **Mode Awareness:** MIGRATE parses files; GENERATE accepts definitions — never mix
---
## Definition of Done
- [ ] Mode determined (MIGRATE or GENERATE)
- [ ] Entity model extracted/defined with all fields and constraiRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.