Tdd

From pproenca/dot-skills · View interactive version

Tdd is an AI agent skill from the GitHub repository pproenca/dot-skills. Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd). This skill should be used when practicing TDD, writing tests first, designing tests before implementation, or reviewing test-first approaches. Triggers on "write tests first", "test before code", "red green refa

How to use this skill

Skill file

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:

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

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Red-Green-Refactor Cycle | CRITICAL | cycle- |

| 2 | Test Design Principles | CRITICAL | design- |

| 3 | Test Isolation & Dependencies | HIGH | isolate- |

| 4 | Test Data Management | HIGH | data- |

| 5 | Assertions & Verification | MEDIUM | assert- |

| 6 | Test Organization & Structure | MEDIUM | org- |

| 7 | Test Performance & Reliability | MEDIUM | perf- |

| 8 | Test Pyramid & Strategy | LOW | strat- |

Quick Reference

1. Red-Green-Refactor Cycle (CRITICAL)

2. Test Design Principles (CRITICAL)

3. Test Isolation & Dependencies (HIGH)

4. Test Data Management (HIGH)

5. Assertions & Verification (MEDIUM)

6. Test Organization & Structure (MEDIUM)

7. Test Performance & Reliability (MEDIUM)

8. Test Pyramid & Strategy (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Related Skills

Full Compiled Document

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.