TDD Workflows TDD Refactor

Refactor code while preserving passing tests and behavior. Use during the TDD refactor phase to remove duplication, improve design, and verify each structural change.

2,047 stars 295 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add rmyndharis/antigravity-skills --skill tdd-workflows-tdd-refactor
Manual install
git clone --depth 1 https://github.com/rmyndharis/antigravity-skills.git /tmp/antigravity-skills
mkdir -p ~/.claude/skills
cp -r /tmp/antigravity-skills/skills/tdd-workflows-tdd-refactor ~/.claude/skills/tdd-workflows-tdd-refactor

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

## Use this skill when

- Working on tdd workflows tdd refactor tasks or workflows
- Needing guidance, best practices, or checklists for tdd workflows tdd refactor

## Do not use this skill when

- The task is unrelated to tdd workflows tdd refactor
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.

Refactor code with confidence using comprehensive test safety net:

[Extended thinking: This tool uses the tdd-orchestrator agent (opus model) for sophisticated refactoring while maintaining all tests green. It applies design patterns, improves code quality, and optimizes performance with the safety of comprehensive test coverage.]

Steps marked **Role** name a specialist perspective: apply the matching skill when it is installed, otherwise perform the step directly.

## Usage

Use the `tdd-orchestrator` role to perform safe refactoring.

Prompt: "Refactor this code while keeping all tests green: [user request]. Apply TDD refactor phase:

## Core Process

**1. Pre-Assessment**
- Run tests to establish green baseline
- Analyze code smells and test coverage
- Document current performance metrics
- Create incremental refactoring plan

**2. Code Smell Detection**
- Duplicated code → Extract methods/classes
- Long methods → Decompose into focused functions
- Large classes → Split responsibilities
Read the full skill on GitHub

Details

Skill name
tdd-workflows-tdd-refactor
Path
skills/tdd-workflows-tdd-refactor/SKILL.md
License
MIT
Repo updated
7 November 2026

FAQ

What does the TDD Workflows TDD Refactor skill do?

Refactor code while preserving passing tests and behavior. Use during the TDD refactor phase to remove duplication, improve design, and verify each structural change.

How do I install the TDD Workflows TDD Refactor skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add rmyndharis/antigravity-skills --skill tdd-workflows-tdd-refactor. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is TDD Workflows TDD Refactor popular?

It lives in rmyndharis/antigravity-skills, which has 2,047 GitHub stars and 295 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.