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 agentmods add skills/rootstrap/rails_api_base/ruby-conventionsnpx skills add rootstrap/rails_api_base --skill ruby-conventionsgit clone --depth 1 https://github.com/rootstrap/rails_api_baseWhat 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 | $0.00084 | $0.03325 |
| Opus 5 | $0.00042 | $0.01663 |
| Sonnet 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 yesterday.
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.
- yesterday 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 3d ago), licensed MIT. It adds 84 tokens to every session and 3,325 once invoked, about $0.0004 per session on Opus 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
implementing-providers
Use when adding a new exchange rate data provider, implementing a provider from a GitHub issue, when the user mentions a new central bank or data source, or when working on any issue labeled "provider". Also use when asked to backfill, fix, or update an existing provider.
evaluating-pegs
Use when adding, evaluating, or removing an entry in db/seeds/pegs/, when the user mentions a pegged or fixed currency, or when an issue suggests we should "pin" or "lock" a currency to another. Also use when deciding whether to filter or override provider rates based on an assumed peg.
wise-api
Use when querying Wise for exchange rates (real-time or historical), validating Frankfurter rates against Wise mid-market, debugging rate discrepancies, or when the user mentions Wise, sanity check, or rate comparison.
test
Run Ruby and/or Go tests. Pass a file path to run a specific test, or no args to run all.
compile
Compile the Go shared library for local development.
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.