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 ag0os/rails-dev-plugin --skill rails-testing-patternsgit clone --depth 1 https://github.com/ag0os/rails-dev-pluginWrote 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/ag0os/rails-dev-plugin/rails-testing-patterns)<a href="https://agentmods.dev/skills/ag0os/rails-dev-plugin/rails-testing-patterns"><img src="https://agentmods.dev/badge/skills/ag0os/rails-dev-plugin/rails-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/ag0os/rails-dev-plugin/rails-testing-patterns"><img src="https://agentmods.dev/badge/skills/ag0os/rails-dev-plugin/rails-testing-patterns.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.00076 | $0.01049 |
| Opus 5.5 | $0.00030 | $0.00420 |
| Sonnet 5.5 | $0.00015 | $0.00210 |
| Haiku 4.5 | $0.00008 | $0.00105 |
Grade A, and why
rails-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 1mo 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rails Testing Patterns
Use standard RSpec and Minitest conventions for syntax, assertions, matchers, and Capybara DSL. This skill focuses on opinionated choices — what to test, which framework to use, and how to structure test data.
See patterns.md for decision guidance and non-obvious patterns.
Test Type Decision Matrix
| Test Type | When to Write | Speed | ROI Notes |
|---|---|---|---|
| Unit (Model) | Business logic, validations, scopes, custom methods | Fast | Highest ROI — write first wherever models or services carry non-trivial logic |
| Request | API endpoints, auth flows, param handling | Medium | Highest ROI on the api delivery axis; prefer over controller specs in RSpec |
| Integration | Multi-step workflows spanning controllers | Medium | Valuable on the html delivery axis — exercises the full request/render cycle |
| System | Critical user journeys only (sign-up, checkout, onboarding) | Slow | Limit to 10-20 per app; never test CRUD forms with system tests |
| Mailer | Non-trivial email content, conditional delivery | Fast | Skip if mailer is just a default scaffold |
| Job | Idempotency, retry behavior, side effects | Fast | Always test jobs that touch external services |
Framework, Data, and Directory
Test framework, data strategy, and directory are orthogonal project facts, not architecture choices. A project with extracted service objects can use Minitest; an omakase app can use RSpec. Read them from the project-conventions fingerprint (Testing category) — framework (Minitest/RSpec), data (fixtures/factories), directory (test/ vs spec/). Never infer the framework from architecture.
Test emphasis does vary by Axis B — delivery:
| Delivery | First tests to write | System tests |
|---|---|---|
html |
Integration tests for key flows | Yes, for critical user journeys |
api |
Request specs | No — request specs cover it |
Anti-Patterns
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.
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.
- 1mo ago First seen · 88 lines · 76 tokens per session scan A 6c0fececfe3d
rails-testing-patterns is a skill published in the GitHub repository ag0os/rails-dev-plugin (5 stars, last pushed 4mo ago), licensed MIT. It adds 76 tokens to every session and 1,049 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-08-31.
Other skills, from other repositories
rspec-conventions
Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…
testunit-skill
Generates Test::Unit tests in Ruby. Classic xUnit-style testing with assert methods and test case classes. Use when user mentions "Test::Unit", "assertequal Ruby", "Ruby test-unit". Triggers on: "Test::Unit", "Ruby test-unit", "assertequal Ruby" (not RSpec).
rspec
RSpec testing best practices for Ruby and Rails applications, covering test organization, data management, and isolation patterns.
ruby
Ruby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby applications.
ruby-rails
Use this skill when building Ruby on Rails applications — MVC, ActiveRecord, service objects, API mode, background jobs, and testing. This skill enforces: thin controllers, service objects for business logic, ActiveRecord query best practices, Rails API mode conventions, and RSpec testing patterns. Requires Rails 7+…
test-service
Use when writing RSpec for a service object under spec/services/. Test the public .call contract. Trigger words: service spec, test service object, spec/services.