agentleFS
martinstreichermartinstreicher/claude-skills/rails/Skill.md

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

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. carapace-sh/carapace-bin★ 2ksame name
    2. maroffo/claude-forge★ 17same name
    3. G1Joshi/Agent-Skills★ 15same name
    4. TeamHelix-AI/helix★ 1same name
    5. 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.

  • In this repository2 other files it gives its agents.

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
  1. Distinctive:

    Put a blank line after all associations are defined.

    line 16
  2. Distinctive:

    Put a blank line after all validations are defined.

    line 18
  3. Distinctive:

    When organizing Rails model files, follow this order:

    line 28
  4. Distinctive:

    Use arrow functions for callbacks.

    line 58
  5. Very specific:

    Use :aggregate_failures for multiple expectations in RSpec.

    line 68
  6. Very specific:

    Prefer let! over before blocks for creating test data.

    line 69
  7. Distinctive:

    When possible, set a subject with a variable name to reduce repetition in expect statements.

    line 70

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
Skill.md

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_many statements.
  • 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:

    1. Schema comment (annotate gem).
    2. Module includes.
    3. Constants.
    4. Delegates.
    5. Gems/Plugins (has_paper_trail, has_secure_token, etc.).
    6. Callbacks (alphabetized: after_, before_, around_*).
    7. Associations.
    • belongs_to (alphabetized).
    • has_one.
    • has_many.
    • has_and_belongs_to_many.
    1. Validations.
    • validates (alphabetized by attribute).
    • validate (alphabetized by method name).
    1. Scopes (alphabetized).
    2. Class methods (self.) - alphabetized.
    3. Instance methods - alphabetized.
    4. Ransackable methods (ransackable_associations, ransackable_attributes).
    5. 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_failures for multiple expectations in RSpec.
  • Prefer let! over before blocks 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

IDTimeTTitleRead
#25504:30 PM✅st-settings.json file read for sorting~330
#2549"✅Alphabetical key sorting for settings~293
<!-- end claude-mem-context -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.