activestorage-uploads
CommunityRails Active Storage uploads done right, no AI blunders.
System Documentation
What problem does it solve?
AI coding agents generate broken Active Storage implementations for Rails file uploads by default, missing critical patterns like direct uploads, secure bucket configuration, background variant processing, and proper validation. This leads to blocked request threads, security vulnerabilities, oversized payloads, and non-conventional Rails code that deviates from senior developer best practices.
Core Features & Use Cases
- Direct Uploads: Skip the Rails server for byte payloads by uploading directly to S3/GCS, freeing up request workers and reducing memory usage for large files.
- Secure File Access: Enforce private storage buckets with short-TTL pre-signed URLs to prevent unauthorized permanent access to user-uploaded content.
- Performant Variants: Generate image variants using libvips (faster and lower-memory than ImageMagick) in background jobs instead of blocking request threads during first access.
- Upload Validation: Enforce content-type whitelists and size limits, with optional magic byte sniffing via Marcel to prevent malicious file uploads disguised as legitimate files.
- Use Case: For a Rails app with user avatar uploads, this skill ensures uploads don't slow down concurrent requests, thumbnails load instantly, and user files remain private by default.
Quick Start
Use the activestorage-uploads skill to set up secure, performant avatar uploads for your Rails User model with direct S3 uploads, 5MB size validation, and background-generated thumbnail variants.
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: activestorage-uploads Download link: https://github.com/sandeepmvl/rails-skills/archive/main.zip#activestorage-uploads 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 537,000+ vetted skills library on demand.