mcpField
R
ruby-rails-application

ruby-rails-application

github.com/aj-geddesDevelopment373657 installsUpdated 34w ago
Repository

About ruby-rails-application

A skill for building Ruby on Rails applications using Rails conventions. It is intended for developers working on models, RESTful controllers, authentication, database queries, middleware, and views.

Key features

  1. 01Rails project setup guidance
  2. 02Active Record models and associations
  3. 03RESTful controllers and actions
  4. 04Authentication and authorization patterns
  5. 05Queries, migrations, and serializers

Use cases

  1. 01Starting a Rails web application
  2. 02Modeling complex database relationships
  3. 03Creating RESTful endpoints
  4. 04Adding authentication to a Rails app

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill ruby-rails-application

After installing, type/ruby-rails-applicationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
active-record-queries.md
authentication-with-jwt.md
controllers-with-restful-actions.md
database-migrations.md
models-with-active-record.md
rails-project-setup.md
serializers.md
scripts/
validate-schema.sh
templates/
migration-template.sql

Details

From the project README

Ruby Rails Application

Table of Contents

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:

rails new myapp --api --database=postgresql
cd myapp
rails db:create

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Rails Project SetupRails Project Setup
Models with Active RecordModels with Active Record
Database MigrationsDatabase Migrations
Controllers with RESTful ActionsControllers with RESTful Actions
Authentication with JWTAuthentication with JWT
Active Record QueriesActive Record Queries
SerializersSerializers

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

Comments

Markdown supported