tdd

Guide developers through the Red-Green-Refactor cycle with test coverage verification.

Updated Nov 8, 2016
One-click install
npx skills add https://github.com/jscriptcoder/jshack.me --skill tdd-jscriptcoder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/jscriptcoder/jshack.me/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/jscriptcoder/jshack.me --skill tdd-jscriptcoder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) workflow, ensuring all code changes are preceded by failing tests and followed by verification, leading to more robust and maintainable software.

Core Features & Use Cases

  • Enforces TDD: Guides users through the Red-Green-Refactor cycle for every code modification.
  • Coverage Verification: Mandates and details the process for verifying 100% test coverage.
  • Commit History Standards: Defines expectations for commit messages and PR descriptions to reflect TDD progress.
  • Use Case: When developing a new feature, you will first write a test that fails, then write the minimum code to make it pass, and finally refactor the code while ensuring all tests remain green.

Quick Start

Follow the TDD Red-Green-Refactor cycle for all code changes.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement the Red-Green-Refactor cycle for my development workflow?

The Red-Green-Refactor cycle mandates writing a failing test first, implementing the minimum code to pass it, and then refactoring while ensuring tests stay green. This enforces rigorous test-driven development for all code modifications.

What is test-driven development and how does it improve code quality?

Test-driven development is a methodology where failing tests precede code implementation, followed by verification and refactoring. It improves code quality by ensuring robust, maintainable software through strict test coverage and structured commit history evidence.

Does test-driven development require 100% test coverage verification?

Yes, test-driven development requires 100% test coverage verification. The workflow mandates detailing the verification process to ensure all code modifications are fully tested before proceeding to the refactoring stage.

What's the best way to structure commit history when practicing TDD?

The best way to structure commit history for TDD is defining commit messages and PR descriptions that explicitly reflect Red-Green-Refactor progress. This provides clear evidence of test coverage and development workflow milestones.

When should I not use the TDD methodology for code modifications?

You should not use TDD when modifying code where writing failing tests beforehand is unfeasible or when strict 100% test coverage cannot be verified. The methodology mandates rigorous test creation and verification for all changes.