Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rootstrap/rails_api_base --skill ruby-conventionsgit clone --depth 1 https://github.com/rootstrap/rails_api_baseWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rootstrap/rails_api_base/ruby-conventions)<a href="https://agentmods.dev/skills/rootstrap/rails_api_base/ruby-conventions"><img src="https://agentmods.dev/badge/skills/rootstrap/rails_api_base/ruby-conventions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rootstrap/rails_api_base/ruby-conventions"><img src="https://agentmods.dev/badge/skills/rootstrap/rails_api_base/ruby-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00084 | $0.03325 |
| Opus 5.5 | $0.00034 | $0.01330 |
| Sonnet 5.5 | $0.00017 | $0.00665 |
| Haiku 4.5 | $0.00008 | $0.00332 |
Grade A, and why
ruby-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ruby Conventions (Rootstrap)
Apply these conventions whenever producing or modifying Ruby code. Full guide: https://github.com/rootstrap/tech-guides/blob/master/ruby/README.md
Most of these are enforced by RuboCop (see .rubocop.yml). When in doubt, run RuboCop.
Source Code Layout
- UTF-8, Unix line endings, 2-space indentation (no tabs), one expression per line (no
;). - Max 100 chars per line; end files with a newline; no trailing whitespace.
- Prefer
FooError = Class.new(StandardError)over emptyclass ... end. - Avoid single-line methods (exception:
def no_op; end). - Spaces around operators, after commas/colons; no spaces inside
(,[, around!, or in range literals (1..3). - Exception: no spaces around exponent:
c**2. - Indent
whenthe same ascase. - Blank lines between methods and around access modifiers; no blank lines inside class/method bodies.
- No trailing comma after last arg/element.
- Spaces around
=in default params:def f(a = 1). - Avoid line continuation
\except for string concatenation. - In multi-line chains, keep
.on the next line. - Use underscores in big numbers:
1_000_000. Lowercase prefixes0x,0o,0b. - No block comments (
=begin/=end). - Never more than one consecutive blank line.
- Align multi-line method args after
(, OR single-indent with)on its own line (avoid "double indent"). - For
case/ifresult assignment, either align branches under the keyword or break withkind =on its own line.
Syntax
- Use
::only for constants/constructors, not method calls. defwith parens when params exist, omit when empty.- Parens around method arguments, except: no-arg calls, DSL methods (
validates :name, ...), and keyword-like (attr_reader,puts). - Optional args at end of parameter list.
- Prefix unused block vars with
_:|_k, v|. - Avoid parallel assignment (
a, b, c = 1, 2, 3) except for swap, method-return destructuring, or splat. - Prefer trailing-underscore form:
a, = foo.split(',')overa, _, _ = .... Use named underscore vars (_second) when position conveys meaning. - Don't use
for; use iterators (each). - No
thenin multi-lineif; noif x; .... Always put the condition on the same line asif/unless. - Avoid multi-line ternary — use
if/unlessinstead. - No
while cond do/until cond dofor multi-line loops (drop thedo). - Favor ternary over
if/then/elseone-liners; don't nest ternaries. - Leverage
if/caseas expressions. - Use
!notnot; avoid!!boolean coercion. and/orkeywords are banned — use&&/||.- Favor modifier
if/unless/while/untilfor single-line bodies; avoid on multi-line blocks; don't nest modifiers. - Favor
unlessfor negatives; favoruntiloverwhilefor negative loop conditions. Neverunlesswithelse. - No parens around control-expression conditions (except safe assignment
if (v = ...)). - Use
Kernel#loopfor infinite loops; preferloop { ... break unless ... }overbegin ... end whilefor post-condition loops. - Omit outer
{}AND parens for internal DSL methods:validates :name, presence: true, length: { within: 1..10 }. - Omit outer
{}on trailing options hashes:user.set(name: 'John', age: 45). - Use
&:methodshorthand:names.map(&:upcase). {...}for single-line blocks,do...endfor multi-line. Avoiddo...endin chains.- Avoid explicit
returnwhen unnecessary; avoidself.unless required. - Use
||=to init nil/unset vars; don't use||=for booleans. - Use
&&=to preprocess nullable values. - Avoid
===outsidecase. - Use
==noteql?unless strict type comparison is intended. - No space between method name and opening paren:
f(x). - No nested method defs; use lambdas.
- Lambda:
->(a, b) { ... }with args (parens required);-> { ... }with no args (omit parens);lambda do ... endfor multi-line. - Prefer
procoverProc.new; use.call()not[]or.(). - Use shorthand self-assignment:
x += y,x **= y, etc. - Use explicit
&blockto forward blocks rather than wrapping them. - Don't shadow methods with local variables (e.g. naming an arg
optionswhen an accessor already exists). - Don't use character literals (
?x) — use'x'. - Avoid Perl-style special vars (
$;,$,); preferEnglishlibrary aliases ($LOAD_PATH, etc.). - Don't use
BEGIN/ENDblocks; useKernel#at_exitinstead. - Use
warnover$stderr.puts. - Favor
sprintf/formatoverString#%;Array#joinoverArray#*. - Use
Array(var)to coerce possibly-single values into arrays. - Use ranges or
between?instead ofx >= a && x <= b. - Predicate methods (
.even?,.zero?,.nil?) over== 0,== nil. - Avoid
!x.nil?whenif xsuffices. - Guard clauses over nested conditionals;
nextoverifin loops. - Prefer:
mapovercollect,selectoverfind_all,findoverdetect,reduceoverinject,sizeoverlength/count(note:counton non-Array Enumerables iterates the full collection). flat_mapovermap.flatten(1);reverse_eachoverreverse.each.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 192 lines · 84 tokens per session scan A 9a40b4b6e7c8
ruby-conventions is a skill published in the GitHub repository rootstrap/rails_api_base (633 stars, last pushed yesterday), licensed MIT. It adds 84 tokens to every session and 3,325 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rails-upgrade
Analyzes Rails applications and generates comprehensive upgrade reports with breaking changes, deprecations, and step-by-step migration guides for Rails 2.3 through 8.1. Use when upgrading Rails applications, planning multi-hop upgrades, querying version-specific changes, or answering what stands between the app and…
upgrade-cleanup
Clean up after (or abandon) a Rails upgrade. Drop NextRails.next? and NextRails.current? branches and retire dual-boot scaffolding (Gemfile.next, Gemfile.next.lock, conditional Gemfile groups), keeping either the next or the current version. Trigger when the user says they are done with the upgrade, want to clean up…
rails-audit-thoughtbot
Perform comprehensive code audits of Ruby on Rails applications based on thoughtbot best practices. Use this skill when the user requests a code audit, code review, quality assessment, or analysis of a Rails application. The skill analyzes the entire codebase focusing on testing practices (RSpec), security…
rails-load-defaults
Incrementally upgrade Rails config.loaddefaults by walking through each newframeworkdefaults config one at a time. Use this skill whenever the user mentions loaddefaults upgrade, newframeworkdefaults, framework defaults, or wants to bring their Rails app's default configuration up to match their Rails version. Also…
dual-boot
Sets up and manages dual-boot Ruby and Rails environments using the nextrails gem. Helps configure Gemfile for running two versions of Rails, Ruby, or any core dependency simultaneously, set up CI for both versions, use NextRails.next? for version-dependent code, and clean up after the upgrade is complete. Based on…
adapter-express
Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.