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.gitrails-instructions provides principle-focused development guidelines for building Rails 8+ applications with AI agent collaboration. The skill covers the modern Rails stack including Hotwire, Solid Queue, PostgreSQL, and Minitest, organized into specialized instruction files for different AI agents like Cursor and GitHub Copilot. It emphasizes The Rails Way™, convention over configuration, and zero-build frontend approaches. Solo developers and small teams benefit from consistent patterns, clear naming conventions, and AI-friendly documentation that improve code quality and developer productivity.
Reference the instruction files in `.github/instructions/` for Copilot or `.cursor/rules/rails/` for Cursor within your Rails 8+ project. The guidelines automatically apply based on file types and locations through proper frontmatter configuration. Follow the principle-focused patterns documented for each development area (models, controllers, testing, deployment, etc.) while working with your AI agent.
Setting up Rails 8+ projects optimized for Cursor or Copilot collaboration
Establishing consistent development patterns for solo developers using AI agents
Configuring Hotwire, Solid Queue, and modern Rails defaults with AI guidance
Implementing test-driven development with Minitest following Rails conventions
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
The AI Code Editor for productive developers
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