rails-repository
CommunityEnforce Rails repositories with class-methods.
Software Engineering#rails#design-patterns#active-record#repository-pattern#class-methods#query-abstraction#rails-architecture
Authorsamrocks03
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Rails services often mix query logic in controllers and services. This skill enforces a dedicated repository layer that centralizes ActiveRecord queries in app/services/repositories as class methods, improving reuse and testability.
Core Features & Use Cases
- Centralized queries: All read operations live in repository classes, keeping controllers and services clean.
- Consistency & testability: Standardized method patterns (index, find_by_column, fetch_<entities>, search) improve reuse and testing.
- Use Case: When building a Rails API, create WidgetRepository in app/services/repositories and call WidgetRepository.find_by_uid(uid) from services.
Quick Start
Create repository classes under app/services/repositories/ and implement common queries as class methods.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: rails-repository Download link: https://github.com/samrocks03/shuttle-office-service/archive/main.zip#rails-repository Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.