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 skills/dgalarza/claude-code-workflows/rspec-testingnpx skills add dgalarza/claude-code-workflows --skill rspec-testinggit clone --depth 1 https://github.com/dgalarza/claude-code-workflowsWhat 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.00068 | $0.03366 |
| Opus 5 | $0.00034 | $0.01683 |
| Sonnet 5 | $0.00014 | $0.00673 |
| Haiku 4.5 | $0.00007 | $0.00337 |
Grade A, and why
rspec-testing 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- rspec-testing — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 573 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RSpec Testing for Rails
Overview
Write comprehensive, maintainable RSpec tests following industry best practices. This skill combines guidance from Better Specs and thoughtbot's testing guides to produce high-quality test coverage for Rails applications.
Core Testing Principles
1. Test-Driven Development (TDD)
Follow the Red-Green-Refactor cycle:
- Red: Write failing tests that define expected behavior
- Green: Implement minimal code to make tests pass
- Refactor: Improve code while tests continue to pass
2. Test Structure (Arrange-Act-Assert)
Organize tests with clear phases separated by newlines:
it 'creates a new article' do
# Arrange - set up test data
user = create(:user)
attributes = {title: 'Test Article', body: 'Content here'}
# Act - perform the action
article = Article.create(attributes)
# Assert - verify the outcome
expect(article).to be_persisted
expect(article.title).to eq('Test Article')
end
3. Single Responsibility
Each test should verify one behavior. For unit tests, use one expectation per test. For integration tests, multiple expectations are acceptable when testing a complete flow.
4. Test Real Behavior
Avoid over-mocking. Test actual application behavior when possible. Only stub external services, slow operations, and dependencies outside your control.
Test Type Decision Tree
When to Write Model Specs
Use model specs (spec/models/) for:
- Validations
- Associations
- Scopes
- Instance methods
- Class methods
- Enums and constants
- Database constraints
Example:
# spec/models/article_spec.rb
RSpec.describe Article do
describe 'validations' do
it 'validates presence of title' do
article = build(:article, title: nil)
expect(article).not_to be_valid
expect(article.errors[:title]).to include("can't be blank")
end
end
describe 'associations' do
it { is_expected.to belong_to(:user) }
it { is_expected.to have_many(:comments) }
end
describe '#published?' do
it 'returns true when status is published' do
article = build(:article, status: :published)
expect(article.published?).to be true
end
end
end
What ships with it
2 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.
- 2d ago First seen · 573 lines · 68 tokens per session scan A cc42bdb55278
rspec-testing is a skill published in the GitHub repository dgalarza/claude-code-workflows (59 stars, last pushed 5d ago), licensed MIT. It adds 68 tokens to every session and 3,366 once invoked, about $0.0003 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 skills, from other repositories
run-helix-tests
Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.
ordering-and-flakes
Control spec ordering and manage flaky specs — Serial, Ordered containers with BeforeAll/AfterAll/ContinueOnFailure, OncePerOrdered, SpecPriority, plus FlakeAttempts/--flake-attempts, MustPassRepeatedly, --repeat, and --until-it-fails. Use when specs must run in a fixed order, you need once-per-group setup, you're…
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…
write-tests
Write failing tests from requirements. Invoke for each todo before /implement.
dart-add-unit-test
Write and organize unit tests for functions, methods, and classes using package:test. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.
nunit-testing
Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.