Skip to content

Structured guide of 42 test-driven development rules for red-green-refactor workflow and test design.

CCM score
49 of 100
skills.sh installs
428
GitHub stars
228
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the red-green-refactor cycle plus test design, isolation, data, assertions, organization, performance, and strategy across 8 prioritized categories
  • Lists rule identifiers by category, such as cycle-write-test-first and design-aaa-pattern, with per-rule reference files for detailed examples
  • Enforces practices like writing the test before implementation, one logical assertion per test, and mocking external dependencies
  • Designed for AI agents and LLMs writing, refactoring, or reviewing test suites; Vitest and MSW specifics are handled by separate skills

Install

$ npx -y skills add pproenca/dot-skills --skill tdd -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Community Test-Driven Development Best Practices

Comprehensive guide to Test-Driven Development practices, designed for AI agents and LLMs. Contains 42 rules across 8 categories, prioritized by impact to guide test writing, refactoring, and code generation.

When to Apply

Reference these guidelines when:

  • Writing new tests using TDD workflow
  • Implementing the red-green-refactor cycle
  • Designing test structure and organization
  • Creating test data and fixtures
  • Reviewing or refactoring existing test suites

TDD Workflow

  1. RED: Write a failing test that defines desired behavior
  2. GREEN: Write minimal code to make the test pass
  3. REFACTOR: Clean up code while keeping tests green
  4. Repeat for each new behavior

Rule Categories by Priority

Details

Repository
github.com/pproenca/dot-skills
Category
Testing & QA
First seen
Jun 3, 2026

Questions

What does the tdd skill do for an AI agent?

The tdd skill guides an AI agent through test-driven development, following the red-green-refactor cycle: write a failing test, write minimal code to pass it, then refactor while keeping tests green. It covers test design, isolation, test data, assertions, organization, performance and test strategy, with 42 rules across 8 categories. It does not cover Vitest framework specifics or MSW API mocking, which have their own skills.

How do I install the tdd skill?

Run npx -y skills add pproenca/dot-skills --skill tdd -y in your project to install it. Once installed, the agent applies the TDD guidelines when you ask it to write tests first, design tests before implementation, or review test-first approaches.

Which skills lead the Testing & QA category alongside tdd?

Within Testing & QA, tdd sits alongside migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. This skill is the one focused on the red-green-refactor methodology itself, rather than on a specific test framework.

More from pproenca/dot-skills

All 100

Similar to Tdd

More Testing & QA