rails-model-generator

Automate Rails model scaffolding with a TDD-first workflow.

3|Updated Oct 16, 2025
One-click install
npx skills add https://github.com/dchuk/source_monitor --skill rails-model-generator-dchuk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-model-generator
Source: https://github.com/dchuk/source_monitor/tree/main/.claude/skills/rails-model-generator
Command: npx skills add https://github.com/dchuk/source_monitor --skill rails-model-generator-dchuk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines the creation of Rails models using a test-first workflow, reducing manual setup and ensuring correctness from the start.

Core Features & Use Cases

  • TDD-driven model scaffolding: define requirements, write tests, create fixtures, generate migrations, implement models, and refactor.
  • Template-driven design: provides a structured template for attributes, associations, validations, scopes, and callbacks.
  • Guided workflow: step-by-step process from RED to GREEN with example fixtures and migrations to accelerate team onboarding.

Quick Start

Use the rails-model-generator skill to scaffold a new model by outlining requirements, creating initial tests, and running the guided TDD workflow to produce a working model.

Frequently Asked Questions about rails-model-generator

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

FAQPage Schema
How do I generate Rails models using a TDD workflow?

Rails model generation using a TDD workflow automates requirements templating, test creation, fixture setup, migration generation, and model implementation in a guided sequence to ensure correctness.

What is the best way to scaffold a Ruby on Rails model with tests first?

Scaffolding a Ruby on Rails model test-first involves a structured template for attributes, associations, and validations, guiding developers step-by-step from writing tests to implementing the final model.

How does test-driven development apply to Rails migrations and fixtures?

Test-driven development applies to Rails migrations and fixtures by requiring tests and fixture setups to be written before generating migrations and implementing model logic, ensuring a reproducible guided process.

Do I need to manually write migrations when using a Rails model generator?

Using a Rails model generator automates migration generation as part of an end-to-end sequence, meaning you do not need to manually write migrations after setting up your initial tests and fixtures.

Can I use a guided TDD workflow for Rails model associations and validations?

A guided TDD workflow for Rails supports model associations and validations by providing a template-driven design where you define requirements and iterate on tests until the model logic passes.

Why use a template-driven approach for Rails model scaffolding?

A template-driven approach for Rails model scaffolding reduces manual setup and accelerates team onboarding by providing a clear, reproducible sequence from defining requirements to refactoring the model.