Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rules Ruby?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-rules-ruby)
---
name: rules-ruby
description: "ANVIL coding rules for ruby code (**/*.rb, **/*_spec.rb, **/*_test.rb, spec/**/*.rb): Ruby, Ruby Testing."
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# ANVIL rules: ruby
Follow these rules for ruby code (**/*.rb, **/*_spec.rb, **/*_test.rb, spec/**/*.rb).
## Ruby
# Ruby
- Strong params; no mass assignment of privileged fields.
- Bound parameters in queries; avoid N+1 with `includes`.
- RuboCop clean; tests for every behavior change.
## Ruby Testing
# Ruby Testing
- Keep specs focused on public behavior with flat `context` blocks; prefer `let` / explicit factories over mutable shared globals.
- Stub outbound HTTP calls cleanly (WebMock/VCR) and freeze clocks (`travel_to` / `Timecop`) rather than relying on network calls or sleeps.
- Cover validations, authorization failures, and transaction rollbacks without breaking test isolation across database runs.
- Keep system/browser specs sparse and focused on critical user flows; test domain logic in fast model/service specs.