Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add sandeepmvl/rails-skills --skill 13-activestorage-uploadsgit clone --depth 1 https://github.com/sandeepmvl/rails-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sandeepmvl/rails-skills/13-activestorage-uploads)<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/13-activestorage-uploads"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/13-activestorage-uploads/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/13-activestorage-uploads"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/13-activestorage-uploads.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00152 | $0.03346 |
| Opus 5.5 | $0.00061 | $0.01338 |
| Sonnet 5.5 | $0.00030 | $0.00669 |
| Haiku 4.5 | $0.00015 | $0.00335 |
Grade A, and why
activestorage-uploads scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 362 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Active Storage Uploads
File uploads done right in Rails 8. AI agents generate the simplest possible
has_one_attached :avatarand call it a day — missing direct uploads (so the Rails server proxies every byte), variant generation (computed in the request thread), and pre-signed URL safety. This skill closes those gaps.
Why this matters
File uploads are an attack surface and a performance liability. The naïve "user posts the file, Rails saves it" pattern blocks request workers for the duration of the upload, eats RAM on multi-MB files, and gives attackers an easy way to upload malware or oversized payloads. Direct upload + signed URLs + variant generation in jobs fixes all three.
The opinion
Direct uploads to S3/GCS (Rails server never sees the byte payload). image_processing + libvips for variants (NOT imagemagick). Variants generated in background jobs, never in the request. Pre-signed URLs with short TTLs (5–15 min) for downloads. Private buckets by default. Validate content-type + size on the model. Never accept user-provided filenames as URLs.
Counter-positions:
- CarrierWave / Shrine — predate Active Storage. Still legitimate; Shrine especially has features Active Storage lacks (multi-step processing, plugins). Default to Active Storage; reach for Shrine if you need its specific features.
- Cloudinary / Imgix — managed image CDNs that handle variants for you. Worth it for image-heavy apps; over-investment for an avatar field.
Core patterns
Pattern 1: Direct upload to S3 (skip the Rails server)
Before (AI default — every byte through Rails):
class User < ApplicationRecord
has_one_attached :avatar
end
<%= form.file_field :avatar %>
User uploads 50MB → Rails server holds the whole thing in memory → forwards to S3. A worker is blocked for the upload duration. Memory spikes. Concurrent uploads OOM.
After (direct upload):
<%= form.file_field :avatar, direct_upload: true %>
Plus the JS:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · +1 lines fddae311a548
- 3mo ago First seen · 361 lines · 152 tokens per session scan A 53e3cfc069c8
activestorage-uploads is a skill published in the GitHub repository sandeepmvl/rails-skills (22 stars, last pushed 2mo ago), licensed MIT. It adds 152 tokens to every session and 3,346 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
activestorage-uploads compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| activestorage-uploadssandeepmvl/rails-skills | Skill | 22 | 2mo ago | MIT | A | 152 | Claude Code, Codex |
| alchemy-providerpingdotgg/t3code | Skill | 87k | today | MIT | A | 153 | Claude Code, Codex |
| stripe-projectsNousResearch/hermes-agent | Skill | 268k | today | MIT | A | 15 | Claude Code, Codex |
| django-storages-s3Jeffallan/claude-skills | Skill | 13k | 2d ago | MIT | A | 138 | Claude Code |
| websocket-engineerJeffallan/claude-skills | Skill | 13k | 2d ago | MIT | A | 36 | Claude Code |
| azure-eventhub-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 94 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 78 | Claude Code |