test-first

Enforce test-driven development by writing tests before implementation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/astrosteveo/system-info-api --skill test-first
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-first
Source: https://github.com/astrosteveo/system-info-api/tree/main/.claude/skills/test-first
Command: npx skills add https://github.com/astrosteveo/system-info-api --skill test-first

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces test-driven development methodology. Write tests before implementation, run them to confirm failure, implement to make them pass. Use when writing new code, adding features, or fixing bugs. Automatically activates during code implementation tasks.

Core Features & Use Cases

  • Write tests first to define expected behavior before writing code.
  • Run tests to verify failure, then implement to pass and iterate safely.
  • Prevent regression by keeping tests as the source of truth during changes.

Quick Start

Provide a code task and I will write tests first, then implement the minimal code to make them pass.

Frequently Asked Questions about test-first

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

FAQPage Schema
How do I enforce test-driven development when writing new code or fixing bugs?

Test-driven development is enforced by writing tests first to define expected behavior, running them to confirm failure, then implementing minimal code to pass. This red-green-refactor workflow guards against regressions during features, bug fixes, and refactors.

What is the red-green-refactor workflow in TDD?

The red-green-refactor workflow in TDD involves writing a failing test first (red), implementing the minimal code to make it pass (green), and then cleaning up the implementation without changing behavior (refactor). This ensures tests drive the design.

How do I make sure my new tests match existing test conventions in a project?

To match existing test conventions, the TDD process reads existing tests within the project to learn its specific patterns and styles before writing new ones. This ensures newly written tests follow established conventions.

Can I use test-driven development for refactoring existing code safely?

Test-driven development can be used for refactoring existing code safely by keeping tests as the source of truth. The workflow applies to refactoring tasks, ensuring tests drive changes and prevent regressions while improving code quality.

When should I not use test-driven development for code changes?

Test-driven development might not suit exploratory spikes or throwaway prototypes where immediate behavior validation is unnecessary. It is designed for structured new features, bug fixes, and refactors where regression protection and defined behavior are required.