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 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/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/softspark/ai-toolkit/ruby-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/ruby-rules.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.00048 | $0.03216 |
| Opus 5.5 | $0.00019 | $0.01286 |
| Sonnet 5.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 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 — 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.
- 1mo ago First seen · 287 lines · 48 tokens per session scan A 8a6d84fe2105
ruby-rules is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 9d ago), licensed Apache-2.0. It adds 48 tokens to every session and 3,216 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
rubyllm
Build and maintain Ruby or Rails applications with the RubyLLM AI framework. Use for chats, agents, tools, MCP servers, structured output, judgments, evaluations, media generation, transcription, OCR, moderation, embeddings, reranking, tracing, Rails integration, and RubyLLM upgrades; not for contributing to the…
dspy-ruby
This skill should be used when working with DSPy.rb, a Ruby framework for building type-safe, composable LLM applications. Use this when implementing predictable AI features, creating LLM signatures and modules, configuring language model providers (OpenAI, Anthropic, Gemini, Ollama), building agent systems with…
dhh-rails-style
This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals…
andrew-kane-gem-writer
This skill should be used when writing Ruby gems following Andrew Kane's proven patterns and philosophy. It applies when creating new Ruby gems, refactoring existing gems, designing gem APIs, or when clean, minimal, production-ready Ruby library code is needed. Triggers on requests like "create a gem", "write a Ruby…
rspec
RSpec testing best practices for Ruby and Rails applications, covering test organization, data management, and isolation patterns.
ruby
Ruby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby applications.