Rails-specific skills, agents, and dev docs that make Claude Code a Rails expert.
Transforms Claude Code into a Rails-native development partner with:
- Rails-Specific Skills: MVC patterns, ActiveRecord, testing, security, Hotwire
- Specialized Agents: Code review, refactoring, test debugging
- Persistent Dev Docs: Documentation that survives context resets
- Smart Patterns: Service objects, query objects, N+1 detection, and more
Instead of generic AI advice, you get Rails best practices automatically.
💙 This infrastructure entirely is inspired by and adapted from: diet103/claude-code-infrastructure-showcase
Thank you to diet103 for pioneering this approach!
# Copy to your Rails project
cd your-rails-app
git clone https://github.com/YOUR_USERNAME/rails-claude-infrastructure.git temp
cp -r temp/.claude .
# Make hooks executable
chmod +x .claude/hooks/*.sh .claude/hooks/*.js## Skills Available
Use these skills for context-specific guidance:
- `/skill rails-dev-guidelines` - Models, controllers, services
- `/skill rspec-testing-guidelines` - Testing patterns
See `.claude/README.md` for details.# Activate a skill before working
/skill rails-dev-guidelines
# Then ask Claude anything
Create a User model with validations and associationsThat's it! Claude now follows Rails best practices.
| Skill | Use For |
|---|---|
rails-dev-guidelines |
Models, controllers, services, queries |
rspec-testing-guidelines |
Tests, factories, mocking, coverage |
Each skill includes:
- Quick reference guide
- Code examples (❌ wrong vs ✅ right)
- Detailed resource files
- Anti-patterns to avoid
Rails Code Reviewer
# Reviews your code against Rails best practices
"Review the code I just wrote"Refactoring Planner
# Plans safe, incremental refactoring
"This controller is too fat, help refactor it"RSpec Test Fixer
# Debugs and fixes failing tests
"I have failing specs, help me fix them"# 1. Create directory
mkdir -p .claude/skills/my-skill/resources
# 2. Create SKILL.md
cat > .claude/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: My team's patterns
---
# My Skill
## When to Use
[Your scenarios]
## Core Patterns
[Your patterns with examples]
EOF
# 3. Add to skill-rules.json
# Edit .claude/skills/skill-rules.jsonContributions welcome! To contribute:
- Fork the repository
- Create your feature branch
- Test thoroughly
- Submit a pull request
MIT License - Free for personal and commercial use.
See LICENSE file for details.
- Issues: Open a GitHub issue
- Discussions: Use GitHub Discussions
- Documentation: See
.claude/README.mdfor detailed docs
Built for the Rails community | Star if useful! ⭐
