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 instructions/crmne/ruby_llm/agents-mdgit clone --depth 1 https://github.com/crmne/ruby_llmWhat 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.01410 | $0.01410 |
| Opus 5 | $0.00705 | $0.00705 |
| Sonnet 5 | $0.00282 | $0.00282 |
| Haiku 4.5 | $0.00141 | $0.00141 |
Grade A, and why
ruby_llm AGENTS.md 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 2d 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 — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for coding agents working on RubyLLM. Humans welcome too; start with CONTRIBUTING.md for the contribution policy, then come back here for the mechanics.
What this is
RubyLLM is a Ruby AI framework: chat, tools, agents, structured output, embeddings, images, video, audio, and Rails integration behind one API, with seventeen providers in the box. Plain Ruby (>= 3.1.3), a handful of small dependencies, no heavyweight abstractions.
Ground rules
- New features need an approved GitHub issue before any code. PRs without one get closed without review.
- Never edit generated files:
lib/ruby_llm/models.json,lib/ruby_llm/aliases.json,docs/_reference/available-models.md.rake modelsregenerates them. - Never invent model ids. Every model name in code, specs, and docs must be a real, callable model.
- Keep diffs small and focused. No drive-by refactors, no style sweeps outside the lines you touch.
- Plain commit messages that describe the change. No "Generated with" footers, no Co-Authored-By tags.
Setup
bundle install
overcommit --install # required: installs the git hooks that gate every commit
Commands
| Command | What it does |
|---|---|
bundle exec rspec --tag ~live |
Fast unit run. No API keys, no cassettes needed. |
bundle exec rspec spec/ruby_llm/chat_spec.rb:42 |
One example. |
bundle exec rake test |
Full suite through rspec-queue, like CI. |
overcommit --run |
Everything the pre-commit hook runs: RuboCop, Flay, archspec, RSpec. |
bundle exec rubocop |
Lint (auto-corrects on commit). |
bundle exec archspec check |
Architecture rules from Archspec.rb. |
bundle exec appraisal rails-8.0 rspec |
Rails version matrix (7.1 through 8.1, see Appraisals). |
docs/bin/serve.sh |
Docs preview at localhost:4002. |
Testing
- Specs tagged
:livetalk to provider APIs through VCR cassettes inspec/fixtures/vcr_cassettes. Everything else is a plain unit test. - Cassette names derive from the example's full description. A failing
:liveexample deletes its cassette on purpose, so the next run hits the real API instead of replaying a recording that may be hiding the bug. - Re-record cassettes with
rake vcr:record[openai,anthropic]orrake vcr:record[all](needs real API keys in.env). - Check cassettes for leaked keys before committing.
bin/gitleaks-stagedruns in the pre-commit hook and CI runs gitleaks again. - Rails specs run against the dummy app in
spec/dummy. Generator specs are tagged:generatorand excluded from the pre-commit run because they are slow. spec/support/models_to_test.rbdefines the provider and model matrix the live specs iterate over.
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.
- 2d ago First seen · 72 lines · 1,410 tokens per session scan A 811868a9f286
ruby_llm AGENTS.md is an instructions file published in the GitHub repository crmne/ruby_llm (4,327 stars, last pushed 4d ago), licensed MIT. It adds 1,410 tokens to every session, about $0.0070 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-08-30.
Other instructions, from other repositories
langgraph AGENTS.md
Instructions for langchain-ai/langgraph, covering agents instructions, corridor security analysis, libraries and dependency map.
gptme AGENTS.md
Instructions for gptme/gptme, covering agent instructions for gptme, git workflow, code style, testing and project structure.
AstrBot copilot-instructions.md
Copilot instructions for AstrBotDevs/AstrBot, covering astrbot development instructions, working effectively, bootstrap and install dependencies, running the application and dashboard build (vue.js/node.js).
chatgpt-cli CLAUDE.md
Instructions for kardolus/chatgpt-cli, covering chatgpt-cli — release runbook, prerequisites, 1. cut the release, 2. publish the github release + binaries and 3. update the homebrew tap.
codexia AGENTS.md
Instructions for milisp/codexia, covering agents.md, project info, project tech, common commands and project structure.
rikkahub AGENTS.md
AGENTS.md instructions for rikkahub/rikkahub, covering repository guidelines, project overview, build, test, and development commands, module structure and concepts.