rugged-gemini: Skill for Claude Code

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

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

A set of modern Ruby coding guidelines covering pattern matching, concise methods, immutable data objects, errors, and typing options.

In plain words
What is it for?
It supports designing Ruby classes and value objects, matching structured results, handling domain errors, and applying modern Ruby conventions.
Why use it?
It helps Ruby code stay readable and consistent while using current language features. It also provides patterns for representing failures and structured values clearly.

Skill for Claude CodeGemini CLI

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/irahardianto/rugged-gemini/ruby-idioms.svg)](https://agentmods.dev/skills/irahardianto/rugged-gemini/ruby-idioms)
Your own site
<a href="https://agentmods.dev/skills/irahardianto/rugged-gemini/ruby-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/rugged-gemini/ruby-idioms.svg" alt="Measured on agentmods" 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 775 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 92% copy Near-identical to another mod 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.00775
Opus 5 $0.00000 $0.00387
Sonnet 5 $0.00000 $0.00155
Haiku 4.5 $0.00000 $0.00077

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

Security

Grade A, and why

ruby-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 4d 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.

Origin

This is a copy

92% identical to ruby-idioms — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.gemini/skills/ruby-idioms/SKILL.md · 100 lines

How it starts

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

Ruby Idioms and Patterns

Ruby rewards expressiveness, convention, and developer happiness. Modern Ruby (3.x) favors pattern matching, Ractor for concurrency, and strict typing via Sorbet/RBS. Idiomatic Ruby = readable, tested, convention-following.

Scope: Ruby coding idioms. Test naming: GEMINI.md § Testing Strategy. Logging: @.gemini/skills/logging-and-observability-principles/SKILL.md.

Modern Ruby Features (3.x)

  1. Pattern matching:

    case result
    in { status: :success, data: Task => task }
      render json: task
    in { status: :not_found, id: String => id }
      render json: { error: "Task #{id} not found" }, status: :not_found
    end
    
  2. Endless methods for simple accessors:

    def full_name = "#{first_name} #{last_name}"
    
  3. Data class (3.2+) for immutable value objects:

    TaskResult = Data.define(:task, :status)
    result = TaskResult.new(task: task, status: :created)
    

Error Handling

  1. Domain exception hierarchies:

    class DomainError < StandardError; end
    
    class NotFoundError < DomainError
      attr_reader :resource, :resource_id
      def initialize(resource, resource_id)
        @resource = resource
        @resource_id = resource_id
        super("#{resource} '#{resource_id}' not found")
      end
    end
    
  2. rescue specific exceptions — never bare rescue.

  3. Use ensure for cleanup — equivalent to finally.

Naming

  1. snake_case for methods, variables, file names.
  2. PascalCase for classes, modules.
  3. UPPER_SNAKE_CASE for constants.
  4. ? suffix for boolean queries: active?, valid?.
  5. ! suffix for destructive or dangerous methods: save!, delete!.

Testing

  1. RSpec (preferred) or Minitest:
    RSpec.describe TaskService do
      describe '#create' do
        it 'creates a task with valid attributes' do
          task = service.create(title: 'Test', priority: :high)
          expect(task.title).to eq('Test')
        end
    
        it 'raises ValidationError for blank title' do
          expect { service.create(title: '', priority: :high) }
            .to raise_error(ValidationError)
        end
      end
    end
    

Read the full file on GitHub · 100 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. 4d ago First seen · 100 lines · 0 tokens per session scan A 3e14dbca59cd

Subscribe to this mod's changes

ruby-idioms is a skill published in the GitHub repository irahardianto/rugged-gemini (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 775 tokens. A static security scan graded it A with 0 findings. It is 92% identical to ruby-idioms, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

rspec-conventions

Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…

rootstrap/rails_api_base · 82 tokens

ruby-patterns

Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.

softspark/ai-toolkit · 60 tokens

ruby-rules

Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.

softspark/ai-toolkit · 48 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

activerecord

This skill should be used when the user asks to "write a migration", "add a column", "add column to table", "create an index", "add a foreign key", "set up associations", "fix N+1 queries", "optimize queries", "add validations", "create callbacks", "use eager loading", or mentions ActiveRecord, belongsto, hasmany…

hoblin/claude-ruby-marketplace · 180 tokens