rails-scaffold

Scaffold a complete Rails API resource across migrations, models, services, serializers, controllers, and routes.

Updated Oct 12, 2024
One-click install
npx skills add https://github.com/samrocks03/shuttle-office-service --skill rails-scaffold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-scaffold
Source: https://github.com/samrocks03/shuttle-office-service/tree/main/.claude/skills/rails-scaffold
Command: npx skills add https://github.com/samrocks03/shuttle-office-service --skill rails-scaffold

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold a complete Rails API resource end-to-end, generating migration, model, repository, services (Index/Show/Create/Update/Destroy), serializer, controller, routes, locale keys, and factory to standardize architecture and accelerate feature delivery.

Core Features & Use Cases

  • End-to-end resource scaffolding across all layers using established conventions (migration, model, repository, services, serializer, controller, routes, locales, and factory)
  • Reuses detailed conventions via individual sub-skills (rails-migration, rails-model, rails-repository, rails-service, rails-serializer, rails-controller, rails-routes, rails-locale, rails-test)
  • Enforces consistent project structure and naming, reducing boilerplate and onboarding time

Quick Start

Scaffold a new Rails resource named Widget to generate all layers and tests.

Frequently Asked Questions about rails-scaffold

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a complete Rails API resource end-to-end?

Scaffolding a complete Rails API resource end-to-end involves generating migrations, models, repositories, services, serializers, controllers, and routes automatically. This tool orchestrates those layers to standardize architecture and accelerate feature delivery.

What is included in an API-first Rails resource scaffold?

An API-first Rails resource scaffold includes migrations, models, repositories, index/show/create/update/destroy services, serializers, controllers, routes, locale keys, and tests to ensure full structural consistency.

How do I generate Rails services and repositories for a new resource?

Generating Rails services and repositories for a new resource is handled by delegating to dedicated sub-skills for each architectural layer, ensuring consistent naming conventions and test readiness across the entire stack.

Does this Rails scaffold generate tests and factories for new models?

Yes, this Rails scaffold generates tests and factories for new models. It implements a standardized multi-layer scaffold that includes test readiness and factory generation alongside controllers, services, and serializers.

Can I use this scaffold for an API-only Rails project?

Yes, you can use this scaffold for an API-only Rails project. It is specifically designed for API-first Rails projects needing a complete resource with standardized architecture across all application layers.

What's the best way to standardize Rails API architecture across multiple resources?

The best way to standardize Rails API architecture across multiple resources is using an end-to-end scaffold that enforces consistent structure, naming conventions, and dedicated layers like repositories and services for every new resource.