Skip to content
Back to skills

Tdd Workflow

ASecurity

Test-Driven Development workflow for autonomous coding. Use when implementing features with TDD, writing tests first, following red-green-refactor, or ensuring test coverage.

  • 3 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added February 8, 2026
developmentpythongorefactoring

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add adaptationio/Skrillz --skill tdd-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tdd Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tdd Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adaptationio-tdd-workflow/badge)](https://www.skillsdirectory.com/skills/adaptationio-tdd-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tdd-workflow
description: Test-Driven Development workflow for autonomous coding. Use when implementing features with TDD, writing tests first, following red-green-refactor, or ensuring test coverage.
version: 1.0.0
category: autonomous-coding
layer: orchestration
---

# TDD Workflow

Implements Test-Driven Development workflow for feature implementation.

## Quick Start

### Run TDD Cycle
```python
from scripts.tdd_workflow import TDDWorkflow

workflow = TDDWorkflow(project_dir)
result = await workflow.implement_feature(
    feature_id="auth-001",
    acceptance_criteria=criteria
)

if result.passed:
    print("Feature implemented and verified!")
```

### Individual Phases
```python
# Red: Write failing test
test_path = await workflow.write_test(feature_id)

# Green: Implement to pass
await workflow.implement_code(feature_id)

# Refactor: Clean up
await workflow.refactor(feature_id)
```

## TDD Cycle

```
┌─────────────────────────────────────────────────────────────┐
│                      TDD CYCLE                              │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│      ┌─────────────────────────────────────────┐           │
│      │                                         │           │
│      │            1. RED                       │           │
│      │     Write failing test                  │           │
│      │     Test must fail                      │           │
│      │                                         │           │
│      └───────────────────┬─────────────────────┘           │
│                          │                                  │
│                          ▼                                  │
│      ┌─────────────────────────────────────────┐           │
│      │                                         │           │
│      │            2. GREEN                     │           │
│      │     Write minimal code                  │           │
│      │     to pass test                        │           │
│      │                                         │           │
│      └───────────────────┬─────────────────────┘           │
│                          │                                  │
│                          ▼                                  │
│      ┌─────────────────────────────────────────┐           │
│      │                                         │           │
│      │            3. REFACTOR                  │           │
│      │     Improve code quality                │           │
│      │     Keep tests passing                  │           │
│      │                                         │           │
│      └───────────────────┬─────────────────────┘           │
│                          │                                  │
│                          ▼                                  │
│      ┌─────────────────────────────────────────┐           │
│      │                                         │           │
│      │         4. VERIFY (E2E)                 │           │
│      │     Run acceptance tests                │           │
│      │     Confirm feature works               │           │
│      │                                         │           │
│      └─────────────────────────────────────────┘           │
│                                                             │
└─────────────────────────────────────────────────────────────┘
```

## TDD Principles

| Principle | Description |
|-----------|-------------|
| **Tests First** | Always write tests before implementation |
| **Minimal Code** | Write only enough code to pass tests |
| **Small Steps** | Make incremental changes |
| **Fast Feedback** | Run tests frequently |
| **Refactor Often** | Keep code clean |

## Test Types

| Type | Purpose | When to Write |
|------|---------|---------------|
| **Unit** | Test individual functions | RED phase |
| **Integration** | Test component interaction | After GREEN |
| **E2E** | Test full feature flow | VERIFY phase |

## Integration Points

- **coding-agent**: Executes TDD workflow
- **browser-e2e-tester**: Runs E2E tests
- **error-recoverer**: Handle test failures
- **progress-tracker**: Track test metrics

## References

- `references/TDD-BEST-PRACTICES.md` - Best practices
- `references/TEST-PATTERNS.md` - Common patterns

## Scripts

- `scripts/tdd_workflow.py` - Main workflow
- `scripts/test_writer.py` - Generate tests
- `scripts/test_runner.py` - Run tests
- `scripts/refactor_helper.py` - Refactoring tools

Files in this skill

  • SKILL.md5.7 KB
  • scripts/refactor_helper.py7.4 KB
  • scripts/tdd_workflow.py9.1 KB
  • scripts/test_runner.py7.5 KB
  • scripts/test_writer.py6.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…