Skip to content
Back to skills

Ac Tdd Runner

ASecurity

Run TDD cycle for feature implementation. Use when implementing features with RED-GREEN-REFACTOR, running test-driven development, automating TDD workflow, or ensuring test-first development.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentspythonrefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill ac-tdd-runner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ac Tdd Runner?

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

Security grade badge for Ac Tdd Runner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-ac-tdd-runner-claude-skill-registry/badge)](https://www.skillsdirectory.com/skills/majiayu000-ac-tdd-runner-claude-skill-registry)

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: ac-tdd-runner
description: Run TDD cycle for feature implementation. Use when implementing features with RED-GREEN-REFACTOR, running test-driven development, automating TDD workflow, or ensuring test-first development.
---

# AC TDD Runner

Automate the Test-Driven Development cycle for feature implementation.

## Purpose

Enforces the RED-GREEN-REFACTOR cycle, ensuring all features are implemented with test-first methodology for quality and maintainability.

## Quick Start

```python
from scripts.tdd_runner import TDDRunner

runner = TDDRunner(project_dir)
result = await runner.run_cycle(feature)
```

## TDD Cycle

### RED Phase
Write failing tests first:
```python
red_result = await runner.red_phase(feature)
# Creates test file with failing tests
# Verifies tests actually fail
```

### GREEN Phase
Implement minimum code to pass:
```python
green_result = await runner.green_phase(feature)
# Implements code
# Runs tests until all pass
# Minimum necessary implementation
```

### REFACTOR Phase
Clean up while tests pass:
```python
refactor_result = await runner.refactor_phase(feature)
# Improve code structure
# Ensure tests still pass
# Apply coding standards
```

## Cycle Result

```json
{
  "feature_id": "auth-001",
  "cycle_complete": true,
  "phases": {
    "red": {
      "success": true,
      "tests_created": 5,
      "all_tests_fail": true
    },
    "green": {
      "success": true,
      "iterations": 3,
      "all_tests_pass": true
    },
    "refactor": {
      "success": true,
      "changes_made": ["extracted_helper", "renamed_variable"],
      "tests_still_pass": true
    }
  },
  "coverage": 92.5,
  "duration_ms": 120000
}
```

## RED Phase Details

1. Generate test file from feature test_cases
2. Write test functions with proper structure
3. Run tests to verify they fail
4. If tests pass unexpectedly, add more specific assertions

## GREEN Phase Details

1. Analyze failing tests
2. Write minimum implementation
3. Run tests
4. If tests fail, iterate on implementation
5. Stop when all tests pass

## REFACTOR Phase Details

1. Identify code smells
2. Apply refactoring patterns
3. Run tests after each change
4. Revert if tests fail
5. Continue until code is clean

## Configuration

```json
{
  "max_green_iterations": 10,
  "coverage_threshold": 80,
  "refactoring_patterns": [
    "extract_method",
    "rename_for_clarity",
    "remove_duplication"
  ],
  "test_framework": "pytest"
}
```

## Integration

- Uses: `ac-test-generator` for RED phase
- Uses: `ac-criteria-validator` for GREEN verification
- Reports to: `ac-task-executor`

## API Reference

See `scripts/tdd_runner.py` for full implementation.

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.