TDD Retrofit

Audit, classify, and rewrite confirmation-style tests into specification-first TDD tests.

3|1|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/nashgao/mqtt-client --skill tdd-retrofit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TDD Retrofit
Source: https://github.com/nashgao/mqtt-client/tree/main/.claude/skills/tdd/retrofit
Command: npx skills add https://github.com/nashgao/mqtt-client --skill tdd-retrofit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill transforms existing, low-quality test suites into robust, specification-first tests, uncovering hidden bugs and improving overall code reliability.

Core Features & Use Cases

  • Test Audit & Classification: Analyzes tests to identify "confirmation" (brittle) vs. "specification" (robust) tests.
  • Coverage Gap Analysis: Identifies untested code paths and edge cases.
  • Bug Discovery: Uncovers production bugs masked by confirmation tests.
  • Test Rewriting: Converts confirmation tests to specification tests and adds missing tests.
  • Use Case: Refactor a legacy PHP project's test suite to ensure critical business logic is covered by reliable, maintainable tests, preventing regressions.

Quick Start

Run the TDD retrofit skill on the entire tests directory.

Frequently Asked Questions about TDD Retrofit

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

FAQPage Schema
How do I refactor existing test suites to uncover hidden production bugs?

Test audits classify existing tests into confirmation-style and specification-style categories. Confirmation tests are brittle and verify implementation details, while specification tests validate desired behavior robustly, ensuring maintainable code.

How do I fix low test quality and masked bugs in a legacy project?

Coverage gap analysis identifies untested code paths and edge cases within your existing test suite. By finding these missing tests, you ensure critical business logic is covered, preventing future regressions and improving maintainability.

Can I retrofit tests for a legacy PHP project to ensure critical business logic is covered?

Test rewriting converts brittle confirmation tests into specification tests that validate behavior rather than implementation details. This ensures tests accurately reflect desired outcomes, improving reliability and uncovering hidden coupling.

What is the difference between confirmation tests and specification tests in test automation?

Coverage gap analysis identifies untested code paths and edge cases within existing test suites. By finding these missing tests, you ensure critical business logic is covered, preventing future regressions and improving maintainability.