unit-tests

Guide teams through red-green-refactor cycles with test-driven development techniques.

Updated Aug 2, 2025
One-click install
npx skills add https://github.com/czer323/d3-item-salvager --skill unit-tests-czer323
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-tests
Source: https://github.com/czer323/d3-item-salvager/tree/main/.claude/skills/unit-tests
Command: npx skills add https://github.com/czer323/d3-item-salvager --skill unit-tests-czer323

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skill helps teams adopt Test-Driven Development by guiding the process of writing tests before implementation across multiple project types and languages, reducing defects and enabling safer refactors.

Core Features & Use Cases

  • Provides a structured TDD workflow (RED-GREEN-REFACTOR) with practical examples and guidance.
  • Includes step-by-step patterns for unit, integration, and legacy-code testing, plus example test templates and best practices to improve test coverage and code quality.
  • Use case: you are implementing a new feature or fixing a bug and want to drive design via tests before writing production code.

Quick Start

Create a failing test first, implement the minimal code to pass, and then refactor while keeping all tests green.

Frequently Asked Questions about unit-tests

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

FAQPage Schema
How do I start test-driven development for a new feature?

Test-driven development starts by creating a failing test, implementing the minimal code to pass, and then refactoring while keeping all tests green. This RED-GREEN-REFACTOR workflow drives feature design and reduces defects before production code is written.

What is the best way to apply TDD when fixing a bug in legacy code?

Applying TDD to legacy code involves writing a test that reproduces the specific bug before modifying the code. This step-by-step pattern guides teams safely through the red-green-refactor cycle, ensuring reproducible fixes and maintainable software quality in complex codebases.

Does test-driven development work for both unit and integration testing?

Test-driven development works across unit, integration, and legacy-code scenarios. The workflow provides step-by-step patterns, example test templates, and testing conventions to guide teams through the red-green-refactor cycle, ensuring reproducible coverage for multiple test scopes.

How does writing tests first improve software quality and refactoring safety?

Writing tests first improves quality by driving feature design through a structured RED-GREEN-REFACTOR cycle. This workflow enforces concrete testing conventions and best practices, reducing defects and enabling safer code refactors by maintaining a green test suite.

Can I use pytest conventions and templates for test-driven development workflows?

You can apply test-driven development using pytest conventions, as the workflow provides example test templates and best practices. It enforces a concrete workflow with step-by-step patterns to ensure reproducible and maintainable software quality across different languages.