contributing
Skill4.4k starsChanged 3 months agoMITView on GitHub
Contribute to the RubyLLM AI framework - set up the repo, run and record specs, work on conversations, individual AI operations, providers, protocols, Rails integration, and docs. Use when fixing a bug, building a feature, writing specs, or changing documentation in the RubyLLM codebase.
- Reads credentials
13 other projects use a version of this.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- rokokol/contributing-skilltheir own version, first seen Sep 15, 2026
- cloudflare/cloudflare-docstheir own version, first seen Sep 14, 2026
- Dpro-at/Tel-Agenttheir own version, first seen Sep 13, 2026
- tronschell/shinbotheir own version, first seen Sep 12, 2026
- ZaxbyHub/opencode-swarmtheir own version, first seen Sep 5, 2026
Who's talking about crmne/ruby_llm
- A Hacker News story“RubyLLM: A delightful Ruby way to work with AI”Hacker News · Mar 11, 2025 · 645 points
- @michaelkoper.com“This new LLM wrapper really shows the beauty of Ruby 👌 github.com/crmne/ruby_llm”Bluesky · Mar 15, 2025 · 19 likes
- A Hacker News story“RubyLLM 1.2.0: Universal OpenAI Compatibility & Custom Models”Hacker News · Apr 17, 2025 · 6 points
- A Hacker News story“Ruby_LLM: A delightful Ruby way to work with AI”Hacker News · Mar 13, 2025 · 4 points
- @hacker-news-jp.bsky.social“RubyLLM: AIをRubyで操作する楽しい方法 RubyLLM: A delightful Ruby way to work with AI 🔺 319 💬 20 🔗 HN Post | Article”Bluesky · Mar 15, 2025 · 3 likes
The biggest 5 of 87 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 87
Talked about on GitHub, Bluesky and Hacker News (87 times).
On GitHub · 46
- Aug 13, 2025gpt-5-mini and other models missing data — parsera-labs/api-llm-specs2 reactions · 1 comment
- Feb 14, 2026chore(deps): update dependency ruby_llm to v1.13.2 — zewelor/ps_events1 reaction · 6 comments
- Nov 11, 2025Use RubyLLM for Gemini recommendations — sh1nj1/plan421 reaction · 9 comments
- Jul 31, 2025Add support for RubyLLM::Message Content — traceloop/openllmetry-ruby1 reaction · 3 comments
- Oct 4, 2026Bump ruby_llm from `be80b6f` to `5ea3d8d` — chloerei/ruby_llm_demo0 reactions
41 more on GitHub
- Aug 17, 2026chore(deps): bump ruby_llm from 1.11.0 to 1.16.0 — Learning-Routes/Learning-routes0 reactions
- Aug 15, 2026Bump ruby_llm from 1.9.2 to 1.16.0 — pappdavid/edemocracy-hu-localisation-verification0 reactions · 1 comment
- Jul 25, 2026Bump ruby_llm from 1.4.0 to 1.16.0 — Stoopidrice/recipe-waifu0 reactions
- Jul 13, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — LMR271/guide-rails0 reactions
- Jul 8, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — Rupa08/plant_care_app0 reactions
- Jul 4, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — jcparfait/Bill0 reactions
- Jul 4, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — naraidk/Chatbot-dog0 reactions
- Jun 24, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — fi11theblanks/situationship-playlist0 reactions
- Jun 16, 2026build(deps): bump ruby_llm from 1.14.1 to 1.16.0 — jbigorra/the-interview0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — GBaum01/Brainstreak0 reactions
- Jun 15, 2026build(deps): bump ruby_llm from 1.15.0 to 1.16.0 — calmacleod/Transactions0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — tomlpzpro/archi_mind0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — Matelis-Git/world-census0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — Claire-d-3/startup-sheriff0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — adrianoterrazas2019-web/nutri-chat0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — ItsMeJade319/AI-vet-chatbot0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — theodora22/AI-Creator-System0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — tomlpzpro/Dreamer-x-maker0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — paul-lesueur/popwearchatbot0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — LhordeS/who-is-the-villain0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — NathanMdt61/OrientIA0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — mjc-gh/isaac0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — AstralVixen373/lore-generator0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — Loranger-dev/dog_chatbot0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — igor-estevao/ruby_llm_review_overview0 reactions
- Jun 15, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — tomasjef/plant-match0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — Tobideimon/THE_BARTENDER0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — Nabi-Biva/nutri-coach0 reactions
- Jun 15, 2026build(deps): bump ruby_llm from 1.14.1 to 1.16.0 — gustavoxpto/instructional-design-app0 reactions
- Jun 15, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — elia48/githealth0 reactions
- Jun 14, 2026Bump ruby_llm from 1.14.1 to 1.16.0 — vyncem/rag_chatbot0 reactions
- Jun 14, 2026build(deps): bump ruby_llm from 1.15.0 to 1.16.0 — pstrzalk/hifumi-dev0 reactions
- Jun 13, 2026Bump ruby_llm from 1.14.0 to 1.16.0 — sdfreund10/calorie-ai0 reactions
- Jun 12, 2026chore(deps): bump ruby_llm from 1.15.0 to 1.16.0 — husseymarcos/handshake0 reactions
- Jun 11, 2026Bump ruby_llm from 1.14.1 to 1.16.0 — vivek-rubylab/rag-chatbot-demo0 reactions
- Jun 11, 2026Bump ruby_llm from 1.2.0 to 1.16.0 — julesLefur/fish_app0 reactions
- Jun 10, 2026Bump ruby_llm from 1.15.0 to 1.16.0 — rodrigotoledo/ai_finance_control0 reactions
- Jun 10, 2026Bump ruby_llm from 1.14.1 to 1.16.0 — cyrillepierre-c44/cyrillepierre0 reactions
- Jun 10, 2026Build(deps): bump ruby_llm from 1.15.0 to 1.16.0 — HandleIT-Club/Mikhael0 reactions
- May 13, 2026chore(deps): bump ruby_llm from 1.14.1 to 1.15.0 — riggy/rygiel_net_v20 reactions
- May 11, 2026Bump ruby_llm from 1.14.1 to 1.15.0 — mattszein/pro-rails0 reactions
On Bluesky · 32
- Mar 15, 2025This new LLM wrapper really shows the beauty of Ruby 👌 github.com/crmne/ruby_llm — @michaelkoper.com19 likes and reposts
- Mar 15, 2025RubyLLM: AIをRubyで操作する楽しい方法 RubyLLM: A delightful Ruby way to work with AI 🔺 319 💬 20 🔗 HN Post | Article — @hacker-news-jp.bsky.social3 likes and reposts · 1 reply
- Mar 28, 2025🔗 crmne/ruby_llm https://github.com/crmne/ruby_llm — @kinduff.com2 likes and reposts
- Mar 24, 2025Loving RubyLLM! Definitely simplifies the integration of LLMs with Rails. As someone who has to build and ship web apps with Gen AI… — @handle.invalid2 likes and reposts · 1 reply
- Mar 15, 2025"RubyLLM: A delightful Ruby way to work with AI" RubyLLM makes using AI easy and fun for Ruby programmers. People are excited about its… — @hackerbriefs.bsky.social2 likes and reposts
27 more on Bluesky
- Mar 15, 2025GitHub - crmne/ruby_llm: A delightful Ruby way to work with AI. No configuration madness, no complex callbacks, no handler hell – just… — @tech-trending.bsky.social2 likes and reposts
- Mar 15, 2025Discovered this fantastic Ruby gem for chatting with LLMs today: github.com/crmne/ruby_llm. Very well put together! 👍🏻 — @ejstembler.bsky.social2 likes and reposts
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social2 likes and reposts
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI Discussion — @hackernewsbot.bsky.social2 likes and reposts
- Mar 16, 2025A delightful Ruby way to work with AI. No configuration madness, no complex callbacks, no handler hell – just beautiful, expressive Ruby… — @clipsoflogic.bsky.social1 likes and repost
- Mar 16, 2025https://github.com/crmne/ruby_llm RubyでAIを扱うためのライブラリです。 設定や複雑なコールバックが不要で、美しいRubyコードでAIを操作できます。 AIを使った開発をRubyで行いたい開発者におすすめです。 — @topickapp.bsky.social1 likes and repost
- Mar 16, 2025github.com/crmne/ruby_llm おおー。サクッと使うのにめっちゃ良さそう。 — @hekki.bsky.social1 likes and repost
- Mar 16, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm — @mm-hacker-news.bsky.social1 likes and repost
- Mar 16, 2025RubyLLM: A delightful Ruby way to work with AI (@github.com) Main Link | Discussion — @newsycombinator.bsky.social1 likes and repost
- Mar 16, 2025https://github.com/crmne/ruby_llm — @genya0407.social.genya0407.link.ap.brid.gy1 likes and repost
- Mar 15, 2025🌐RubyLLM: AI を扱うための楽しい Ruby の方法 https://github.com/crmne/ruby_llm via #HackerNews — @kdmsnr.com1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm (http://news.ycombinator.com/item?id=43331847) — @newsyc500.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm github.com — @hnbest.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm (http://news.ycombinator.com/item?id=43331847) — @newsyc250.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm (http://news.ycombinator.com/item?id=43331847) — @newsyc200.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI (github.com) Discussion | Main Link — @newsycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm https://news.ycombinator.com/item?id=43331847 — @hn100.atproto.rocks1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI view on hacker news — @ycombinatorbot.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI https://github.com/crmne/ruby_llm — @hnbot.gsuscs.xyz1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI #HackerNews https://github.com/crmne/ruby_llm — @hackernewstop5.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI L: https://github.com/crmne/ruby_llm C: https://news.ycombinator.com/item?id=43331847 posted… — @hnws.bsky.social1 likes and repost
- Mar 15, 2025RubyLLM: A delightful Ruby way to work with AI Discussion — @hn100.bsky.social1 likes and repost
On Hacker News · 9
- Mar 11, 2025RubyLLM: A delightful Ruby way to work with AI645 points · 169 comments
- Apr 17, 2025RubyLLM 1.2.0: Universal OpenAI Compatibility & Custom Models6 points
- Mar 13, 2025Ruby_LLM: A delightful Ruby way to work with AI4 points
- Mar 14, 2025Ruby LLM3 points
- Jun 9, 2026RubyLLM 1.16: concurrent tool execution, Rails-style instrumentation, and more2 points
4 more on Hacker News
- Jul 30, 2025RubyLLM 1.4.0: Structured Output, Custom Parameters, and Rails Generators2 points
- Apr 8, 2025RubyLLM 1.1.0: AWS Bedrock support and more2 points
- Apr 2, 2025RubyLLM 1.1.0rc1 is out with Bedrock support and other improvements2 points
- Nov 5, 2025RubyLLM 1.9.1: Rails Namespaces, Vertex AI Auth and Anthropic Uploads1 point
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- kortix-ai/suna★ 20ksame name
- cloudflare/cloudflare-docs★ 5.3ksame name
- GoogleCloudPlatform/cloud-foundation-fabric★ 2.1ksame name
- Dpro-at/Tel-Agent★ 1.1ksame name
- butterbase-ai/butterbase-skills★ 533same name
- ZaxbyHub/opencode-swarm★ 485same name
- GoogleCloudPlatform/race-condition★ 234same name
- Dqz00116/skill-lib★ 22same name
- wcollins/skills-and-specs-lab★ 3same name
- Pradnyeshp/Claude-Skills★ 2same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- rubyllmSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read AGENTS.md at the repo root first: it has the ground rules, the command table, and the architecture constraints that archspec check …
- Very specific: line 24
Run the fast loop while developing.
- Very specific: line 48
Add with_x to lib/ruby_llm/chat.rb (chainable, returns self).
- Very specific: line 49
Add the matching bare x class macro to lib/ruby_llm/agent.rb and add with_x and x to the delegate lists in Agent and …
- Very specific: line 53
Document it on the matching page in docs/_core_features/.
- Distinctive: line 57
Start with the public operation and its typed result.
- Distinctive: line 61
Test public behavior and protocol translation at their respective layers.
- Very specific: line 83
Document configuration in docs/_getting_started/configuration-providers.md.
- Very specific: line 91
Check Rails-version compatibility across the matrix: bundle exec appraisal rails-7.1 rspec through rails-8.1.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contributing to RubyLLM
Read AGENTS.md at the repo root first: it has the ground rules, the command table, and the architecture constraints that archspec check enforces. This skill adds the step-by-step recipes.
Choose the layer
The public API covers conversations (Chat, Message, Tool, Agent, structured output, streaming, and loop control) and individual operations (paint, animate, speak, transcribe, ocr, moderate, embed, rerank, judge, tokenize, and research). Both connect to services through providers and protocols: providers supply endpoints, authentication, catalogs, and protocol selection; protocols implement formats and their dialects.
Model resolution, configuration, accounting, instrumentation, batches, and provider resources support the framework as a whole. Keep independent operations independent of Chat. Rails integration adds Active Record, Active Storage, Hotwire, jobs, and generators around the same Ruby API; it does not define a second conversation API.
The fast loop
bundle exec rspec --tag ~live # unit tests only, no keys, seconds not minutes
bundle exec rspec spec/ruby_llm/chat_spec.rb:42 # one example
overcommit --run # what the commit hook will runRun the fast loop while developing. Run overcommit --run before declaring anything done: it runs RuboCop (auto-correct), Flay (duplication), archspec (architecture), and the unit suite, and the commit fails if any of them do.
Working with cassettes
Specs tagged :live replay recorded provider traffic from spec/fixtures/vcr_cassettes. The cassette name derives from the example's full description, so renaming an example orphans its cassette.
To re-record after changing request shapes:
rake vcr:record[openai] # deletes that provider's cassettes, reruns the suite
rake vcr:record[openai,anthropic] # several providers
rake vcr:record[all] # everything (long, needs many keys)Recording needs real API keys in .env. To re-record a single spec, delete its cassette file and run the spec with the provider's key set.
Rules that bite:
- A failing
:liveexample deletes its own cassette on purpose. Do not "fix" a red spec by restoring the cassette; fix the code, then re-record. - Review every new or changed cassette for leaked keys and personal data before committing. The pre-commit hook runs gitleaks, but eyes first.
- A spec that can neither replay (no cassette) nor record (no key) skips with a message naming the env var it needs. That is expected on a fork without keys.
Adding or changing a chat option
- Add
with_xtolib/ruby_llm/chat.rb(chainable, returnsself). - Add the matching bare
xclass macro tolib/ruby_llm/agent.rband addwith_xandxto the delegate lists inAgentandActiveRecord::ChatMethods. The delegation specs fail when they drift. - Thread the option through the
Providercontract, never by referencing a concrete provider or protocol fromChat. - Implement per protocol in
lib/ruby_llm/protocols/*(render_*for request payloads,parse_*for responses). - Spec it in
spec/ruby_llm/chat_<x>_spec.rb; add live coverage over the matrix inspec/support/models_to_test.rbwhen providers differ. - Document it on the matching page in
docs/_core_features/.
Working on an individual AI operation
- Start with the public operation and its typed result. Keep the shared RubyLLM names consistent across providers.
- Route service calls through the
Providercontract and registered protocols. Keep request rendering, response parsing, and format quirks in protocols. Let the provider reject what the model can't do: raise early only when the protocol cannot express the request, and don't copy provider limits or validate a successful response field by field. Do check the indices, IDs, and positions that map a response back onto the request. - Reuse model resolution, configuration, usage accounting, and instrumentation where applicable. Every billable attempt, including failed ones the provider billed, must reach
usage.ruby_llm. Preserve the operation's streaming or job lifecycle. - Test public behavior and protocol translation at their respective layers. Document the operation in its feature guide and keep its Getting Started example short.
Adding a provider
For smaller or emerging providers, ship a community gem instead of a core PR (the core bar is high, see CONTRIBUTING.md):
bundle exec ruby_llm provider-gem Acme --api-base https://api.acme.ai/v1That scaffolds a complete gem with specs and CI. For an approved core provider:
script/generate-provider acmeThen make it real:
lib/ruby_llm/providers/acme.rbdeclares auth, API base, and which protocols it speaks (protocol :chat_completions, ...). If the provider has its own wire format, that format is a new protocol underlib/ruby_llm/protocols/, not code inside the provider.- Replace the scaffold's example capabilities with the provider's real ones, and identify the model-catalog source.
- Register the provider in
lib/ruby_llm.rb(the entrypoint is the only place concrete providers get wired in). - Record cassettes covering normal chat and streaming chat at minimum.
- Document configuration in
docs/_getting_started/configuration-providers.md.
Rails work
- Rails specs run against the dummy app in
spec/dummy;acts_as_chatandacts_as_messagelive inlib/ruby_llm/active_record/. - The Rails integration builds on the domain layer and the
Providercontract only. It converts records withto_llm/from_llm; plain-Ruby objects never define those. - Preserve the Ruby conversation API on records, Active Storage attachment support, and the persisted message lifecycle used by Hotwire streaming and background jobs. Individual operations remain callable directly from Rails services and jobs.
- Generators live in
lib/generators/ruby_llm/(install, chat_ui, agent, tool, schema, provider, and upgrade when the last release changed the schema). Their specs are tagged:generatorand excluded from the pre-commit run; run them explicitly withbundle exec rspec --tag generator. - Check Rails-version compatibility across the matrix:
bundle exec appraisal rails-7.1 rspecthroughrails-8.1.
Docs work
- Pages live in
docs/under_getting_started,_core_features,_advanced, and_reference. Preview withdocs/bin/serve.sh. - Voice: Rails guides. Second person, present tense, show the code before explaining it, motivate each feature with the problem it solves in one sentence. No em dashes, no hype, no "simply".
- Lead with short, working public API examples. Show how features combine when it helps the reader build something. Keep the title, description, and "After reading this guide" opening; introduce concepts before adding a summary table.
- Front-matter
descriptionbecomes the page's llms.txt entry and social card text: one compelling sentence, no&,<, or>. - Cross-link with
{% link _collection/page.md %}, never hard-coded URLs. docs/_reference/available-models.md,lib/ruby_llm/models.json, andlib/ruby_llm/aliases.jsonare generated byrake models; never edit them.
Before opening the PR
overcommit --runpasses.- New behavior has specs; changed provider behavior has re-recorded cassettes, reviewed for secrets.
- Public API changes are documented in
docs/and have RDoc. - The PR does one thing, links its issue when there is one, and explains the problem before the solution.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

