active-storage
Installation
SKILL.md
Rails Active Storage Expert
Implement file uploads, attachments, image processing, and cloud storage in Rails applications using Active Storage.
Philosophy
Core Principles:
- Always run the install generator — Active Storage needs its migrations and config
- Use libvips over ImageMagick — 10x faster, 1/10 memory usage
- Prevent N+1 queries — Always use
with_attached_<name>scopes - Handle missing attachments — Never assume an attachment exists
- Proxy in production, redirect in development — Proxy mode works with CDNs
- Use named variants — Define variants on the model, not in views