rugged-gemini: Skill for Claude Code

.gemini/skills/rails-idioms/SKILL.md

rails-idioms is a skill for Claude Code, Gemini CLI from irahardianto/rugged-gemini. It costs 0 tokens per session (555 once invoked), scanned A, original, MIT.

A guide to conventional Ruby on Rails patterns, including Active Record models, RESTful controllers, service objects, and Hotwire features for updating pages with little JavaScript.

In plain words
What is it for?
Use it when building Rails models, controllers, queries, validation, page updates, and tests.
Why use it?
It helps Rails code follow the framework’s expected conventions, reducing unnecessary configuration and common database or controller mistakes.

Skill for Claude CodeGemini CLI

Written for Claude Code and Gemini CLI: paths in frontmatter, but also installed under .gemini/.

This is irahardianto/rugged-gemini's own configuration. It tells Claude Code and Gemini CLI how to work on rugged-gemini itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rugged-gemini configures →

Reuse

Borrowing it

Nothing to install: this file belongs to irahardianto/rugged-gemini. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/irahardianto/rugged-gemini/main/.gemini/skills/rails-idioms/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/irahardianto/rugged-gemini

Made for: Claude Code, Gemini CLI.

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-idioms

README.md
[![agentmods](https://agentmods.dev/badge/skills/irahardianto/rugged-gemini/rails-idioms/github.svg)](https://agentmods.dev/skills/irahardianto/rugged-gemini/rails-idioms)
Your own site
<a href="https://agentmods.dev/skills/irahardianto/rugged-gemini/rails-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/rugged-gemini/rails-idioms/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.

agentmods 80×15 button for rails-idioms

Your own site · 80×15
<a href="https://agentmods.dev/skills/irahardianto/rugged-gemini/rails-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/rugged-gemini/rails-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 555 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.00000 $0.00555
Opus 5 $0.00000 $0.00278
Sonnet 5 $0.00000 $0.00111
Haiku 4.5 $0.00000 $0.00056

Measured 8d ago against content hash fd9e954ccac4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

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

.gemini/skills/rails-idioms/SKILL.md · 73 lines

What it actually says

Rails Idioms and Patterns

Rails rewards convention over configuration, Active Record, and RESTful design. Idiomatic Rails = conventional, tested, Hotwire-aware.

Scope: Rails-specific patterns. For Ruby: @.gemini/skills/ruby-idioms/SKILL.md.

Active Record

  1. Scopes for reusable queries:

    class Task < ApplicationRecord
      scope :active, -> { where(status: :active) }
      scope :by_priority, -> { order(priority: :desc) }
    end
    
  2. Validations in models, not controllers:

    class Task < ApplicationRecord
      validates :title, presence: true, length: { maximum: 200 }
      validates :priority, inclusion: { in: %w[low medium high] }
    end
    
  3. includes/preload for eager loading — avoid N+1.

Controllers

  1. RESTful actions — only standard 7 actions per controller. Custom actions = new controller.
  2. Strong parameters — never mass-assign without permit.
  3. Service objects for complex business logic.

Hotwire (7+)

  1. Turbo Frames for partial page updates.
  2. Turbo Streams for real-time updates.
  3. Stimulus for JavaScript sprinkles — minimal JS.

Testing

  1. RSpec (preferred):

    RSpec.describe TasksController, type: :request do
      describe 'POST /tasks' do
        it 'creates a task' do
          post tasks_path, params: { task: { title: 'Test', priority: 'high' } }
          expect(response).to have_http_status(:created)
        end
      end
    end
    
  2. FactoryBot for test data. Database Cleaner for isolation.

Formatting and Static Analysis

Tool Purpose Command
RuboCop + rubocop-rails Linting rubocop --autocorrect
Brakeman Security brakeman --no-pager
bundle audit CVE scanning bundle audit check --update

Related

  • Ruby Idioms @.gemini/skills/ruby-idioms/SKILL.md
  • Database Design Principles @.gemini/skills/database-design-principles/SKILL.md
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. 8d ago First seen · 73 lines · 0 tokens per session scan A fd9e954ccac4

Subscribe to this mod's changes

rails-idioms is a skill published in the GitHub repository irahardianto/rugged-gemini (5 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 555 tokens. 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-09-03.

Related

Other skills, from other repositories

rails-expert

Rails 7+ specialist that optimizes Active Record queries with includes/eagerload, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites. Use when building…

Jeffallan/claude-skills · 104 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

rails-conventions

Rootstrap Rails conventions. Use when writing, reviewing, or editing any Rails code — controllers, models, migrations, routes, views, mailers, initializers, locale files, or Rails config. Covers routing, ActiveRecord, migrations, i18n, time zones, mailers, assets, Bundler groups, and logging.

rootstrap/rails_api_base · 71 tokens

ruby-rails

Conventions and best practices for building web applications with Ruby on Rails. Use when scaffolding Rails apps or generators, designing ActiveRecord models and migrations, wiring up Hotwire/Turbo/Stimulus interactivity, setting up background jobs or caching, or writing RSpec/Minitest coverage for Rails code.

Mindrally/skills · 65 tokens

ruby-expert

Expert-level Ruby development with Rails, modern features, testing, and best practices. Use when the user mentions Ruby on Rails, RSpec, gem, Sinatra, or metaprogramming, or when the task involves Ruby 3+ Features, Object-Oriented, Functional Features, or Pattern Matching.

personamanagmentlayer/pcl · 64 tokens

rails-dev

Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data…

tech-leads-club/agent-skills · 199 tokens