model

Create Rails ActiveRecord models with migrations and FactoryBot factories via TDD.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill model-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model
Source: https://github.com/reckerswartz/resume_builder/tree/main/.devin/skills/model
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill model-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rails model scaffolding and test scaffolding can be repetitive; this Skill guides a TDD-first approach to create ActiveRecord models, migrations, and factories consistently.

Core Features & Use Cases

  • Spec-first model creation supporting validations, associations, and scopes
  • Automated migration scaffolding and factory integration with FactoryBot
  • End-to-end TDD workflow guidance from spec to implementation

Quick Start

Create a new Rails model named User with attributes such as name:string and status:integer to start the TDD-driven workflow.

Frequently Asked Questions about model

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

FAQPage Schema
How do I create Rails models using a TDD workflow with RSpec?

The spec-first approach to Rails model creation starts by defining RSpec tests for attributes, validations, and associations before implementation. It guides developers through writing the spec, generating the migration, and implementing the model to pass tests.

Can I generate FactoryBot factories and migrations automatically with my Rails models?

You can generate FactoryBot factories and automated migration scaffolding alongside your Rails models. This ensures your factory integration and database schema are defined consistently within your test-driven development cycle.

Does this TDD model scaffolding support ActiveRecord validations, associations, and scopes?

This TDD model scaffolding supports defining ActiveRecord validations, associations, scopes, and enums. It provides end-to-end test scaffolding to ensure these model attributes behave correctly before implementation.

What's the best way to scaffold a Rails model with attributes using a spec-first approach?

The best way to scaffold a Rails model spec-first is to define attributes like name:string and status:integer in your RSpec test, then generate the model, migration, and factory. This ensures all generated code satisfies the defined requirements.

Why should I use a spec-first approach for Rails model generation instead of standard scaffolding?

Using a spec-first approach for Rails model generation prevents repetitive scaffolding by ensuring validations and associations are test-backed from the start. It standardizes FactoryBot integration and migration creation through a guided TDD workflow.