test-driven-development

Enforce the Red-Green-Refactor cycle for test-first development.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/miguelarcjr/shark-ai --skill test-driven-development-miguelarcjr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/miguelarcjr/shark-ai/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/miguelarcjr/shark-ai --skill test-driven-development-miguelarcjr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Addresses the problem of untested code by enforcing a test-first approach.

Core Features & Use Cases

  • Red-Green-Refactor workflow: write a failing test, implement minimal code to pass, then refactor.
  • Regression protection: ensure changes preserve behavior through maintained tests.
  • Collaboration-friendly: aligns team expectations for design and verification.

Quick Start

Write a failing test for the new feature, implement the minimal code to pass, and refactor.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the test-first approach in software engineering?

Test-driven development enforces the Red-Green-Refactor cycle to address untested code. It requires writing a failing test before any production code, implementing minimal code to pass, and refactoring only after all tests pass.

How do I start using TDD for feature development and bug fixes?

To start test-driven development, write a failing test for the new feature or bug fix, implement the minimal code required to pass the test, and then refactor the code while maintaining passing tests.

When should I use a test-first workflow for collaborative coding?

Use a test-first workflow during collaborative coding to align team expectations for design and verification. It ensures tests guide design decisions and provides regression protection when shared code is modified.

Does test-driven development prevent writing production code without tests?

Yes, test-driven development uses strict rules to prevent untested production code. It enforces that no production code is written without a failing test, ensuring minimal implementation and refactoring only after tests pass.

What are the limitations of strictly following the Red-Green-Refactor cycle?

The strict Red-Green-Refactor cycle requires writing minimal code to pass tests, which may initially slow down feature delivery. However, it ensures regression protection and maintains test coverage by preventing untested code changes.