tdd-refactor-phase

Automate the TDD refactoring phase by fixing code smells and enforcing naming conventions.

6|3|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/formio/ai --skill tdd-refactor-phase-formio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-refactor-phase
Source: https://github.com/formio/ai/tree/main/.cursor/skills/tdd-refactor-phase
Command: npx skills add https://github.com/formio/ai --skill tdd-refactor-phase-formio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the Refactor phase of TDD (Test-Driven Development) to improve code quality without changing behavior, ensuring all tests remain green.

Core Features & Use Cases

  • Code Smell Review: Identifies and fixes common code smells like duplication, long functions, and poor abstractions.
  • Conformance Checks: Ensures code adheres to project standards and software patterns as defined in CLAUDE.md.
  • Naming Standards: Improves code readability by enforcing clear and consistent naming conventions.
  • Use Case: Use this Skill after the Green phase is complete to clean up code and ensure it meets the project's standards without altering the functionality.

Quick Start

Run the tdd-refactor-phase skill to automatically review and refactor your code, ensuring it remains clean and adheres to best practices.

Frequently Asked Questions about tdd-refactor-phase

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

FAQPage Schema
How do I automate refactoring in TDD without breaking functionality?

Automating refactoring in TDD involves reviewing and fixing code smells while enforcing software patterns to improve code quality, ensuring all tests remain green and behavior stays unaltered.

What is the refactoring phase of TDD?

The TDD refactoring phase is the step after the Green phase where you clean up code, resolve smells like duplication and long functions, and improve naming conventions without changing external behavior.

When do I need to run TDD refactoring tasks?

You need TDD refactoring tasks after the Green phase is complete and tests pass, allowing you to safely clean up code and enforce project standards defined in CLAUDE.md.

How do I fix code smells like long functions and duplication?

Fixing code smells like long functions and duplication requires reviewing the codebase to identify poor abstractions, applying software patterns, and enforcing clear naming conventions to improve readability.

Does TDD refactoring alter software behavior during code cleanup?

TDD refactoring does not alter software behavior during code cleanup; it strictly improves internal code quality and enforces conformance checks while ensuring all existing tests remain green.

Can I enforce project coding standards and naming conventions automatically?

You can enforce project coding standards and naming conventions automatically by running a refactoring review that checks code against project standards defined in CLAUDE.md and improves readability.