Agent skill
Rails
Language: Ruby
Stars
10
Forks
1
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/rails
SKILL.md
Ruby on Rails Framework Rules
Language: Ruby
Version: Rails 7.0+
Setup & Configuration
ruby
# config/database.yml
production:
url: <%= ENV['DATABASE_URL'] %>
# config/environments/production.rb
config.force_ssl = true
config.log_level = :info
Quality Gates
bash
# Code quality
bundle exec rubocop # Lint
bundle exec brakeman # Security scan
# Tests
bundle exec rspec # Run tests
bundle exec rspec --format documentation # Verbose
# Type check (optional)
bundle exec steep check # Static typing
Best Practices
✅ DO:
- Use strong parameters
- Implement authentication (Devise/custom)
- Use ActiveRecord callbacks sparingly
- Write RSpec/Minitest tests
- Use database migrations
- Enable CSRF protection
❌ DON'T:
- Skip validations in models
- Use
paramswithout permit - Store secrets in code
- Skip database indexes
- Ignore N+1 queries
Project Structure
app/
├── controllers/
├── models/
├── views/
├── jobs/
└── mailers/
config/
db/
spec/
Didn't find tool you were looking for?