Ruby rules

From softspark/ai-toolkit · View interactive version

Ruby rules is an AI agent skill from the GitHub repository softspark/ai-toolkit. Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.

How to use this skill

Skill file

Ruby Rules

These rules come from app/rules/ruby/ in ai-toolkit. They cover

the project's standards for coding style, frameworks, patterns,

security, and testing in Ruby. Apply them when writing or

reviewing Ruby code.

Ruby Coding Style

Naming

Methods

Blocks, Procs, Lambdas

Classes

Collections

Pattern Matching (Ruby 3+)

Formatting

Ruby Frameworks

Rails (General)

ActiveRecord

ActionController

Background Jobs

Sinatra / Hanami

API Mode

Hotwire / Turbo

Ruby Patterns

Error Handling

Service Objects

Value Objects

Metaprogramming (Use Sparingly)

Concurrency

Module Patterns

Decorator Pattern

Anti-Patterns

Ruby Security

Mass Assignment

SQL Injection

XSS Prevention

CSRF Protection

Authentication

Authorization

Secrets Management

Dependency Security

Ruby Testing

Framework

File Naming

Structure (RSpec)

Matchers (RSpec)

Mocking (RSpec)

FactoryBot

Rails Testing

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.