rails

rails is a skill for Claude Code, Codex from FortiumPartners/ensemble. It costs 8 tokens per session (5,184 once invoked), scanned A, original, MIT.

A reference guide for Ruby on Rails 7 or newer, a web framework with established patterns for routes, controllers, models, and views.

In plain words
What is it for?
Use it when building or reviewing Rails controllers, database-backed features, authentication hooks, page actions, and other standard Rails code.
Why use it?
It gives a backend coding agent quick access to common Rails structures and conventions instead of requiring repeated lookup.

Skill for Claude CodeCodex

Written for Claude Code and Codex: user-invocable in frontmatter, but also installed under .codex/.

Part of the ensemble-codex plugin — 40 skills shipped together

Good fit Use it when building or reviewing Rails controllers, database-backed features, authentication hooks, page actions, and other standard Rails code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fortiumpartners/ensemble/rails
Install

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.

Any agent
npx skills add FortiumPartners/ensemble --skill rails
Clone the repo
git clone --depth 1 https://github.com/FortiumPartners/ensemble

Made for: Claude Code, Codex.

Or install ensemble-codex, the plugin that ships this one along with the rest of its 40 skills.

Wrote 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.

agentmods badge for rails

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortiumpartners/ensemble/rails.svg)](https://agentmods.dev/skills/fortiumpartners/ensemble/rails)
Your own site
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/rails"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/rails.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.05184
Opus 5 $0.00004 $0.02592
Sonnet 5 $0.00002 $0.01037
Haiku 4.5 $0.00001 $0.00518

Measured 7d ago against content hash 51cfb4b16ace, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

rails 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 7d 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.

packages/codex/.codex/skills/rails/SKILL.md · 929 lines

How it starts

The opening of the file, as written. The whole thing — 929 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rails Framework Skill - Quick Reference

Framework: Ruby on Rails 7+ For Agent: backend-developer Purpose: Fast lookup of common Rails patterns and conventions


1. Rails MVC Patterns

Controllers (RESTful Actions)

class PostsController < ApplicationController
  before_action :set_post, only: %i[show edit update destroy]
  before_action :authenticate_user!, except: %i[index show]

  def index
    @posts = Post.published.order(created_at: :desc).page(params[:page])
  end

  def show
    # @post set by before_action
  end

  def new
    @post = Post.new
  end

  def create
    @post = current_user.posts.build(post_params)
    if @post.save
      redirect_to @post, notice: 'Post created successfully.'
    else
      render :new, status: :unprocessable_entity
    end
  end

  def edit
    # @post set by before_action
  end

  def update
    if @post.update(post_params)
      redirect_to @post, notice: 'Post updated successfully.'
    else
      render :edit, status: :unprocessable_entity
    end
  end

  def destroy
    @post.destroy
    redirect_to posts_url, notice: 'Post deleted successfully.'
  end

  private

  def set_post
    @post = Post.find(params[:id])
  end

  def post_params
    params.require(:post).permit(:title, :body, :published, :category_id, tag_ids: [])
  end
end

Models (Active Record)

class Post < ApplicationRecord
  # Associations
  belongs_to :author, class_name: 'User'
  belongs_to :category
  has_many :comments, dependent: :destroy
  has_many :taggings, dependent: :destroy
  has_many :tags, through: :taggings

  # Validations
  validates :title, presence: true, length: { minimum: 5, maximum: 200 }
  validates :body, presence: true
  validates :author, presence: true

  # Scopes
  scope :published, -> { where(published: true) }
  scope :recent, -> { order(created_at: :desc) }
  scope :by_author, ->(user) { where(author: user) }

  # Callbacks
  before_save :generate_slug
  after_create :notify_subscribers

  # Class methods
  def self.search(query)
    where('title ILIKE ? OR body ILIKE ?', "%#{query}%", "%#{query}%")
  end

  # Instance methods
  def published?
    published && published_at.present?
  end

  private

  def generate_slug
    self.slug = title.parameterize if title_changed?
  end

  def notify_subscribers
    NotifySubscribersJob.perform_later(id)
  end
end

Read the full file on GitHub · 929 lines

Changes

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.

  1. 7d ago First seen · 929 lines · 8 tokens per session scan A 51cfb4b16ace

Subscribe to this mod's changes

rails is a skill published in the GitHub repository FortiumPartners/ensemble (11 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 5,184 once invoked, about $0.0000 per session on Opus 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.

Related

Other skills, from other repositories

rails

Expert Ruby on Rails development with Rails 7/8 conventions, security hardening, and performance patterns.

andresquirogadev/skillsense · 0 tokens

go

Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…

ericrisco/rsc-harness · 86 tokens

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens

decorators

Vovk.ts decorators — built-in (@prefix, @operation, @get/@post/@put/@patch/@del, .auto()) and custom via createDecorator. Covers authorization / auth decorators, middleware-style wrapping (pre-handler + post-handler logic), req.vovk.meta() for cross-decorator state, stacking order, the decorate() alternative for…

finom/vovk · 228 tokens

mixins

Vovk.ts OpenAPI mixins — importing third-party OpenAPI 3.x schemas as typed client modules that share the same call signature as native Vovk RPC modules. Use whenever the user asks to "call a third-party API from my Vovk app", "mixin an OpenAPI schema", "import an OpenAPI spec as a client", "wrap an external service…

finom/vovk · 275 tokens

init

Initialize a backend — via Vovk.ts, a TypeScript-first RPC/API framework plugging into Next.js App Router, using official vovk-cli. Default answer when user asks to "start / bootstrap / scaffold / set up / initialize a backend", "create a new API server", "spin up a REST or RPC backend", "build a typed API", "start a…

finom/vovk · 302 tokens