本文へ移動
cccskills
無料GitHub で公開

ln-723-seed-data-generator

Universal seed data generator: MIGRATE from ORM schemas or GENERATE from entity definitions to any target format

インストール方法を見る

含まれるファイル(5)

  • SKILL.md9.6 KB
  • references/data_generation.md3.9 KB
  • references/orm_patterns.md6.9 KB
  • references/relationship_mapping.md3.5 KB
  • references/type_mapping.md5.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

ln-723-seed-data-generator

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-720-structure-migrator

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

AspectDescription
InputORM schema files (MIGRATE) or entity list (GENERATE)
OutputSeed data files in target format
ModesMIGRATE: 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

ModeWhenInputSource
MIGRATETRANSFORM pipeline — existing ORM schemas foundORM schema filesDrizzle, Prisma, TypeORM, EF Core, SQLAlchemy, Django ORM
GENERATECREATE pipeline — no existing schemasEntity list from ln-700 Phase 0User-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

FormatOutput FileFaker LibraryUse Case
C# MockDataMockData.csBogus.NET projects
TypeScript fixturesseed.tsFaker.jsNode/React projects
Python factoriesfactories.pyFaker (Python)Django/Flask projects
JSONseed.json—API testing, import scripts
SQLseed.sql—Direct DB seeding

Workflow

PhaseNameActionsOutput
1Parse/Define1A: Parse ORM schema (MIGRATE) or 1B: Accept entity list (GENERATE)Entity model
2Map TypesApply universal type mapping to target formatTarget type definitions
3Generate Seed DataCreate seed files with faker-based realistic dataSeed data files
4VerifyValidate relationships, check syntaxValid seed files

Phase 1: Parse/Define

1A: MIGRATE Mode — Parse ORM Schema

StepActionReference
1A.1Locate schema file(s)—
1A.2Auto-detect ORM typeorm_patterns.md — ORM Auto-Detection table
1A.3Extract table/model definitionsorm_patterns.md — per-ORM parsing section
1A.4Extract column definitions with typesorm_patterns.md
1A.5Identify constraints (PK, FK, nullable, unique)orm_patterns.md
1A.6Extract enum definitionsorm_patterns.md

1B: GENERATE Mode — Accept Entity Definitions

StepActionReference
1B.1Receive entity list from orchestrator (or use starter template)—
1B.2Parse entity definitions (name, fields, types)—
1B.3Infer relationships from field names (userId → FK to User)relationship_mapping.md
1B.4Apply 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.

StepActionReference
2.1Select target format (from orchestrator params)—
2.2Map column types to target formattype_mapping.md — Universal Type Mapping table
2.3Determine nullable status per targettype_mapping.md
2.4Map foreign keys and relationshipsrelationship_mapping.md
2.5Transform names to target conventionSee Name Conventions table below

Name Conventions by Target:

TargetClass/ModelProperty/FieldFile
C#PascalCase singularPascalCasePascalCase.cs
TypeScriptPascalCase singularcamelCasecamelCase.ts
PythonPascalCase singularsnake_casesnake_case.py
JSONcamelCasecamelCasekebab-case.json
SQLsnake_case pluralsnake_casesnake_case.sql

Phase 3: Generate Seed Data

Create seed files with realistic data using faker libraries.

StepActionReference
3.1Determine generation order (parents → children)relationship_mapping.md
3.2Generate IDs (GUIDs/UUIDs) for all entitiesdata_generation.md
3.3Generate field values using fakerdata_generation.md, type_mapping.md — Faker Integration
3.4Ensure FK relationships valid (child references existing parent ID)relationship_mapping.md
3.5Write 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).

TargetFaker Setup
C#var faker = new Bogus.Faker(); Randomizer.Seed = new Random(42);
TypeScriptimport { faker } from '@faker-js/faker'; faker.seed(42);
Pythonfrom faker import Faker; fake = Faker(); Faker.seed(42)

Generation order by dependency:

OrderEntity TypeGenerate After
1Root entities (no FK)First
2First-level childrenParents exist
3Second-level childrenGrandparents exist
NDeepest childrenAll ancestors exist

Phase 4: Verify

CheckMethodExpected
Syntax validLanguage-specific checkNo syntax errors
FKs validCross-referenceAll FKs point to existing IDs
Types correctType analysisProper types for target format
Names follow conventionPattern checkPer-target naming convention
Faker deterministicRe-run with same seedIdentical output

Supported ORM Detection

ORMDetection PatternEcosystem
DrizzlepgTable(), mysqlTable(), sqliteTable()Node.js
Prismamodel X { syntax in .prisma filesNode.js
TypeORM@Entity(), @Column() decoratorsNode.js
EF CoreDbContext, DbSet<>, [Table] attributes.NET
SQLAlchemyBase = declarative_base(), Column()Python
Django ORMmodels.Model, models.CharField()Python

Entity Transformation Rules

SourceTargetTransformation
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 nameEnum type (Pascal)status_enum → StatusEnum
FK columnNavigation propertyuser_id → UserId / userId

Sample Data Guidelines

Field TypeSample CountDistribution
Root entities3-5 itemsVaried status/priority
Child entities5-10 itemsDistributed across parents
Leaf entities10-20 itemsRealistic 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 constraints
  • Target format selected and type mappings applied
  • Seed data files generated with faker-based realistic values
  • Deterministic seeding verified (re-run produces identical output)
  • Foreign keys reference valid parent IDs
  • Names follow target format conventions
  • Sample data includes 5-10 items per entity

Risk Mitigation

RiskDetectionMitigation
Unknown ORM typeAuto-detection failsLog warning, ask orchestrator for ORM hint
Invalid type mappingUnknown column typeUse string as fallback, log warning
FK mismatchFK references non-existent IDGenerate parents first, validate after
No entity list in GENERATEEmpty inputUse starter template (User, Role)
Name collisionDuplicate class/table namesPrefix with feature name
Circular referencesSelf-referencing with cyclesLimit depth, validate graph

Reference Files

FilePurpose
references/orm_patterns.mdORM auto-detection and schema parsing patterns (Drizzle, Prisma, TypeORM, EF Core, SQLAlchemy, Django)
references/type_mapping.mdUniversal type mapping (ORM-agnostic → C#, TypeScript, Python) + Faker integration
references/data_generation.mdRealistic sample data patterns and generation rules
references/relationship_mapping.mdFK handling, generation order, relationship inference

Version: 3.0.0 Last Updated: 2026-02-07

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Whole site or product — a full web accessibility (a11y) audit against WCAG 2.2, following the WCAG-EM methodology. Defines scope, samples representative pages and flows, runs the automated tier (`accessibility-scan`) and the hands-on manual tier (`accessibility-inspect`), and produces one conformance report. Grades each finding by severity and evidence basis, and states per-criterion conformance as pass, fail, or undetermined (needs a human). Use it for 'audit my site for accessibility', 'is this product accessible', 'a11y audit', 'WCAG or Section 508 conformance report', or any multi-page assessment. Assesses; does not fix (use `accessibility-fix`) or diff (use `accessibility-diff`). For a single page use `accessibility-scan`; for hands-on keyboard and screen-reader checks use `accessibility-inspect`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Regression check — diff a live page's web accessibility (a11y) violations against a baseline. By default it compares your uncommitted changes (stash-based); pass `--branch [<name>]` to compare against a branch. Reports the new WCAG violations introduced, the ones fixed, and the count of pre-existing ones. Use it for 'did my change break accessibility', 'what a11y issues did this PR add', or as a CI gate. For a full scan of one page use `accessibility-scan`; for a whole site use `accessibility-audit`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Remediation only — repair web accessibility (a11y) violations against WCAG 2.2 with a baseline, edit, and verify loop. Takes a target (URL, files, directory) or a findings worklist from `accessibility-scan`/`accessibility-inspect`/`accessibility-audit`, applies mechanical fixes as given, leaves TODOs for visual or contextual judgment, and verifies by re-running the baseline check. It only fixes. To find issues use `accessibility-scan` (one page, automated), `accessibility-inspect` (one page, manual), or `accessibility-audit` (whole site, WCAG-EM); to check for regressions use `accessibility-diff`. Use it for 'fix the a11y issues in X', 'make this accessible', 'add missing alt text and labels', 'apply these accessibility fixes', 'remediate these violations'.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

One page, hands-on manual tier — drive a live page through the web accessibility (a11y) checks a rule engine can't decide: keyboard operation and focus order, screen-reader names, roles and states from the accessibility tree, reflow and zoom, reduced motion, form errors, and target size. Grades each finding by evidence basis (verified / confirm-with-a-human / human-required) and severity, and closes every criterion in a ledger: verified, flagged, not exercised, or N/A. Locates and assesses; does not fix (use `accessibility-fix`). Use it for keyboard testing, focus-order checks, screen-reader or a11y-tree review, reflow and zoom at 200%, or 'is this operable, not just lint-clean'. The automated tier is `accessibility-scan`; `accessibility-audit` runs both across a sampled site.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

One page, automated tier — run the web accessibility (a11y) rule engine against a live page and locate every violation it can detect mechanically. Pass a URL, a config target name (e.g. `accesslint:accessibility-scan dev`), or nothing to use the default target from `accesslint.config.json`. Ensures a debuggable Chrome, runs the @accesslint/core engine over CDP, and returns a worklist of live-DOM WCAG 2.2 violations, each grounded to its DOM selector and source `file:line`. Locates; doesn't edit. Use it for 'is this page accessible', 'check a11y on this URL', 'find contrast and alt-text issues', or to verify a UI change. For hands-on keyboard and screen-reader checks use `accessibility-inspect`; for a whole site or product use `accessibility-audit`; to diff against uncommitted changes or a branch use `accessibility-diff`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

tensology のスキルをすべて見る

このスキルの問題を報告する