{"skill":{"slug":"rails","displayName":"Rails","summary":"Build Rails applications with proper conventions, performance patterns, and security practices.","description":"---\nname: Rails\nslug: rails\nversion: 1.0.1\ndescription: Build reliable Rails apps avoiding ActiveRecord traps, N+1 queries, and callback pitfalls.\nmetadata: {\"clawdbot\":{\"emoji\":\"🛤️\",\"requires\":{\"bins\":[\"rails\"]},\"os\":[\"linux\",\"darwin\",\"win32\"]}}\n---\n\n## Quick Reference\n\n| Topic | File |\n|-------|------|\n| N+1, callbacks, validations, scopes | `activerecord.md` |\n| Strong params, filters, render | `controllers.md` |\n| Route conflicts, constraints | `routing.md` |\n| Partials, helpers, caching, XSS | `views.md` |\n| ActiveJob, Sidekiq, retries | `jobs.md` |\n| Mass assignment, CSRF, SQL injection | `security.md` |\n\n## Critical Rules\n\n- `save` returns false on failure — `save!` raises, check return or use bang\n- `update_all`/`delete_all` skip callbacks and validations — data corruption if unaware\n- `find_each` for batches — `Model.all.each` loads entire table into memory\n- `redirect_to` doesn't halt execution — code after it runs, use `and return`\n- `dependent: :destroy` missing — orphan records accumulate forever\n- `default_scope` pollutes all queries including joins — almost always wrong\n- Callbacks chain silently — `throw :abort` stops save but returns false, not exception\n- `includes` without `references` in `where` string — N+1 still happens\n- `||=` memoization caches nil/false — use `defined?(@var) ? @var : @var = compute`\n- `has_many through:` vs `has_and_belongs_to_many` — latter has no join model for attrs\n- Nested `before_action` — multiple inheritance makes flow unreadable\n- `render` doesn't stop action — code continues, duplicate render crashes\n","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":1265,"installsAllTime":48,"installsCurrent":1,"stars":2,"versions":2},"createdAt":1770744649900,"updatedAt":1778486991803},"latestVersion":{"version":"1.0.1","createdAt":1771104773468,"changelog":"Initial release","license":null},"metadata":{"setup":[],"os":["linux","darwin","win32"],"systems":null},"owner":{"handle":"ivangdavila","userId":"s178jdk12x4qj3gs2se3etxf3h83h7ft","displayName":"Iván","image":"https://avatars.githubusercontent.com/u/81719670?v=4"},"moderation":null}