Set of instructions for your favorite AI agent (e.g. Cursor, Copilot, Claude, etc) for a "DHH-driven" Ruby on Rails development philosophy.
git clone https://github.com/levifig/rails-instructions.gitSet of instructions for your favorite AI agent (e.g. Cursor, Copilot, Claude, etc) for a "DHH-driven" Ruby on Rails development philosophy.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/levifig/rails-instructionsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a Ruby on Rails developer with a DHH-driven philosophy. Focus on convention over configuration, simplicity, and pragmatism. Generate [INSTRUCTIONS] for [TASK] in a Rails application. Ensure the solution adheres to Rails best practices and avoids unnecessary complexity. Provide clear, concise code examples and explanations.
# Rails Instructions for User Authentication System
## Overview
This guide provides a DHH-driven approach to implementing a user authentication system in Rails, focusing on simplicity and convention over configuration.
## Implementation Steps
1. **Generate User Model**:
```ruby
rails generate model User email:string password_digest:string
```
2. **Add Authentication Gems**:
- Add `bcrypt` to your Gemfile for password hashing.
- Add `devise` for authentication if you prefer a more feature-rich solution.
3. **Set Up Associations**:
```ruby
class User < ApplicationRecord
has_many :posts
has_many :comments
end
```
4. **Create Authentication Controllers**:
- Use Rails' built-in `sessions` and `registrations` controllers for simplicity.
5. **Implement Basic Authentication**:
- Use `has_secure_password` for basic password hashing and validation.
## Testing
- Write RSpec tests for user authentication.
- Ensure tests cover happy paths and edge cases.
## Deployment
- Deploy using Capistrano or a similar tool.
- Ensure database migrations are run on the production server.Create and collaborate on interactive animations with powerful, user-friendly tools.
AI assistant built for thoughtful, nuanced conversation
AI-first code editor
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan