test-driven-development

Enforce red-green-refactor cycles with mandatory failing tests before implementation.

38|12|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/databrickslabs/coding-agents-databricks-apps --skill test-driven-development-databrickslabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/databrickslabs/coding-agents-databricks-apps/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/databrickslabs/coding-agents-databricks-apps --skill test-driven-development-databrickslabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of shipping untested, buggy production code by enforcing a disciplined test-first workflow that catches edge cases and regressions before they reach deployment.

Core Features & Use Cases

  • Mandatory Red-Green-Refactor Cycle: Requires writing and verifying a failing test before any production code is written, with no exceptions for "simple" changes to prevent rationalized shortcuts.
  • Testing Anti-Pattern Guidance: Includes a dedicated reference for avoiding common test mistakes like testing mock behavior, adding test-only methods to production code, and writing incomplete mocks that create false confidence.
  • Verification Guardrails: Provides a pre-completion checklist, red flags to stop and restart work, and rebuttals to common rationalizations like "I'll test later" or "deleting work is wasteful".
  • Use Case: When fixing a bug where empty email addresses are accepted in a user signup form, use this Skill to first write a failing test that validates email requirements, then implement the minimal validation code to pass the test, ensuring the fix works without breaking existing functionality.

Quick Start

Use the test-driven-development skill to write a failing test for the new payment processing feature before writing any implementation code.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce test-driven development to prevent untested production code?

Test-driven development prevents untested production code by enforcing a strict red-green-refactor cycle where you must write and verify a failing test before implementing any feature, bug fix, or refactoring change.

What is the red-green-refactor cycle for automated testing?

The red-green-refactor cycle requires writing a failing test first, writing the minimal production code to pass that test, and then refactoring. This workflow eliminates untested code and reduces post-deployment bugs.

How do I avoid testing anti-patterns when writing automated tests?

Avoid testing anti-patterns by not testing mock behavior, avoiding test-only methods in production code, and preventing incomplete mocks. Testing mock behavior creates false confidence instead of verifying actual functionality.

Can I skip writing a failing test for simple bug fixes and refactoring tasks?

No, test-driven development requires mandatory test failure verification before implementation for all tasks with no exceptions for simple changes. This prevents rationalized shortcuts like testing later or skipping tests for trivial fixes.

What's the best way to fix a bug using test-first development workflows?

Fix bugs using test-first development by writing a failing test that validates the expected behavior, implementing the minimal code to pass the test, and verifying the fix works without breaking existing functionality through automated testing.

Why does test-driven development require verifying test failure before implementation?

Verifying test failure before implementation ensures the test actually catches the bug or missing feature. Without failure verification, you risk writing tests that pass regardless of code correctness, creating false confidence in untested production code.