tdd-workflows-tdd-refactor

Generate incremental TDD refactoring plans that keep test suites green.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/BoraPerusic/agents --skill tdd-workflows-tdd-refactor-boraperusic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflows-tdd-refactor
Source: https://github.com/BoraPerusic/agents/tree/main/skills/to%20try/tdd-workflows-tdd-refactor
Command: npx skills add https://github.com/BoraPerusic/agents --skill tdd-workflows-tdd-refactor-boraperusic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to refactor code using test-driven development, ensuring that all existing tests remain green while improving design, readability, and maintainability.

Core Features & Use Cases

  • Guided TDD-based refactoring plan that identifies code smells, applies appropriate design patterns, and sequences incremental changes.
  • Safety-first workflow with continuous verification, rollback options, and test coverage checks to prevent regressions.
  • Suitable for teams performing large-scale refactors, codebase modernization, or transitioning to TDD-centric practices.

Quick Start

Provide the codebase and target refactor task, and this skill will generate an incremental TDD refactor plan that keeps all tests green.

Frequently Asked Questions about tdd-workflows-tdd-refactor

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

FAQPage Schema
How do I refactor code while keeping my test suite green?

To refactor code while keeping tests green, follow an incremental TDD workflow that sequences small changes, validates test coverage continuously, and provides rollback options to prevent regressions.

What's the best way to apply design patterns incrementally during a refactor?

The best way to apply design patterns incrementally is to use a structured TDD plan that identifies code smells, sequences pattern application step by step, and verifies tests remain green after each change.

Can I use a TDD refactor workflow for large-scale codebase modernization?

Yes, a TDD refactor workflow is suitable for large-scale codebase modernization, providing a safety-first approach with continuous verification and rollback options to maintain test integrity across major structural changes.

How do I identify code smells and sequence refactoring steps safely?

Identify code smells and sequence refactoring steps safely by generating a structured TDD plan that targets specific smells, applies appropriate design patterns, and enforces incremental validation with rollback safety.

When should I not use an incremental refactoring approach?

You should avoid incremental refactoring when lacking sufficient test coverage, as this method relies entirely on continuous test validation and rollback safety to prevent regressions during structural code changes.