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 ThibautBaissac/rails_ai_agents --skill testing-patternsgit 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/skills/thibautbaissac/rails_ai_agents/testing-patterns)<a href="https://agentmods.dev/skills/thibautbaissac/rails_ai_agents/testing-patterns"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/testing-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/thibautbaissac/rails_ai_agents/testing-patterns"><img src="https://agentmods.dev/badge/skills/thibautbaissac/rails_ai_agents/testing-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.00077 | $0.01375 |
| Opus 5 | $0.00039 | $0.00687 |
| Sonnet 5 | $0.00015 | $0.00275 |
| Haiku 4.5 | $0.00008 | $0.00137 |
Grade A, and why
testing-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 8d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- testing-patterns — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert Rails testing architect specializing in Minitest with fixtures.
Your role
- Write tests using Minitest, never RSpec
- Use fixtures for test data, never factories (FactoryBot)
- Write integration tests over unit tests when possible
- Output: Fast, readable tests that verify behavior, not implementation
Core philosophy
Minitest is plenty. Fixtures are faster.
Why Minitest: Plain Ruby (no DSL), faster suite, simpler setup, part of Rails, easier to debug.
Why fixtures: 10-100x faster (loaded once), shared consistency, force realistic data, no factory DSL.
Test pyramid:
- Few system tests (Capybara, full browser)
- Many integration tests (controller + model)
- Some unit tests (complex model logic only)
Project knowledge
Tech Stack: Minitest 5.20+, Rails 8.2, YAML fixtures
Location: test/models/, test/controllers/, test/system/, test/integration/
Commands
bin/rails test-- Full suitebin/rails test test/models/card_test.rb-- Specific filebin/rails test test/models/card_test.rb:14-- Specific linebin/rails test:system-- System testsbin/rails test:parallel-- Parallel execution
Model test structure
require "test_helper"
class CardTest < ActiveSupport::TestCase
setup do
@card = cards(:logo)
@user = users(:david)
Current.user = @user
Current.account = @card.account
end
teardown do
Current.reset
end
test "fixtures are valid" do
assert @card.valid?
end
test "closing card creates closure record" do
assert_difference -> { Closure.count }, 1 do
@card.close(user: @user)
end
assert @card.closed?
assert_equal @user, @card.closed_by
end
test "open scope excludes closed cards" do
@card.close
assert_not_includes Card.open, @card
assert_includes Card.closed, @card
end
end
Integration test structure
require "test_helper"
class CardsControllerTest < ActionDispatch::IntegrationTest
setup do
@card = cards(:logo)
sign_in_as users(:david)
end
test "should create card" do
assert_difference -> { Card.count }, 1 do
post board_cards_path(@card.board), params: {
card: { title: "New card", column_id: @card.column_id }
}
end
assert_redirected_to card_path(Card.last)
end
test "requires authentication" do
sign_out
get card_path(@card)
assert_redirected_to new_session_path
end
end
What ships with it
3 files 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.
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.
- 8d ago First seen · 211 lines · 77 tokens per session scan A b46bcdfc137a
testing-patterns is a skill published in the GitHub repository ThibautBaissac/rails_ai_agents (661 stars, last pushed 3mo ago), licensed MIT. It adds 77 tokens to every session and 1,375 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
server-side-calls
Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.
mem0-test-integration
Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…
prowler-test-api
Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).
python-sdk
Implement or modify Python SDK behavior under python/composio, including tools, toolkits, sessions, auth configs, connected accounts, client integration, and shared Python models. Use for Python core runtime/API work; pair with python-testing and cross-sdk-parity when TypeScript must match.
convex-test
Generate convex-test tests for the app's Convex functions.
voiden
Create and edit Voiden .void files for API testing. Covers the .void file format and all enabled extension block types.