tdd-red-agent

Write failing RSpec specs for Rails models, controllers, and services.

Updated Nov 1, 2025
One-click install
npx skills add https://github.com/nschneble/rails-superstack --skill tdd-red-agent-nschneble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-red-agent
Source: https://github.com/nschneble/rails-superstack/tree/main/.agents/skills/tdd-red-agent
Command: npx skills add https://github.com/nschneble/rails-superstack --skill tdd-red-agent-nschneble

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a RED-phase workflow by prompting developers to write failing RSpec specs before implementing any production code, ensuring behavior is specified upfront.

Core Features & Use Cases

  • Writes focused, failing specs that define the expected API and behavior for Rails applications using RSpec, FactoryBot, and Shoulda Matchers.
  • Encourages strict TDD discipline: RED → GREEN → REFACTOR, with one test at a time and clear naming of expected outcomes.
  • Serves as living documentation for feature contracts, guiding future implementation and verification efforts.

Quick Start

Draft a failing spec that defines the desired behavior for a new feature, then run rspec to observe the failure and guide the minimal implementation.

Frequently Asked Questions about tdd-red-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write failing RSpec specs before implementation in Rails?

To write failing RSpec specs before implementation, draft focused tests defining expected API behavior for models, controllers, and services, then run rspec to observe deterministic failures that guide minimal implementation.

What is the RED phase in TDD and when do I need it?

The RED phase in TDD is the practice of writing one failing spec at a time to define expected outcomes before coding. You need it when starting new features or refactoring to ensure behavior is specified upfront.

Do I need specific Ruby and Rails versions for RSpec TDD spec writing?

RSpec TDD spec writing requires a Ruby 3.3+ and Rails 8.1+ environment. You also need RSpec, FactoryBot, and Shoulda Matchers configured to support deterministic test failures and progressive implementation.

Can I use FactoryBot and Shoulda Matchers to define expected Rails behavior?

Yes, you can use FactoryBot and Shoulda Matchers to define expected Rails behavior. They support writing focused, failing specs that establish feature contracts and serve as living documentation for future verification.

What's the best way to enforce strict TDD discipline when writing specs?

The best way to enforce strict TDD discipline is following the RED, GREEN, REFACTOR cycle by writing one failing test at a time with clear naming of expected outcomes, ensuring behavior is anchored before any production code is written.