generate-factory

Generate test data factories from schemas using Faker.js.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/robit-man/transcribe-cli --skill generate-factory-robit-man
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-factory
Source: https://github.com/robit-man/transcribe-cli/tree/main/.claude/skills/generate-factory
Command: npx skills add https://github.com/robit-man/transcribe-cli --skill generate-factory-robit-man

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of test data factories, significantly reducing the boilerplate code and time required for setting up test environments and fixtures.

Core Features & Use Cases

  • Schema/Type-Driven Generation: Automatically generates factories from various sources like TypeScript interfaces, Prisma schemas, or database migrations.
  • Realistic Data with Faker.js: Leverages Faker.js to produce varied and realistic test data.
  • Use Case: When starting a new project or refactoring tests, use this skill to generate factories for all your data models, ensuring consistent and maintainable test data.

Quick Start

Generate factories for all models defined in the src/types/ directory.

Frequently Asked Questions about generate-factory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate test data factories from TypeScript interfaces?

To generate test data factories from TypeScript interfaces, this Skill analyzes your type definitions and maps them to Faker.js patterns, automatically producing boilerplate factory code for your test fixtures.

What is the best way to reduce test setup boilerplate using Faker.js?

The best way to reduce test setup boilerplate with Faker.js is to auto-generate factory functions from your schemas or models, which eliminates manual fixture creation and provides varied, realistic test data.

Can I use this to generate fixtures from Prisma schemas?

Yes, you can generate test data fixtures from Prisma schemas. The Skill scans your source definitions, extracts the model structures, and maps the field types to appropriate Faker.js data generators.

Does the generated test data support deterministic outputs for consistent test runs?

Yes, the generated test data supports deterministic outputs. By mapping your schema types to Faker.js patterns, the Skill can configure data generation to produce varied or deterministic fixtures based on your testing requirements.

What are the limitations of using auto-generated factories for test data infrastructure?

A limitation of auto-generated factories is that they rely on analyzing source definitions like schemas or types. If your models have complex custom validation rules, you may need to manually adjust the generated Faker.js mappings.