rails-tdd-slices

Installation
SKILL.md

Rails TDD Slices

Use this skill when the hardest part of the task is deciding where TDD should start.

Core principle: Start at the highest-value boundary that proves the behavior with the least unnecessary setup.

Quick Reference

Change type First spec Path Why
API contract, params, status code, JSON shape Request spec spec/requests/ Proves the real HTTP contract
Domain rule on a cohesive record or value object Model spec spec/models/ Fast feedback on domain behavior
Multi-step orchestration across collaborators Service spec spec/services/ Focuses on the workflow boundary
Enqueue/run/retry/discard behavior Job spec spec/jobs/ Captures async semantics directly
Critical Turbo/Stimulus or browser-visible flow System spec spec/system/ Use only when browser interaction is the real risk
Engine routing, generators, host integration Engine spec spec/requests/ or engine path Normal app specs miss engine wiring — see rails-engine-testing
Bug fix Reproduction spec Where the bug is observed Proves the fix and prevents regression
Unsure between layers Higher boundary first Easier to prove real behavior before drilling down
Related skills
Installs
20
GitHub Stars
16
First Seen
Mar 29, 2026