Agent skill

Active Storage Setup

by ThibautBaissac in ThibautBaissac/rails_ai_agents

Configures Active Storage for file uploads with variants and direct uploads.

MITAuto-check passedBackend & APIs

Install Active Storage Setup

skills CLI
$ npx skills add ThibautBaissac/rails_ai_agents --skill active-storage-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ThibautBaissac/rails_ai_agents active-storage-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/active-storage-setup .claude/skills/active-storage-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
active-storage-setup
GitHub stars
665
Token cost
~1.2k tokens
SKILL.md length
235 words
Files
5 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Configures Active Storage for file uploads with variants and direct uploads.

  • Adding file uploads
  • SKILL.md covers Overview, Quick Start, Configuration and Model Attachments, plus 7 more sections
  • Calls rails and bundle
  • Image attachments

What it does

Active Storage Setup is an agent skill from ThibautBaissac/rails_ai_agents. Configures Active Storage for file uploads with variants and direct uploads. Use when adding file uploads, image attachments, document storage, generating thumbnails, or when user mentions Active Storage, file upload, attachments, or image processing. WHEN NOT: Storing data in database columns, external URL references, static assets in the asset pipeline, or simple text/JSON storage.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/controller-and-service.md`, `references/testing.md` and `references/validations.md`).

It sits in Backend & APIs, covering File uploads and storage and Game assets and audio. The repository describes itself as: Specialized AI skills, agents, rules and hooks for modern Rails AI driven-development + Spec-Driven-Development kit + MCP. The licence is MIT.

When your agent uses it

  • Adding file uploads
  • Image attachments
  • Document storage
  • Generating thumbnails

Example prompts

  • “Use the active-storage-setup skill to configure Active Storage for file uploads with variants and direct uploads”
  • “/active-storage-setup”

What it can do on your machine

Read from SKILL.md and the folder at commit 03622f2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rails
    • bundle

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Active Storage Setup loads about 1.2k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 235 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ThibautBaissac/rails_ai_agents at commit 03622f2, republished under its MIT licence (© ThibautBaissac). 235 words, ~1,158 tokens.

Download SKILL.mdSave it as .claude/skills/active-storage-setup/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
active-storage-setup
description
Configures Active Storage for file uploads with variants and direct uploads. Use when adding file uploads, image attachments, document storage, generating thumbnails, or when user mentions Active Storage, file upload, attachments, or image processing. WHEN NOT: Storing data in database columns, external URL references, static assets in the asset pipeline, or simple text/JSON storage.
paths
app/models/**/*.rb, app/controllers/**/*.rb, config/storage.yml

Active Storage Setup for Rails 8

Overview

Active Storage handles file uploads in Rails:

  • Cloud storage (S3, GCS, Azure) or local disk
  • Image variants (thumbnails, resizing)
  • Direct uploads from browser
  • Polymorphic attachments

Quick Start

bash
# Install Active Storage (if not already)
bin/rails active_storage:install
bin/rails db:migrate

# Add image processing
bundle add image_processing

Configuration

Storage Services
yaml
# config/storage.yml
local:
  service: Disk
  root: <%= Rails.root.join("storage") %>

test:
  service: Disk
  root: <%= Rails.root.join("tmp/storage") %>

amazon:
  service: S3
  access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
  secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
  region: eu-west-1
  bucket: <%= Rails.application.credentials.dig(:aws, :bucket) %>

google:
  service: GCS
  credentials: <%= Rails.root.join("config/gcs-credentials.json") %>
  project: my-project
  bucket: my-bucket
Environment Config
ruby
# config/environments/development.rb
config.active_storage.service = :local

# config/environments/production.rb
config.active_storage.service = :amazon

Model Attachments

Single Attachment
ruby
# app/models/user.rb
class User < ApplicationRecord
  has_one_attached :avatar

  # With variant defaults
  has_one_attached :avatar do |attachable|
    attachable.variant :thumb, resize_to_limit: [100, 100]
    attachable.variant :medium, resize_to_limit: [300, 300]
  end
end
Multiple Attachments
ruby
# app/models/event.rb
class Event < ApplicationRecord
  has_many_attached :photos

  has_many_attached :documents do |attachable|
    attachable.variant :preview, resize_to_limit: [200, 200]
  end
end

TDD Workflow

Active Storage Progress:
- [ ] Step 1: Add attachment to model
- [ ] Step 2: Write model spec for attachment
- [ ] Step 3: Add validations (type, size)
- [ ] Step 4: Create upload form
- [ ] Step 5: Handle in controller
- [ ] Step 6: Display in views
- [ ] Step 7: Test upload flow

Testing Attachments

See testing.md for model specs, factory traits, and request specs.

Key patterns:

  • Use fixture_file_upload in request specs
  • Define :with_avatar factory traits using after(:build)
  • Test be_attached and variant presence in model specs

Validations

Use the active_storage_validations gem for declarative validation, or write manual validate methods. See validations.md for both approaches.

ruby
# Gemfile
gem 'active_storage_validations'

Image Variants

Define named variants on the model attachment using resize_to_fill, resize_to_limit, or resize_to_cover. See variants-and-views.md for variant operations, view helpers, and form examples.

Controller and Service Handling

  • Permit :avatar for single uploads, photos: [] for multiple
  • Use purge to remove attachments, with optional Turbo Stream response
  • Use rails_blob_path or send_data for downloads

See controller-and-service.md for full controller examples, service methods, direct uploads setup, and performance tips.

Checklist

  • Active Storage installed and migrated
  • Storage service configured
  • Image processing gem added (if using variants)
  • Attachment added to model
  • Validations added (type, size)
  • Variants defined
  • Controller permits attachment params
  • Form handles file upload
  • Tests written for attachments
  • Direct uploads configured (if needed)

References

© ThibautBaissac, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .agents/skills/active-storage-setup of ThibautBaissac/rails_ai_agents.

  • SKILL.md
  • references/controller-and-service.md
  • references/testing.md
  • references/validations.md
  • references/variants-and-views.md

Open the folder on GitHubat commit 03622f2

Compare with similar skills

Active Storage Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Active Storage Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Active Storage Setup this skillThibautBaissac/rails_ai_agents665—~1.2kAutomated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Spatialduckdb/duckdb-skills6041 repos~1kAutomated safety check: NotesMIT
R Oopab604/claude-code-r-skills2062 repos~1.9kAutomated safety check: PassMIT
Edgestore Setupedgestorejs/edgestore454—~1.8kAutomated safety check: PassMIT

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Spatial

    duckdb/duckdb-skills

    Official

    Answer questions about spatial data using DuckDB. An agent skill from duckdb/duckdb-skills.

    604 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check: notes
  • R Oop

    ab604/claude-code-r-skills

    R object-oriented programming guide for S7, S3, S4, and vctrs.

    206 GitHub starsUsed in 2 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Edgestore Setup

    edgestorejs/edgestore

    A skill your agent uses when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application.

    454 GitHub stars~1.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • S3 Explore

    duckdb/duckdb-skills

    Official

    Explore and query data on S3, Cloudflare R2, GCS, MinIO, or any S3-compatible storage.

    604 GitHub starsUsed in 1 repo~848 tokens
    Backend & APIsAuto-check: notes

More from ThibautBaissac/rails_ai_agents

All 19 skills in this repo
  • Accessibility Review

    ThibautBaissac/rails_ai_agents

    Audits Rails application accessibility against WCAG 2.2 Level AA, detects violations with axe-core / Lighthouse / Pa11y, and reports remediation guidance for ERB views, ViewComponents, Stimulus…

    665 GitHub stars~2.9k tokensUpdated 4 mo ago
    Auto-check: notes
  • Action Cable Patterns

    ThibautBaissac/rails_ai_agents

    Implements real-time features with Action Cable and WebSockets.

    665 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Authentication Flow

    ThibautBaissac/rails_ai_agents

    Implements authentication using Rails 8 built-in generator. An agent skill from ThibautBaissac/rails_ai_agents.

    665 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check passed
  • Caching Strategies

    ThibautBaissac/rails_ai_agents

    Implements Rails caching patterns for performance optimization.

    665 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • I18n Patterns

    ThibautBaissac/rails_ai_agents

    Implements internationalization with Rails I18n for multi-language support.

    665 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Performance Optimization

    ThibautBaissac/rails_ai_agents

    Identifies and fixes Rails performance issues including N+1 queries, slow queries, and memory problems.

    665 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check: notes

Categories

Questions about Active Storage Setup

What does Active Storage Setup do?

Configures Active Storage for file uploads with variants and direct uploads. Active Storage Setup is an agent skill from ThibautBaissac/rails_ai_agents. Configures Active Storage for file uploads with variants and direct uploads.

When should I use Active Storage Setup?

Active Storage Setup fits situations like: adding file uploads; image attachments; document storage; generating thumbnails.

How do I install Active Storage Setup in Claude Code?

Run `npx skills add ThibautBaissac/rails_ai_agents --skill active-storage-setup -a claude-code`. Or copy the skill folder (.agents/skills/active-storage-setup in ThibautBaissac/rails_ai_agents) into .claude/skills/active-storage-setup in your project. Claude Code loads it when a task matches its description.

How do I install Active Storage Setup in Codex?

Run `npx skills add ThibautBaissac/rails_ai_agents --skill active-storage-setup -a codex`. Or copy the skill folder (.agents/skills/active-storage-setup in ThibautBaissac/rails_ai_agents) into .agents/skills/active-storage-setup in your project. Codex loads it when a task matches its description.

Can I use Active Storage Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ThibautBaissac/rails_ai_agents --skill active-storage-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/active-storage-setup, .gemini/skills/active-storage-setup, .github/skills/active-storage-setup and .opencode/skills/active-storage-setup in your project.

What does Active Storage Setup need to run?

Going by SKILL.md and its folder, Active Storage Setup needs the command-line tools its instructions call (rails and bundle).

Does Active Storage Setup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Active Storage Setup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Active Storage Setup use?

Active Storage Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Active Storage Setup use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Active Storage Setup?

Skills that share tags, products or a category with Active Storage Setup: Stripe Projects (fossasia/eventyay, 1.7k stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), Spatial (duckdb/duckdb-skills, 604 stars) and R Oop (ab604/claude-code-r-skills, 206 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Active Storage Setup?

ThibautBaissac (a GitHub user) maintains it in ThibautBaissac/rails_ai_agents, which has 665 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 1, 2026.

Source: ThibautBaissac/rails_ai_agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.