rubyllm

rubyllm is a skill for Codex from crmne/ruby_llm. It costs 70 tokens per session (3,128 once invoked), scanned A, original, MIT.

A guide for building Ruby and Rails applications with RubyLLM, a framework for connecting applications to AI services. It covers conversations, agents, tools, structured results, media generation, transcription, OCR, moderation, embeddings, and reranking.

In plain words
What is it for?
Use it to add AI chats and agents, generate or process media, extract text from images, moderate content, create embeddings, rerank results, and integrate these features with Rails.
Why use it?
It helps developers use the API version already installed in the application instead of choosing incompatible examples or upgrading unnecessarily.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to add AI chats and agents, generate or process media, extract text from images, moderate content, create embeddings, rerank results, and integrate these features with Rails.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/crmne/ruby_llm/rubyllm
About the project

crmne/ruby_llm is a Ruby framework that provides one interface for building AI chats, agents, tools, retrieval-augmented generation, and multimodal workflows across multiple model providers. Ruby and Rails developers use it to add AI features without rewriting application code for each provider. The catalogue contains instructions and a skill for working with the framework.

crmne/ruby_llm · 4,483 stars · on GitHub · rubyllm.com

Install

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.

Any agent
npx skills add crmne/ruby_llm --skill rubyllm
Clone the repo
git clone --depth 1 https://github.com/crmne/ruby_llm

Made for: Codex.

Wrote 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.

agentmods badge for rubyllm

README.md
[![agentmods](https://agentmods.dev/badge/skills/crmne/ruby_llm/rubyllm/github.svg)](https://agentmods.dev/skills/crmne/ruby_llm/rubyllm)
Your own site
<a href="https://agentmods.dev/skills/crmne/ruby_llm/rubyllm"><img src="https://agentmods.dev/badge/skills/crmne/ruby_llm/rubyllm/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.

agentmods 80×15 button for rubyllm

Your own site · 80×15
<a href="https://agentmods.dev/skills/crmne/ruby_llm/rubyllm"><img src="https://agentmods.dev/badge/skills/crmne/ruby_llm/rubyllm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.03128
Opus 5.5 $0.00028 $0.01251
Sonnet 5.5 $0.00014 $0.00626
Haiku 4.5 $0.00007 $0.00313

Measured 6d ago against content hash f7a048257400, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rubyllm 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 6d 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.

skills/rubyllm/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Build with RubyLLM

Use the application's installed RubyLLM version and existing conventions. This skill describes the 2.x API; features marked 2.1 need RubyLLM 2.1 or later. Read Gemfile.lock, or inspect the installed gem before choosing an API:

bundle exec ruby -rruby_llm -e 'puts RubyLLM::VERSION'
bundle show ruby_llm

For a 1.x application, use its version's documentation and keep the requested change on 1.x unless the user asks for an upgrade. Adding an AI feature does not require upgrading the application's framework.

Choose the API for the task

RubyLLM has two public API families: conversations use chats, messages, tools, agents, structured output, streaming, and loop control; individual operations use paint, animate, speak, transcribe, ocr, moderate, embed, rerank, judge, tokenize, and research. Individual operations return typed results without requiring a chat. Some stream or have an asynchronous lifecycle.

Providers supply service endpoints, authentication, catalogs, and protocol selection. Protocols translate requests and responses. Both API families use this integration layer and shared services for model selection, configuration, accounting, and instrumentation. Build against the public API and let RubyLLM handle the service formats.

Rails integration adds persistence, attachments, streaming UI support, jobs, and generators around the same Ruby API.

Find the relevant API

The installed gem's public method signatures and RDoc describe the code the application actually runs. Use them when online documentation differs. Find the matching version through RubyLLM's documentation. The root site documents the latest stable release. Unreleased changes on main are under rubyllm.com/next/, and 1.x under rubyllm.com/v1/.

Read the relevant page instead of loading the entire documentation site:

Task Guide path under the matching documentation version
Understand the framework's structure overview/
Configure a provider or select a model configuration/, configuration-providers/, models/
Chat, stream, or attach files chat/, streaming/, attachments/
Declare tools or require approval tools/, tool-parameters/, tool-execution/
Keep attachments and long tool results out of the conversation (2.2) chat-files/
Use tools from MCP servers (2.1) mcp/
Use provider-hosted tools such as web search provider-tools/, citations/
Parse structured output structured-output/
Build reusable agents agents/, prompt-rendering/
Enable thinking or prompt caching thinking/, prompt-caching/
Generate images or video image-generation/, video-generation/
Generate speech or transcribe audio text-to-speech/, audio-transcription/
Extract document text or moderate content ocr/, moderation/
Embed text or rank search results embeddings/, rerank/, rag/
Classify, score, or decide with typed answers (2.1) judgments/
Measure answer quality against a dataset (2.1) evaluations/, evaluation-datasets/, evaluation-evaluators/, evaluation-running/, evaluation-examples/
Count tokens, upload provider files, or run hosted research tokenization/, files/, hosted-research/
Persist chats, attach files, or stream with Hotwire rails/, rails-persistence/, rails-streaming/, rails-generators/, rails-advanced-config/
Resume agents in background jobs durable-agents/
Track spend or handle failures cost-and-usage-tracking/, error-handling/
Observe calls, group workflows, or trace with OpenTelemetry instrumentation/, opentelemetry/ (2.1)
Submit batches or drive the conversation loop batches/, agentic-workflows/
Upgrade an existing application upgrading/

Read the full file on GitHub · 107 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 6d ago Changed · +2 lines f7a048257400
  2. 8d ago Changed · +2 lines 40d399b3f893
  3. 17d ago Changed 6e76aeb876c7
  4. 19d ago Changed · +21 lines · +9 tokens per session c7f7f19545e7
  5. 1mo ago Changed 2503eab1d451
  6. 1mo ago First seen · 82 lines · 61 tokens per session scan A b87f31d4303e

Subscribe to this mod's changes

rubyllm is a skill published in the GitHub repository crmne/ruby_llm (4,483 stars, last pushed today), licensed MIT. It adds 70 tokens to every session and 3,128 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-09-08.