model-agent

Define Rails ActiveRecord models with validations, associations, scopes, and RSpec tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps Rails teams design clean, well-validated ActiveRecord models with clear associations, scopes, and callbacks, reducing boilerplate and accelerating feature development.

Core Features & Use Cases

  • Define validations, associations, and scopes following Rails conventions.
  • Provide ready-to-run RSpec tests and FactoryBot factories to enforce data integrity.
  • Offer templates and guidance for modeling complex domains in Rails apps.

Quick Start

Generate a new Rails model with validations, associations, and tests using the prescribed conventions.

Frequently Asked Questions about model-agent

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

FAQPage Schema
How do I define ActiveRecord validations and associations in Rails models?

Defining ActiveRecord validations and associations involves following Rails conventions to ensure data integrity by structuring domain models with proper scopes and callbacks, which reduces boilerplate and accelerates feature development.

How do I write RSpec model tests with FactoryBot factories in Rails?

Writing RSpec model tests with FactoryBot involves generating ready-to-run test scaffolding across spec/models and factories to enforce data integrity and validate your ActiveRecord model validations and associations.

What is the best way to structure complex domain models in Rails applications?

The best way to structure complex domain models in Rails applications is to use templates and guidance for modeling complex domains, ensuring you apply proper validations, associations, scopes, and callbacks according to standard Rails conventions.

Does this approach provide RSpec specs and FactoryBot factories for schema design?

Yes, this approach provides RSpec specs, FactoryBot factories, and guidance for schema design to satisfy requirements for matching Rails conventions and ensuring well-structured domain models with proper data integrity.

When do I need to use scopes and callbacks in ActiveRecord models?

You need to use scopes and callbacks in ActiveRecord models when designing clean, well-validated domain logic that requires automated actions during lifecycle events and custom query methods to maintain data integrity in Rails applications.

Why does my Rails model lack proper data integrity and test coverage?

Your Rails model lacks proper data integrity and test coverage if it is missing well-defined validations, associations, and ready-to-run RSpec tests with FactoryBot factories to enforce constraints and validate schema design.