0votes
CLAUDE.md template for a Ruby on Rails app
TemplateLow riskProject memory for Claude Code in a Rails codebase: commands, structure and Rails-specific rules.
# CLAUDE.md ## Project {{project_name}}: {{what_it_does}}. Stack: Ruby {{ruby_version}}, Rails {{rails_version}}, {{database}}, {{frontend}}. ## Commands - Run locally: `bin/dev` - Tests: `bin/rails test (or bundle exec rspec)` - Lint/format: `bundle exec rubocop` ## Where things live - `app/models`, `app/controllers`, `app/views`: standard Rails - `app/services`: multi-step business logic - `app/jobs`: background work ({{job_backend}}) - `db/migrate`: one migration per change ## Conventions - Fat models are fine; fat controllers are not. Move logic out of controllers. - Strong parameters on every create/update. - Avoid N+1 queries: use `includes` and check the log. - Prefer Rails conventions over custom patterns. ## Never - Commit secrets or `.env` files; refer to them by name only. - Run migrations or scripts against production. - Skip or delete a failing test to make the suite pass. ## Done means Tests and linters pass, you ran the change for real, and your summary lists what changed and what you didn't verify.

Log in to join the discussion.