ruby-rails-application — Claude Code skill: what it does & setup
Guides building Ruby on Rails applications with Active Record models, RESTful controllers, and JWT authentication. Best for structuring Rails APIs and managing database schemas.
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a claude-codeWhat ruby-rails-application does
This skill enforces standard conventions for Ruby on Rails web applications. It guides the setup of API projects with PostgreSQL, Active Record association design, and database schema migrations.
Inside, referenced guides cover RESTful actions, serializers, and JWT authorization in ApplicationController. It explicitly prohibits putting business logic directly into controllers, directing you to use service objects instead.
Database security and query efficiency are central. The instructions block unparameterized raw SQL and require using includes or joins to prevent N+1 query bottlenecks.
What it helps with
- configure JWT authentication inside ApplicationController
- set up Active Record associations and database migrations
- resolve N+1 database queries using includes or joins
- scaffold RESTful API endpoints with serialized responses
Example prompts for the agent
- Generate a Rails API project with PostgreSQL and JWT authentication
- Create an Order model associated with User and add strong parameters
- Refactor this controller query using includes to avoid N+1 issues
How to install ruby-rails-application
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a claude-code2Manually: put the files in place
~/.claude/skills/ruby-rails-application/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ruby-rails-application/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a codex2Manually: put the files in place
.agents/skills/ruby-rails-application/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a cursor2Manually: put the files in place
.cursor/skills/ruby-rails-application/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts ruby-rails-application2Manually: put the files in place
.github/skills/ruby-rails-application/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/ruby-rails-applicationManually: put the files in place
.devin/skills/ruby-rails-application/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ruby-rails-application
How to install ruby-rails-application in Claude Code?
Run npx skills add aj-geddes/useful-ai-prompts --skill ruby-rails-application -a claude-code in your terminal.
What does ruby-rails-application do?
It provides architectural rules and reference guides for Ruby on Rails development. It instructs the assistant to handle Active Record models, migrations, strong parameters, and RESTful routing correctly.
How does this skill handle database performance and security?
It mandates input validation at the model level and parameterization for all SQL queries. To protect performance, it requires includes or joins to prevent N+1 query traps.
Source text
SKILL.md · MIT
--- name: ruby-rails-application description: > Develop Ruby on Rails applications with models, controllers, views, Active Record ORM, authentication, and RESTful routes. Use when building Rails applications, managing database relationships, and implementing MVC architecture. --- # Ruby Rails Application ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Build comprehensive Ruby on Rails applications with proper model associations, RESTful controllers, Active Record queries, authentication systems, middleware chains, and view rendering following Rails conventions. ## When to Use - Building Rails web applications - Implementing Active Record models with associations - Creating RESTful controllers and actions - Integrating authentication and authorization - Building complex database relationships - Implementing Rails middleware and filters ## Quick Start Minimal working example: ```bash rails new myapp --api --database=postgresql cd myapp rails db:create ``` ## Reference Guides Detailed implementations in the `references/` directory: | Guide | Contents | |---|---| | [Rails Project Setup](references/rails-project-setup.md) | Rails Project Setup | | [Models with Active Record](references/models-with-active-record.md) | Models with Active Record | | [Database Migrations](references/database-migrations.md) | Database Migrations | | [Controllers with RESTful Actions](references/controllers-with-restful-actions.md) | Controllers with RESTful Actions | | [Authentication with JWT](references/authentication-with-jwt.md) | Authentication with JWT | | [Active Record Queries](references/active-record-queries.md) | Active Record Queries | | [Serializers](references/serializers.md) | Serializers | ## Best Practices ### ✅ DO - Use conventions over configuration - Leverage Active Record associations - Implement proper scopes for queries - Use strong parameters for security - Implement authentication in ApplicationController - Use services for complex business logic - Implement proper error handling - Use database migrations for schema changes - Validate all inputs at model level - Use before_action filters appropriately ### ❌ DON'T - Use raw SQL without parameterization - Implement business logic in controllers - Trust user input without validation - Store secrets in code - Use select \* without specifying columns - Forget N+1 query problems (use includes/joins) - Implement authentication in each controller - Use global variables - Ignore database constraints
© aj-geddes · MIT · aj-geddes/useful-ai-prompts