Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pproenca avatar

Tdd

  • 352 installs
  • 191 repo stars
  • Updated July 24, 2026
  • pproenca/dot-skills

tdd is an Agent Skills workflow that guides developers through vertical-slice red-green-refactor cycles so each feature gains behavior-focused integration tests before and during implementation.

About

tdd is an Agent Skills workflow from pproenca/dot-skills for developers who want test-first feature work using the red-green-refactor loop instead of bolting on tests after code ships. The skill enforces vertical tracer bullets—one failing test, minimal passing code, repeat—and rejects horizontal slicing where all tests are written before any implementation. It bundles 5 reference guides on integration tests, system-boundary mocking, interface design, deep modules, and refactor candidates, with TypeScript examples that verify behavior through public APIs only. A 4-phase workflow covers planning with user approval, a tracer-bullet proof, incremental red-green cycles, and post-green refactoring guarded by a 5-item checklist per cycle. Developers reach for tdd when building features or fixing bugs where regressions matter, when they mention red-green-refactor or test-first development, or when agents need guardrails against implementation-coupled mocks.

  • tdd

Tdd by the numbers

  • 352 all-time installs (skills.sh)
  • +8 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #1,155 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pproenca/dot-skills --skill tdd

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs352
repo stars191
Last updatedJuly 24, 2026
Repositorypproenca/dot-skills

How do you do test-driven development with red-green-refactor?

Use tdd for development tasks

Who is it for?

Developers building features or fixing bugs who want test-first vertical slices through public interfaces instead of bulk test scaffolding.

Skip if: Developers who need load testing, browser E2E automation, or throwaway scripts without an existing project test runner.

When should I use this skill?

User requests TDD, red-green-refactor, test-first development, integration tests, or feature work where tests must verify public behavior.

What you get

Passing integration tests, refactored production code, and a behavior-focused test suite per feature slice

  • failing then passing integration tests
  • refactored implementation behind public APIs

By the numbers

  • bundles 5 reference markdown guides (tests, mocking, interface-design, deep-modules, refactoring)
  • defines 4 workflow phases from planning through refactor
  • uses 5-item checklist per red-green-refactor cycle

Files

SKILL.mdMarkdownGitHub ↗

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

PriorityCategoryImpactPrefix
1Red-Green-Refactor CycleCRITICALcycle-
2Test Design PrinciplesCRITICALdesign-
3Test Isolation & DependenciesHIGHisolate-
4Test Data ManagementHIGHdata-
5Assertions & VerificationMEDIUMassert-
6Test Organization & StructureMEDIUMorg-
7Test Performance & ReliabilityMEDIUMperf-
8Test Pyramid & StrategyLOWstrat-

Quick Reference

1. Red-Green-Refactor Cycle (CRITICAL)

  • cycle-write-test-first - Write the Test Before the Implementation
  • cycle-minimal-code-to-pass - Write Only Enough Code to Pass the Test
  • cycle-refactor-after-green - Refactor Immediately After Green
  • cycle-verify-test-fails-first - Verify the Test Fails Before Writing Code
  • cycle-small-increments - Take Small Incremental Steps
  • cycle-maintain-test-list - Maintain a Test List

2. Test Design Principles (CRITICAL)

  • design-test-behavior-not-implementation - Test Behavior Not Implementation
  • design-one-assertion-per-test - One Logical Assertion Per Test
  • design-descriptive-test-names - Use Descriptive Test Names
  • design-aaa-pattern - Follow the Arrange-Act-Assert Pattern
  • design-test-edge-cases - Test Edge Cases and Boundaries
  • design-avoid-logic-in-tests - Avoid Logic in Tests

3. Test Isolation & Dependencies (HIGH)

  • isolate-mock-external-dependencies - Mock External Dependencies
  • isolate-no-shared-state - Avoid Shared Mutable State Between Tests
  • isolate-deterministic-tests - Write Deterministic Tests
  • isolate-prefer-stubs-over-mocks - Prefer Stubs Over Mocks for Queries
  • isolate-use-dependency-injection - Use Dependency Injection for Testability

4. Test Data Management (HIGH)

  • data-use-factories - Use Factories for Test Data Creation
  • data-minimal-setup - Keep Test Setup Minimal
  • data-avoid-mystery-guests - Avoid Mystery Guests
  • data-unique-identifiers - Use Unique Identifiers Per Test
  • data-builder-pattern - Use Builder Pattern for Complex Objects

5. Assertions & Verification (MEDIUM)

  • assert-specific-assertions - Use Specific Assertions
  • assert-error-messages - Assert on Error Messages and Types
  • assert-no-assertions-antipattern - Every Test Must Have Assertions
  • assert-custom-matchers - Create Custom Matchers for Domain Assertions
  • assert-snapshot-testing - Use Snapshot Testing Judiciously

6. Test Organization & Structure (MEDIUM)

  • org-group-by-behavior - Group Tests by Behavior Not Method
  • org-file-structure - Follow Consistent Test File Structure
  • org-setup-teardown - Use Setup and Teardown Hooks Appropriately
  • org-test-utilities - Extract Reusable Test Utilities
  • org-parameterized-tests - Use Parameterized Tests for Variations

7. Test Performance & Reliability (MEDIUM)

  • perf-fast-unit-tests - Keep Unit Tests Under 100ms
  • perf-avoid-network-calls - Eliminate Network Calls in Unit Tests
  • perf-fix-flaky-tests - Fix Flaky Tests Immediately
  • perf-parallelize-tests - Parallelize Independent Tests
  • perf-avoid-sleep - Avoid Arbitrary Sleep Calls

8. Test Pyramid & Strategy (LOW)

  • strat-test-pyramid - Follow the Test Pyramid
  • strat-mutation-testing - Use Mutation Testing to Validate Test Quality
  • strat-coverage-targets - Set Meaningful Coverage Targets
  • strat-integration-boundaries - Test Integration at Service Boundaries
  • strat-e2e-critical-paths - Limit E2E Tests to Critical User Paths

How to Use

Read individual reference files for detailed explanations and code examples:

  • Section definitions - Category structure and impact levels
  • Rule template - Template for adding new rules
  • cycle-write-test-first - Write the Test Before the Implementation
  • design-aaa-pattern - Follow the Arrange-Act-Assert Pattern

Related Skills

  • For Vitest framework specifics, see vitest skill
  • For API mocking with MSW, see msw skill

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Related skills

How it compares

Pick tdd over generic testing skills when you need enforced vertical-slice red-green-refactor discipline and behavior-focused integration tests, not one-shot test file generation.

FAQ

What is the tdd skill red-green-refactor workflow?

The tdd skill runs vertical tracer bullets: write one failing test (RED), add minimal code to pass (GREEN), then refactor after green across planning, tracer-bullet, incremental loop, and refactor phases. Each cycle uses a 5-item checklist so tests stay on public behavior.

Why does tdd reject writing all tests before implementation?

The tdd skill labels horizontal slicing—bulk tests then bulk code—as an anti-pattern because tests written upfront target imagined behavior and implementation shape. Vertical slices respond to code just written, producing integration tests that survive refactors.

What reference guides ship with the tdd skill?

The tdd skill ships 5 reference markdown guides: tests.md, mocking.md, interface-design.md, deep-modules.md, and refactoring.md. They cover integration-style examples, system-boundary mocking rules, testable interfaces, module depth, and post-green refactor candidates.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.