tdd

Executes the Red-Green-Refactor cycle for projects with detected testing stacks.

Updated Jun 19, 2023
One-click install
npx skills add https://github.com/JeroenJochems/modelwise --skill tdd-jeroenjochems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/JeroenJochems/modelwise/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/JeroenJochems/modelwise --skill tdd-jeroenjochems

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill guides users through the Test-Driven Development (TDD) process, ensuring robust, well-tested code by writing tests before implementation.

Core Features & Use Cases

  • Guided TDD Cycle: Executes the Red-Green-Refactor cycle for various languages and frameworks.
  • Context Detection: Automatically identifies the project's testing stack (language, framework, conventions).
  • Refactoring Assistance: Integrates with /naming and /functions skills for code cleanup.
  • Use Case: When starting a new feature, activate this Skill to write a failing test, make it pass with minimal code, and then refactor both test and production code, ensuring high code quality and maintainability.

Quick Start

Use the tdd skill to implement a new user authentication feature in a Node.js/Jest project.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development involves writing a failing test first, implementing minimal code to make it pass, and then refactoring both test and production code for high quality and maintainability.

How do I start test-driven development for a new feature in my project?

To start test-driven development for a new feature, activate the tdd process to automatically detect your project's testing stack, write a failing test, and then write the minimal code required to make that test pass.

Does the tdd workflow support my specific testing framework and language conventions?

Yes, the tdd workflow automatically detects your project-specific testing stack, including the programming language, test framework, conventions, and tooling, ensuring the test-driven development cycle integrates seamlessly with your existing setup.

How does test-driven development integrate with code refactoring and naming conventions?

Test-driven development integrates with code refactoring by connecting to code quality skills for naming and function decomposition, allowing you to clean up and refactor both test and production code after achieving a passing test state.

When should I use test-driven development instead of writing tests after implementation?

Use test-driven development when starting a new feature to ensure robust, well-tested code by writing tests before implementation, guiding you to write minimal code and refactor afterward for better code quality and maintainability.

What are the limitations of using test-driven development for complex codebases?

The test-driven development cycle focuses on guiding the red-green-refactor process and detecting project testing stacks, but requires integration with separate code quality skills for advanced naming and function decomposition during complex refactoring tasks.