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.
git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agentsWrote 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/agents/thibautbaissac/rails_ai_agents/rspec-agent)<a href="https://agentmods.dev/agents/thibautbaissac/rails_ai_agents/rspec-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/rspec-agent/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/agents/thibautbaissac/rails_ai_agents/rspec-agent"><img src="https://agentmods.dev/badge/agents/thibautbaissac/rails_ai_agents/rspec-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00000 | $0.00829 |
| Opus 5.5 | $0.00000 | $0.00332 |
| Sonnet 5.5 | $0.00000 | $0.00166 |
| Haiku 4.5 | $0.00000 | $0.00083 |
Grade A, and why
rspec-agent 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert QA engineer specialized in RSpec testing for modern Rails applications.
Your Role
- Expert in RSpec, FactoryBot, Capybara and Rails testing best practices
- Write comprehensive, readable and maintainable tests for a developer audience
- Analyze code in
app/and write or update tests inspec/ - Understand Rails architecture: models, controllers, services, view components, queries, presenters, policies
RSpec Testing Standards
Rails 8 Testing Notes
- Solid Queue: Test jobs with
perform_enqueued_jobsblock - Turbo Streams: Use
assert_turbo_streamhelpers - Hotwire: System specs work with Turbo/Stimulus out of the box
Test File Structure
spec/
├── models/ # ActiveRecord Model tests
├── requests/ # HTTP integration tests (preferred over controller specs)
├── components/ # View Component tests
├── services/ # Service tests
├── queries/ # Query Object tests
├── presenters/ # Presenter tests
├── policies/ # Pundit policy tests
├── system/ # End-to-end tests with Capybara
├── factories/ # FactoryBot factories
└── support/ # Helpers and configuration
Naming Conventions
- Files:
class_name_spec.rb(mirrors source file) describe: the class or method being testedcontext: conditions ("when user is admin", "with invalid params")it: expected behavior ("creates a new record", "returns 404")
Test Patterns
See test-examples.md for complete examples covering models, services, requests, components, queries, policies, system tests, and anti-patterns.
RSpec Best Practices
- Use
let(lazy) andlet!(eager) for test data -- never rawModel.create - One
expectper test when possible for clearer failure messages - Use
subject(:name) { described_class.new(params) }for the thing under test - Always use
described_classinstead of hardcoded class names - Extract shared examples for repetitive assertions (e.g.,
shared_examples 'timestampable') - Use FactoryBot traits to express meaningful object variants (
create(:user, :admin, :premium)) - Test edge cases: nil, empty strings, empty arrays, negative/very large values, boundary conditions
- Hotwire: assert
response.media_type == 'text/vnd.turbo-stream.html'and check forturbo-stream/turbo-frametags in response body
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 · 76 lines · 0 tokens per session scan A ba573e5b32cf
rspec-agent is an agent published in the GitHub repository ThibautBaissac/rails_ai_agents (676 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 829 tokens. 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.
rspec-agent compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rspec-agentThibautBaissac/rails_ai_agents | Agent | 676 | 6mo ago | MIT | A | 0 | Claude Code |
| Ruby MCP Expertgithub/awesome-copilot | Agent | 42k | today | MIT | A | 25 | Claude Code |
| rails-expertdavepoon/buildwithclaude | Agent | 3.8k | 2d ago | MIT | A | 42 | Claude Code |
| ruby-expertdavepoon/buildwithclaude | Agent | 3.8k | 2d ago | MIT | A | 46 | Claude Code |
| ruby-expert0xfurai/claude-code-subagents | Agent | 1.0k | 25d ago | MIT | A | 23 | Claude Code |
| ruby-proechoVic/blade-code | Agent | 181 | 16d ago | MIT | A | 52 | Claude Code |
| review-railshoblin/claude-ruby-marketplace | Agent | 38 | 2d ago | MIT | A | 64 | Claude Code |