rails-corelisted
Install: claude install-skill mickzijdel/rails-toolkit
# Rails Core Gotchas
The entry-point skill for Rails work in this environment. These are personal, hard-won rules that override generic Rails habits. Read this first, then pull in the specific `rails-toolkit:rails-*` skill for the area you're touching.
## The Rules
### 1. Fixtures — never mutate, only add
Do **not** modify existing fixtures or add new relationships to them — that silently breaks other tests. If no existing fixture fits what you're testing, create a **new** one. See [[rails-testing]] for fixture patterns and deterministic UUIDs.
### 2. Stimulus LSP is stale until restart
After you add or rename a Stimulus controller, the Stimulus LSP does not refresh until a restart, so it may report a controller as "not a valid Stimulus controller" even though it exists. **Ignore these false errors** — don't chase them. See [[rails-stimulus]].
### 3. Validate on the server, not in JavaScript
Always prefer server-side validation with Hotwire and Turbo over client-side JavaScript validation. Let the model be the source of truth and re-render with Turbo. See [[rails-turbo]] and [[rails-models]].
### 4. Read the docs for new gems
When a newly-added gem or package is involved, read its actual API/docs rather than relying on memory — APIs drift between versions.
### 5. Migrations on populated tables are multi-step
For tables that already have rows, **never** add a non-nullable or unique column in a single migration. Use the multi-step pattern:
1. Add the column as **nullable