rails
Skill0 starsChanged 9 months agoMITView on GitHub
name: Rails Preferences description: Preferences for developing and maintaining Rails code dependencies: ruby>=3.4.8, mise Apply these rules when developing and maintaining Rails code. - Try to keep things alphabetical within a section, such as all of the has_many statements. See the skills file for Ruby Coding Preferences. - Try to add whitespace between elements that make up sections to make things easier to read. - Order the const assignment statements alphabetically when possible. - Use :aggregate_failures for multiple expectations in…
5 other projects use a version of this.
Adopted by
Most recently taken up by
- maroffo/claude-forgetheir own version, first seen Oct 25, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- carapace-sh/carapace-bintheir own version, first seen Oct 8, 2026
- TeamHelix-AI/helixtheir own version, first seen Sep 12, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- carapace-sh/carapace-bin★ 2ksame name
- maroffo/claude-forge★ 17same name
- G1Joshi/Agent-Skills★ 15same name
- TeamHelix-AI/helix★ 1same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Put a blank line after all associations are defined.
- Distinctive: line 18
Put a blank line after all validations are defined.
- Distinctive: line 28
When organizing Rails model files, follow this order:
- Distinctive: line 58
Use arrow functions for callbacks.
- Very specific: line 68
Use :aggregate_failures for multiple expectations in RSpec.
- Very specific: line 69
Prefer let! over before blocks for creating test data.
- Distinctive: line 70
When possible, set a subject with a variable name to reduce repetition in expect statements.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Metadata
name: Rails Preferences description: Preferences for developing and maintaining Rails code dependencies: ruby>=3.4.8, mise
When to Apply
Apply these rules when developing and maintaining Rails code.
Rules for Rails Usage
- Try to keep things alphabetical within a section, such as all of the
has_manystatements. - Put a blank line after all associations are defined.
- Put a blank line after all validations are defined.
- Delegations should go after modules are included.
- Associations should appear after delegations and before validations.
- accepts_nested_attributes_for should appear after validations.
- Scopes should appear after accepts_nested_attributes_for.
When organizing Rails model files, follow this order:
- Schema comment (annotate gem).
- Module includes.
- Constants.
- Delegates.
- Gems/Plugins (has_paper_trail, has_secure_token, etc.).
- Callbacks (alphabetized: after_, before_, around_*).
- Associations.
- belongs_to (alphabetized).
- has_one.
- has_many.
- has_and_belongs_to_many.
- Validations.
- validates (alphabetized by attribute).
- validate (alphabetized by method name).
- Scopes (alphabetized).
- Class methods (self.) - alphabetized.
- Instance methods - alphabetized.
- Ransackable methods (ransackable_associations, ransackable_attributes).
- Private methods - alphabetized.
Resources
See the skills file for Ruby Coding Preferences.
JavaScript/Vue
- Order computed properties alphabetically.
- Order imports alphabetically within groups.
- Use arrow functions for callbacks.
Vue
- Try to add whitespace between elements that make up sections to make things easier to read.
- Order the const assignment statements alphabetically when possible.
Testing
- Use
:aggregate_failuresfor multiple expectations in RSpec. - Prefer
let!overbeforeblocks for creating test data. - When possible, set a subject with a variable name to reduce repetition in expect statements.
- Align the left brace of multiple, contiguous (no blank line between) let and let! statements.
- Separate a multiline let or let! statement with a blank line.
Recent Activity
<!-- claude-mem-context - auto-generated section, do not edit manually -->Jan 26, 2026
| ID | Time | T | Title | Read |
| #2550 | 4:30 PM | ✅ | st-settings.json file read for sorting | ~330 |
| #2549 | " | ✅ | Alphabetical key sorting for settings | ~293 |
<!-- end claude-mem-context -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

