agentleFS
alexderzalexderz/agentic-toolbox/skills/lang-ruby/SKILL.md

lang-ruby

Skill5 starsChanged 46 days agoMITView on GitHub

use this when writing, reviewing, or testing Ruby — *.rb, Gemfile. do not use for Rails-only architecture; stay on the language. do not use for Python.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use whatever the repo already runs.

    line 23
  2. Very specific:

    No empty rescue. No rescue nil.

    line 37
  3. Distinctive:

    No mutable class variables as global state.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Ruby

Language, not a Rails pack. No scripts/. Process skills that may load with this one: language-router Load-with list.

Iron law

Be explicit. Don't monkey-patch in app code. Parameters, not string SQL.

Tooling / verify

bundle exec rspec    # or
bundle exec rake test

Use whatever the repo already runs. Do not add a second test framework.

Idioms a linter misses

  • Keyword args for 3+ parameters.
  • Frozen string literals if the file/project already uses them.
  • Raise specific errors. Do not rescue StandardError to return nil.
  • Enumerable methods over index loops when they are clearer.
  • Predicate methods end in ?. Bang methods mutate or raise as the existing API already does — do not invent a new convention.

Errors

  • Rescue the type you can handle. Re-raise the rest.
  • No empty rescue. No rescue nil.

Concurrency

  • MRI threads are not a scaling plan. If you add threads, document what is shared and what is not.
  • No mutable class variables as global state.

Testing

  • minitest or RSpec as the repo chose. One behavior per example.
  • Doubles at I/O boundaries. Do not stub the type under test into meaninglessness.

PR review

  • New gem: why not stdlib or an existing gem?
  • New monkey-patch of a core class: reject in app code.
  • SQL and shell interpolation.

Security

  • SQL via binds. No #{user} in queries.
  • No eval, no send of untrusted names, no constantize of user strings.
  • system / backticks: argument arrays, not interpolated strings.
  • Mass-assignment: permit lists as the framework already does.

Always

  • Specific raises. Binds. Tests for the new branch.

Ask first

  • Adding a gem when stdlib will do.
  • Introducing Rails helpers in a non-Rails gem.

Never

  • Rescue-and-ignore.
  • Monkey-patching core classes in application code.
  • eval / untrusted send.
  • Interpolated system.

Red flags

  • "I'll rescue StandardError and move on"
  • "It's Ruby, duck typing means no checks"
  • "send is fine, the string is almost static"

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.