All skills
Skillintermediate
/generate-data - Generate Test Data
Generate realistic test data based on schema definitions or models.
Claude Code Knowledge Pack7/10/2026
Overview
/generate-data - Generate Test Data
Generate realistic test data based on schema definitions or models.
Steps
- Ask the user for the data model or schema to generate test data for
- Analyze the model: field names, types, constraints, and relationships
- Determine data generation strategy based on field semantics (name, email, address, etc.)
- Use faker-compatible libraries to generate realistic values for each field
- Respect field constraints: min/max length, required fields, unique values, regex patterns
- Handle relationships: generate parent records before children, maintain referential integrity
- Generate the specified number of records (default 10, max 10000)
- Validate generated data against the schema constraints
- Output data in the requested format: JSON, CSV, SQL INSERT statements, or fixture files
- Save the generated data to the test/fixtures directory
- Report: total records generated, format, file size, and any constraint warnings
Rules
- Generate deterministic data using a seed value for reproducibility
- Respect unique constraints by tracking generated values
- Use locale-appropriate data when the project specifies a locale
- Handle nullable fields by including a mix of null and non-null values
- Generate edge cases: empty strings, max-length strings, boundary numbers
- Do not generate sensitive data patterns (real SSNs, credit card numbers)
- Include both valid and intentionally invalid records when requested