rails-tdd-slices
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 |
More from midudev/autoskills
bun
Use when building, testing, and deploying JavaScript/TypeScript applications. Reach for Bun when you need to run scripts, manage dependencies, bundle code, or test applications with a single unified tool.
19react-hook-form
React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, and useFieldArray. This skill should be used when building client-side controlled forms with React Hook Form library. This skill does NOT cover React 19 Server Actions, useActionState, or server-side form handling (use react-19 skill for those).
15pydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
13prisma-postgres
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
12nestjs-best-practices
NestJS best practices and architecture patterns for building production-ready applications. This skill should be used when writing, reviewing, or refactoring NestJS code to ensure proper patterns for modules, dependency injection, security, and performance.
12flutter-animations
>-
11