Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

ruby-rails

/ruby-rails

Opisuje konwencje budowy aplikacji w Ruby on Rails: generatory, modele ActiveRecord i migracje, Hotwire, Turbo i Stimulus, zadania w tle, cache oraz testy w RSpec i Minitest.

Repozytorium
skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
08.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Opisuje konwencje budowy aplikacji w Ruby on Rails: generatory, modele ActiveRecord i migracje, Hotwire, Turbo i Stimulus, zadania w tle, cache oraz testy w RSpec i Minitest.

Oryginalny opis (EN)

Conventions and best practices for building web applications with Ruby on Rails. Use when scaffolding Rails apps or generators, designing ActiveRecord models and migrations, wiring up Hotwire/Turbo/Stimulus interactivity, setting up background jobs or caching, or writing RSpec/Minitest coverage for Rails code.

Jak działa

  1. Core Principles
  2. Naming Conventions
  3. Architecture & Performance
  4. Rails 8 Defaults
  5. Frontend & UI
  6. Security
  7. Testing
  8. Best Practices
Sekcje z nagłówków SKILL.md, w oryginale · 72 linii, 521 słów
Podgląd SKILL.md
---
name: ruby-rails
description: "Conventions and best practices for building web applications with Ruby on Rails. Use when scaffolding Rails apps or generators, designing ActiveRecord models and migrations, wiring up Hotwire/Turbo/Stimulus interactivity, setting up background jobs or caching, or writing RSpec/Minitest coverage for Rails code."
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Ruby on Rails

This skill covers Ruby and Ruby on Rails development, including Rails conventions, ActiveRecord patterns, frontend integration, security, and testing.

## Core Principles

- Write concise, idiomatic Ruby code with accurate examples
- Adhere to Rails conventions (Convention over Configuration)
- Follow the Ruby Style Guide for formatting consistency
- Leverage Ruby 3.x features like pattern matching and endless methods
- Prefer Rails command-line generators (`bin/rails generate ...`) over hand-written boilerplate — they keep files consistent with framework conventions and wire up tests/routes automatically
- Use `bin/dev` to run the local development server (it boots the web process plus any configured watchers) and check logs after significant changes

## Naming Conventions

- Use snake_case for files, methods, and variables
- Use CamelCase for classes and modules
- Follow Rails naming conventions for models, controllers, views

## Architecture & Performance

- Utilize ActiveRecord for database operations with proper indexing
- Use PostgreSQL in production, with proper indexes, connection pooling, and safe/reversible migrations
- Implement eager loading to prevent N+1 query problems
- Apply fragment caching and Russian Doll caching strategies
- Use service objects for complex business logic
- Follow MVC architecture strictly
- Keep controllers RESTful and focused

## Rails 8 Defaults

Rails 8 ships with a "no PaaS needed" stack — favor these built-ins over adding external services unless there's a specific reason not to:

- **Solid Queue** — database-backed ActiveJob adapter; use it as the default background job backend instead of standing up Redis/Sidekiq unless job volume or feature needs (e.g., Sidekiq Pro batches) require it
- **Solid Cache** — database-backed cache store; a reasonable default for Rails.cache without a separate Redis/Memcached deployment
- **Solid Cable** — database-backed Action Cable adapter for WebSockets without Redis
- **Propshaft** — the default asset pipeline; simpler than Sprockets, just serves fingerprinted files without a bundling step
- **Kamal** — the default deployment tool for shipping containerized Rails apps to your own servers

## Frontend & UI

- Employ Hotwire (Turbo and Stimulus) for standard Rails interactivity and dynamic interactions without full page reloads
- Reach for a Vite-managed JS pipeline (e.g., vite_rails) only when you actually need npm-managed JavaScript (React/Vue components, complex bundling) — don't add it by default
- Design responsively with Tailwind CSS
- Maintain DRY views through helpers and partials
- Use ViewComponents for reusable UI components

## Security

- Implement authentication/authorization via Devise or Pundit
- Use strong parameters in controllers to prevent mass assignment vulnerabilities
- Sanitize user inputs appropriately
- Use CSRF protection tokens
- Implement proper session management

## Testing

- Write comprehensive Minitest or RSpec coverage for models, controllers, and integration flows, following TDD practices
- Use FactoryBot for test data generation rather than fixtures
- Mock external services; stub predefined return values
- Use shared examples for common behaviors across different contexts
- Ensure each test is independent; avoid shared state between tests

## Best Practices

- Keep controllers thin, models fat (but not too fat)
- Use concerns for shared functionality
- Implement background jobs with Sidekiq or ActiveJob
- Use proper database migrations
- Follow RESTful routing conventions

Wersje

RepozytoriumWynikLicencja
Ta strona · Mindrally/skills100Apache-2.0
j4flmao/agent-skills90MIT

Migawka bazy z 13.11.2026 · wersja paczki 03f8185ee7fc (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100rails
    Pomaga w pracy nad aplikacją Rails: modele, kontrolery, widoki, migracje, asocjacje ActiveRecord, Hotwire, Active Job i testy, w tym problemy N+1 i bezpieczne migracje na żywych tabelach.
  • 100rails-dev
    Podpowiada wzorce wydajności i utrzymywalności w Ruby on Rails dla kontrolerów, zapytań ActiveRecord, cache, widoków, API, bezpieczeństwa i zadań w tle.
  • 100rails-idioms
    Stosuje wzorce Ruby on Rails: scope'y ActiveRecord, zapobieganie N+1, walidacje, routing RESTful oraz testy w RSpec i Minitest, przy budowie i audycie aplikacji.
  • 100rails
    Wspiera tworzenie aplikacji Ruby on Rails: ActiveRecord, architektura MVC, migracje, zadania w tle z Sidekiq lub SolidQueue oraz Hotwire.
  • 100rails-conventions
    Prowadzi implementację i przegląd produkcyjnych aplikacji Ruby on Rails 8: modele, kontrolery, trasy, Hotwire, joby, API, wydajność, bezpieczeństwo i testy.
  • 95rails-hotwire
    Pomaga budować reaktywne aplikacje Rails z Hotwire (Turbo i Stimulus), bez rozbudowanych frameworków JavaScript.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.