···11+---
22+description: Create a new boxcar module/template
33+argument-hint: <module-name>
44+---
55+66+Create a new boxcar module called `$ARGUMENTS.rb` in this Rails template project.
77+88+## Context
99+- This is a Rails application template project (used with `rails new myapp -m template.rb`)
1010+- Modules are Ruby files that get applied via `apply_template('$ARGUMENTS')` in `template.rb`
1111+- Each module should be self-contained and handle one feature/concern
1212+1313+## Module Structure
1414+Follow the existing patterns in this project. A module should:
1515+1616+1. Start with `# frozen_string_literal: true`
1717+2. Use `say` with colors for user feedback:
1818+ - `:green` for main section headers
1919+ - `:cyan` for sub-steps
2020+ - `:yellow` for warnings
2121+ - `:red` for errors
2222+3. Use Rails template methods like:
2323+ - `gem 'name'` - add gems
2424+ - `generate :model, 'Name field:type'` - run generators
2525+ - `file 'path', <<~RUBY ... RUBY` - create files
2626+ - `inject_into_file`, `gsub_file` - modify files
2727+ - `route` - add routes
2828+ - `after_bundle do ... end` - run code after bundle install
2929+3030+## Reference Files
3131+Look at these existing modules for patterns:
3232+- @auth.rb - authentication module
3333+- @public_identifiable.rb - public IDs module
3434+- @tailwind.rb - Tailwind CSS module
3535+- @template.rb - main template entry point
3636+3737+## Task
3838+1. Ask what the module should do if not clear from the name
3939+2. Create the module file `$ARGUMENTS.rb`
4040+3. Show how to add it to `template.rb` using `apply_template('$ARGUMENTS')`