rails-model-generator — community rails-model-generator, EI_PointOfSale, community, ide skills

v1.0.0

이 스킬 정보

자동 모델 생성 및 TDD 접근 방식이 필요한 Ruby on Rails 에이전트에 적합 Creates Rails models using TDD approach - spec first, then migration, then model. Use when creating new models, adding model validations, defining associations, or setting up database tables.

calmacleod calmacleod
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
7/11
Quality Score
30
Canonical Locale
en
Detected Body Locale
en

자동 모델 생성 및 TDD 접근 방식이 필요한 Ruby on Rails 에이전트에 적합 Creates Rails models using TDD approach - spec first, then migration, then model. Use when creating new models, adding model validations, defining associations, or setting up database tables.

이 스킬을 사용하는 이유

에이전트가 Test-Driven Development를 사용하여 Rails 모델을 생성할 수 있는 기능을 제공합니다. 모델 사양 생성, 마이그레이션 생성 및 테스트 데이터의 팩토리 구현을 포함하며, RED-GREEN-REFACTOR 워크플로우를 따르며 연관성 및 유효성 검사를 포함

최적의 용도

자동 모델 생성 및 TDD 접근 방식이 필요한 Ruby on Rails 에이전트에 적합

실행 가능한 사용 사례 for rails-model-generator

사전 정의된 속성 및 유효성 검사를 사용하여 모델을 자동으로 생성
데이터베이스 스키마 업데이트를 위한 마이그레이션 파일 생성
TDD 접근 방식을 사용하여 예상 동작에 대한 모델 사양 구현

! 보안 및 제한 사항

  • Ruby on Rails 환경이 필요
  • 모델 생성만 가능하며, 복잡한 비즈니스 로직은 처리하지 않음

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is rails-model-generator?

자동 모델 생성 및 TDD 접근 방식이 필요한 Ruby on Rails 에이전트에 적합 Creates Rails models using TDD approach - spec first, then migration, then model. Use when creating new models, adding model validations, defining associations, or setting up database tables.

How do I install rails-model-generator?

Run the command: npx killer-skills add calmacleod/EI_PointOfSale. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for rails-model-generator?

Key use cases include: 사전 정의된 속성 및 유효성 검사를 사용하여 모델을 자동으로 생성, 데이터베이스 스키마 업데이트를 위한 마이그레이션 파일 생성, TDD 접근 방식을 사용하여 예상 동작에 대한 모델 사양 구현.

Which IDEs are compatible with rails-model-generator?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for rails-model-generator?

Ruby on Rails 환경이 필요. 모델 생성만 가능하며, 복잡한 비즈니스 로직은 처리하지 않음.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add calmacleod/EI_PointOfSale. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use rails-model-generator immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

rails-model-generator

Install rails-model-generator, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Rails Model Generator (TDD Approach)

Overview

This skill creates models the TDD way:

  1. Define requirements (attributes, validations, associations)
  2. Write model spec with expected behavior (RED)
  3. Create factory for test data
  4. Generate migration
  5. Implement model to pass specs (GREEN)
  6. Refactor if needed

Workflow Checklist

Model Creation Progress:
- [ ] Step 1: Define requirements (attributes, validations, associations)
- [ ] Step 2: Create model spec (RED)
- [ ] Step 3: Create factory
- [ ] Step 4: Run spec (should fail - no model/table)
- [ ] Step 5: Generate migration
- [ ] Step 6: Run migration
- [ ] Step 7: Create model file (empty)
- [ ] Step 8: Run spec (should fail - no validations)
- [ ] Step 9: Add validations and associations
- [ ] Step 10: Run spec (GREEN)

Step 1: Requirements Template

Before writing code, define the model:

markdown
1## Model: [ModelName] 2 3### Table: [table_name] 4 5### Attributes 6| Name | Type | Constraints | Default | 7|------|------|-------------|---------| 8| name | string | required, unique | - | 9| email | string | required, unique, email format | - | 10| status | integer | enum | 0 (pending) | 11| organization_id | bigint | foreign key | - | 12 13### Associations 14- belongs_to :organization 15- has_many :posts, dependent: :destroy 16- has_one :profile, dependent: :destroy 17 18### Validations 19- name: presence, uniqueness, length(max: 100) 20- email: presence, uniqueness, format(email) 21- status: inclusion in enum values 22 23### Scopes 24- active: status = active 25- recent: ordered by created_at desc 26- by_organization(org): where organization_id = org.id 27 28### Instance Methods 29- full_name: combines first_name and last_name 30- active?: checks if status is active 31 32### Callbacks 33- before_save :normalize_email 34- after_create :send_welcome_email

Step 2: Create Model Spec

Location: spec/models/[model_name]_spec.rb

ruby
1# frozen_string_literal: true 2 3require 'rails_helper' 4 5RSpec.describe ModelName, type: :model do 6 subject { build(:model_name) } 7 8 # === Associations === 9 describe 'associations' do 10 it { is_expected.to belong_to(:organization) } 11 it { is_expected.to have_many(:posts).dependent(:destroy) } 12 end 13 14 # === Validations === 15 describe 'validations' do 16 it { is_expected.to validate_presence_of(:name) } 17 it { is_expected.to validate_uniqueness_of(:email).case_insensitive } 18 it { is_expected.to validate_length_of(:name).is_at_most(100) } 19 end 20 21 # === Scopes === 22 describe '.active' do 23 let!(:active_record) { create(:model_name, status: :active) } 24 let!(:inactive_record) { create(:model_name, status: :inactive) } 25 26 it 'returns only active records' do 27 expect(described_class.active).to include(active_record) 28 expect(described_class.active).not_to include(inactive_record) 29 end 30 end 31 32 # === Instance Methods === 33 describe '#full_name' do 34 subject { build(:model_name, first_name: 'John', last_name: 'Doe') } 35 36 it 'returns combined name' do 37 expect(subject.full_name).to eq('John Doe') 38 end 39 end 40end

See templates/model_spec.erb for full template.

Step 3: Create Factory

Location: spec/factories/[model_name_plural].rb

ruby
1# frozen_string_literal: true 2 3FactoryBot.define do 4 factory :model_name do 5 sequence(:name) { |n| "Name #{n}" } 6 sequence(:email) { |n| "user#{n}@example.com" } 7 status { :pending } 8 association :organization 9 10 trait :active do 11 status { :active } 12 end 13 14 trait :with_posts do 15 after(:create) do |record| 16 create_list(:post, 3, model_name: record) 17 end 18 end 19 end 20end

See templates/factory.erb for full template.

Step 4: Run Spec (Verify RED)

bash
1bundle exec rspec spec/models/model_name_spec.rb

Expected: Failure because model/table doesn't exist.

Step 5: Generate Migration

bash
1bin/rails generate migration CreateModelNames \ 2 name:string \ 3 email:string:uniq \ 4 status:integer \ 5 organization:references

Review the generated migration and add:

  • Null constraints: null: false
  • Defaults: default: 0
  • Indexes: add_index :table, :column
ruby
1# db/migrate/YYYYMMDDHHMMSS_create_model_names.rb 2class CreateModelNames < ActiveRecord::Migration[8.0] 3 def change 4 create_table :model_names do |t| 5 t.string :name, null: false 6 t.string :email, null: false 7 t.integer :status, null: false, default: 0 8 t.references :organization, null: false, foreign_key: true 9 10 t.timestamps 11 end 12 13 add_index :model_names, :email, unique: true 14 add_index :model_names, :status 15 end 16end

Step 6: Run Migration

bash
1bin/rails db:migrate

Verify with:

bash
1bin/rails db:migrate:status

Step 7: Create Model File

Location: app/models/[model_name].rb

ruby
1# frozen_string_literal: true 2 3class ModelName < ApplicationRecord 4end

Step 8: Run Spec (Still RED)

bash
1bundle exec rspec spec/models/model_name_spec.rb

Expected: Failures for missing validations/associations.

Step 9: Add Validations & Associations

ruby
1# frozen_string_literal: true 2 3class ModelName < ApplicationRecord 4 # === Associations === 5 belongs_to :organization 6 has_many :posts, dependent: :destroy 7 8 # === Enums === 9 enum :status, { pending: 0, active: 1, suspended: 2 } 10 11 # === Validations === 12 validates :name, presence: true, 13 uniqueness: true, 14 length: { maximum: 100 } 15 validates :email, presence: true, 16 uniqueness: { case_sensitive: false }, 17 format: { with: URI::MailTo::EMAIL_REGEXP } 18 19 # === Scopes === 20 scope :active, -> { where(status: :active) } 21 scope :recent, -> { order(created_at: :desc) } 22 23 # === Instance Methods === 24 def full_name 25 "#{first_name} #{last_name}".strip 26 end 27end

Step 10: Run Spec (GREEN)

bash
1bundle exec rspec spec/models/model_name_spec.rb

All specs should pass.

References

Common Patterns

Enum with Validation

ruby
1enum :status, { draft: 0, published: 1, archived: 2 } 2validates :status, inclusion: { in: statuses.keys }

Polymorphic Association

ruby
1belongs_to :commentable, polymorphic: true

Counter Cache

ruby
1belongs_to :organization, counter_cache: true 2# Add: organization.posts_count column

Soft Delete

ruby
1scope :active, -> { where(deleted_at: nil) } 2scope :deleted, -> { where.not(deleted_at: nil) } 3 4def soft_delete 5 update(deleted_at: Time.current) 6end

관련 스킬

Looking for an alternative to rails-model-generator or another community skill for your workflow? Explore these related open-source skills.

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
인공지능

widget-generator

Logo of f
f

prompts.chat 피드 시스템을 위한 사용자 지정 가능한 위젯 플러그인을 생성합니다

149.6k
0
인공지능

flags

Logo of vercel
vercel

리액트 프레임워크

138.4k
0
브라우저

pr-review

Logo of pytorch
pytorch

파이썬에서 텐서와 동적 신경망 구현 및 강력한 GPU 가속 지원

98.6k
0
개발자