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-patternsgit 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-patterns)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/ruby-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/ruby-patterns/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-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/ruby-patterns.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.00060 | $0.02704 |
| Opus 5.5 | $0.00024 | $0.01082 |
| Sonnet 5.5 | $0.00012 | $0.00541 |
| Haiku 4.5 | $0.00006 | $0.00270 |
Grade A, and why
ruby-patterns 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 3mo 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 — 456 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ruby Patterns
Project Structure
Gem Layout
my_gem/
├── lib/
│ ├── my_gem.rb # Entry point, require sub-files
│ └── my_gem/
│ ├── version.rb
│ ├── configuration.rb
│ ├── client.rb
│ └── errors.rb
├── spec/
│ ├── spec_helper.rb
│ ├── my_gem/
│ │ └── client_spec.rb
│ └── fixtures/
├── bin/
│ └── console # IRB with gem loaded
├── sig/ # RBS type signatures
├── Gemfile
├── Rakefile
├── my_gem.gemspec
├── .rubocop.yml
└── .ruby-version
Rails Standard Structure
app/
├── controllers/
│ ├── application_controller.rb
│ └── api/v1/
│ └── users_controller.rb
├── models/
│ ├── application_record.rb
│ ├── user.rb
│ └── concerns/
│ └── searchable.rb
├── services/
│ └── users/
│ ├── create_service.rb
│ └── import_service.rb
├── jobs/
│ └── user_sync_job.rb
├── mailers/
├── serializers/
│ └── user_serializer.rb
└── views/
config/
├── routes.rb
├── database.yml
├── initializers/
│ ├── sidekiq.rb
│ └── cors.rb
└── environments/
db/
├── migrate/
├── schema.rb
└── seeds.rb
spec/
├── rails_helper.rb
├── spec_helper.rb
├── models/
├── requests/
├── services/
├── factories/
│ └── users.rb
└── support/
└── shared_examples/
Gemfile Best Practices
source "https://rubygems.org"
ruby "~> 3.3"
gem "rails", "~> 7.2"
gem "pg"
gem "puma", ">= 6.0"
gem "sidekiq", "~> 7.0"
gem "redis", ">= 5.0"
group :development, :test do
gem "rspec-rails"
gem "factory_bot_rails"
gem "faker"
gem "debug"
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
end
group :test do
gem "shoulda-matchers"
gem "webmock"
gem "vcr"
gem "simplecov", require: false
end
Idioms / Code Style
Blocks, Procs, and Lambdas
# Block -- yielded to, not stored
def with_retry(attempts: 3)
attempts.times do |i|
return yield
rescue StandardError => e
raise if i == attempts - 1
sleep(2**i)
end
end
with_retry { http_client.get("/data") }
# Proc -- flexible arity, returns from enclosing method
validator = Proc.new { |val| val.to_s.strip.length > 0 }
# Lambda -- strict arity, returns from itself
transform = ->(x) { x.to_s.downcase.strip }
words = ["Hello ", " WORLD"].map(&transform)
# Method reference
names = users.map(&:name)
valid = values.select(&method(:valid?))
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.
- 3mo ago First seen · 456 lines · 60 tokens per session scan A 32e09bd933ec
ruby-patterns is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 2d ago), licensed Apache-2.0. It adds 60 tokens to every session and 2,704 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.
ruby-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ruby-patternssoftspark/ai-toolkit | Skill | 180 | 2d ago | Apache-2.0 | A | 60 | Claude Code |
| rubyllmcrmne/ruby_llm | Skill | 4.5k | today | MIT | A | 78 | Codex |
| dspy-rubydavekilleen/Dex | Skill | 523 | 4d ago | MIT | A | 81 | Claude Code |
| dhh-rails-styledavekilleen/Dex | Skill | 523 | 4d ago | MIT | A | 115 | Claude Code |
| unit-testjohnqtcg/awesome-skills | Skill | 32 | today | MIT | A | 100 | Claude Code |
| fuzzing-testjohnqtcg/awesome-skills | Skill | 32 | today | MIT | A | 74 | Claude Code |
| go-code-reviewerjohnqtcg/awesome-skills | Skill | 32 | today | MIT | A | 45 | Claude Code |