tdd

Automate Test-Driven Development cycles with failing tests before production code.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/AvatarGanymede/pcraft --skill tdd-avatarganymede
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/AvatarGanymede/pcraft/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/AvatarGanymede/pcraft --skill tdd-avatarganymede

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill implements Test-Driven Development (TDD) to streamline code changes and ensure comprehensive test coverage for bug fixes, new features, and any code modifications that require testing.

Core Features & Use Cases

  • Red-Green-Refactor Methodology: Ensures production code is written only after a failing test, fostering robust code with built-in test cases.
  • E2E and Unit Testing Support: Facilitates both end-to-end and unit testing, allowing developers to validate the integrity of their code across various layers.
  • Use Case: Ideal for a developer working on a bug fix, adding a new feature, or refactoring existing code without tests. It helps in writing tests first and then writing the necessary code.

Quick Start

Start the TDD process by writing a test that reproduces the bug you're addressing.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for bug fixes and new features?

To implement test-driven development for bug fixes and new features, start by writing a test that reproduces the bug or defines the feature, ensuring it fails before writing any production code. This enforces the Red-Green-Refactor methodology.

What is the Red-Green-Refactor methodology in test-driven development?

The Red-Green-Refactor methodology is a test-driven development cycle where you write a failing test first, create the minimum production code to make it pass, and then refactor the code. This ensures robust code with built-in test cases.

Can I use test-driven development for both unit and end-to-end testing?

Yes, test-driven development can be applied to both unit and end-to-end testing scenarios. It facilitates validating code integrity across various layers by requiring the appropriate test frameworks for each testing type.

When should I use test-driven development for refactoring existing code?

You should use test-driven development when refactoring existing code without tests to ensure comprehensive test coverage. Writing tests first validates that your modifications do not break existing functionality during the code change process.

Do I need specific test frameworks to start the test-driven development cycle?

Yes, you need established test frameworks for unit and end-to-end testing to start the test-driven development cycle. The process requires executing failing tests before writing production code to validate the integrity of your changes.

Why write a failing test before writing production code?

Writing a failing test before production code ensures that the test actually checks the intended logic and fosters robust code. It streamlines code changes by guaranteeing built-in test cases for bug fixes and new features.