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/softspark/ai-toolkit/ruby-rulesnpx skills add softspark/ai-toolkit --skill ruby-rulesgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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/softspark/ai-toolkit/ruby-rules)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/ruby-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/ruby-rules.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00048 | $0.03216 |
| Opus 5 | $0.00024 | $0.01608 |
| Sonnet 5 | $0.00010 | $0.00643 |
| Haiku 4.5 | $0.00005 | $0.00322 |
Grade A, and why
ruby-rules 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 — 287 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ruby Rules
These rules come from app/rules/ruby/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in Ruby. Apply them when writing or
reviewing Ruby code.
Ruby Coding Style
Naming
- PascalCase: classes, modules.
- snake_case: methods, variables, file names, directories.
- UPPER_SNAKE: constants (
MAX_RETRIES = 3). - Prefix boolean methods with predicate:
empty?,valid?,admin?. - Suffix dangerous methods with
!:save!,sort!,strip!. - Use
_prefix for intentionally unused variables:_unused.
Methods
- Keep methods short: 5-10 lines ideal. Extract helper methods.
- Use keyword arguments for methods with >2 parameters.
- Use default parameter values instead of checking for nil.
- Use
def method_name = expression(Ruby 3.0+) for one-liners. - Prefer
eachoverforloops. Use block-style iteration. - Return values implicitly (last expression). Use explicit
returnonly for early exit.
Blocks, Procs, Lambdas
- Use
{ }for single-line blocks. Usedo...endfor multi-line blocks. - Use
&:methodshorthand:names.map(&:upcase). - Use lambdas for strict argument checking. Use procs for flexible arity.
- Use
yieldfor single-block methods. Use explicit&blockfor storing/forwarding.
Classes
- Use
attr_reader,attr_writer,attr_accessorfor simple getters/setters. - Use
Structfor simple data containers. UseData.define(Ruby 3.2+) for immutable. - Use modules for mixins:
includefor instance methods,extendfor class methods. - Use
frozen_string_literal: truemagic comment at the top of every file. - Use
private/protectedkeywords to control method visibility.
Collections
- Use
map,select,reject,reduce,flat_mapfor transformations. - Use
each_with_objectoverinjectwhen accumulating into a mutable object. - Use
digfor safe nested hash/array access:data.dig(:user, :address, :city). - Use
Hash#fetchwith default for explicit missing-key handling. - Use
Enumerable#lazyfor large collection processing.
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 · 287 lines · 48 tokens per session scan A 8a6d84fe2105
ruby-rules is a skill published in the GitHub repository softspark/ai-toolkit (168 stars, last pushed yesterday), licensed Apache-2.0. It adds 48 tokens to every session and 3,216 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
cline-fix-volatile-msg
Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune TTL. Updated for the 2026-08 AI-SDK monorepo.
continue-gemini-explicit
Continue's Gemini provider doesn't use the cachedContents API at all. Add explicit caching for sessions over the minimum token threshold.
aider-1h-ttl
Aider uses 5min TTL by default and works around long pauses with keepalive pings. Wire up the 1h TTL beta instead.
cline-openai-cache-key
Cline OpenAI native provider sends no promptcachekey. Add a stable per-task key so cachedtokens stops being zero.
continue-enable-defaults
Continue's prompt caching is opt-in via config and off by default. Flip the default to systemAndTools.
continue-fix-volatile-msg
Ladder-aware Continue Anthropic caching — verify the rolling ladder on the wire, then enable it by default and add TTL coverage.