test-driven-development

Drive development with failing-first tests and automated test suites.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures code correctness and prevents regressions by making tests the primary driver of development, turning assumptions into verifiable specifications rather than hopes.

Core Features & Use Cases

  • Fail-first workflow: Write a failing test before implementation to clearly define expected behavior.
  • Bug-proofing with the Prove-It Pattern: Reproduce reported bugs with tests, fix the bug, then verify the fix with the same test to prevent regressions.
  • Test pyramid guidance: Allocate effort across unit, integration, and E2E tests to balance speed and coverage.
  • Browser runtime verification: Combine unit tests with DevTools-based checks for UI bugs and visual regressions.
  • Use Case: When adding a new feature or fixing a bug, create a failing unit or integration test that demonstrates the expected behavior, implement the minimal change to pass the test, and refactor with confidence.

Quick Start

Write a failing test that reproduces the desired behavior or bug, confirm it fails, implement the minimal code to make the test pass, and run the full test suite to ensure no regressions.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I use test-driven development to fix an existing bug?

Test-driven development fixes bugs by reproducing the issue with a failing test, implementing the minimal code to pass the test, and running the suite to prevent regressions.

What is the fail-first workflow in test-driven development?

The fail-first workflow in test-driven development involves writing a failing test that defines expected behavior before writing any implementation, turning assumptions into verifiable specifications.

How should I balance unit testing, integration testing, and e2e testing?

You should balance unit testing, integration testing, and e2e testing by following test pyramid guidance, which allocates effort across test layers to optimize both execution speed and coverage.

Can I use test-driven development for browser-based UI bugs?

Yes, test-driven development supports browser runtime verification by combining unit tests with DevTools-based checks to verify UI bugs and visual regressions during development.

What's the best way to refactor code without causing regressions?

The best way to refactor without regressions is maintaining green tests while refactoring, using an existing automated test suite to guarantee that modifications do not alter expected behavior.

Do I need a specific test runner to apply test-driven development?

Yes, you need an automated test runner to run test suites, confirm initial failures, and verify that implementations and refactors keep all tests green without introducing regressions.