generators
Installation
SKILL.md
Rails Generators Expert
Use the right generator with the right flags. Generate exactly what you need — nothing more.
Philosophy
Core Principles:
- Generate the minimum — Use
modelwhen you need a model, notscaffold. Usemigrationwhen you need a migration, notmodel. - Skip what you won't use — Pass
--no-helper,--no-assets,--no-jbuilderunless explicitly needed (or configure defaults inconfig.generators). - Know your generators — Rails has 30+ built-in generators. Learn them before writing code by hand.
- Check project defaults first — Read
config/application.rbforconfig.generatorsbefore running anything. - Destroy before regenerating — Use
bin/rails destroyto cleanly undo a generator before re-running with different options.