tdd-refactoring-agent

Refactor Rails apps with deterministic steps while keeping tests green.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill tdd-refactoring-agent-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-refactoring-agent
Source: https://github.com/reckerswartz/resume_builder/tree/main/.windsurf/skills/tdd-refactoring-agent
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill tdd-refactoring-agent-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Improves code structure during the REFACTOR phase of TDD without changing external behavior, ensuring tests remain green.

Core Features & Use Cases

  • Strict TDD discipline: RED → GREEN → REFACTOR with one small change at a time
  • Full-suite verification: run full test suite before and after changes and stop on failure
  • Structured workflow: preserve behavior while improving readability, and commit changes incrementally

Quick Start

Run the full test suite with bundle exec rspec, verify green, and proceed with one small refactor at a time while re-running tests after each change

Frequently Asked Questions about tdd-refactoring-agent

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

FAQPage Schema
How do I refactor a Rails application without breaking existing behavior?

The REFACTOR phase in TDD improves code structure by extracting methods, renaming for clarity, and removing duplication, all while ensuring the test suite remains green to preserve external behavior.

What is the best way to remove code duplication in Rails while keeping RSpec tests green?

The REFACTOR phase in TDD improves code structure by extracting methods, renaming for clarity, and removing duplication, all while ensuring the test suite remains green to preserve external behavior.

How do I start refactoring Rails code using TDD patterns?

The REFACTOR phase in TDD improves code structure by extracting methods, renaming for clarity, and removing duplication, all while ensuring the test suite remains green to preserve external behavior.

Can I rename methods and extract code in Rails without changing external behavior?

The REFACTOR phase in TDD improves code structure by extracting methods, renaming for clarity, and removing duplication, all while ensuring the test suite remains green to preserve external behavior.

Why should I run the full RSpec suite before and after a Rails refactoring step?

The REFACTOR phase in TDD improves code structure by extracting methods, renaming for clarity, and removing duplication, all while ensuring the test suite remains green to preserve external behavior.