ac-tdd-runner
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.
Best use case
ac-tdd-runner is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using ac-tdd-runner should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ac-tdd-runner/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ac-tdd-runner Compares
| Feature / Agent | ac-tdd-runner | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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.Related Skills
api-codegen-runner
Use when working with api-codegen-runner
pytest-runner
Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
app-builder
Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.
app-architecture
Create apps following contract-port architecture with composition roots. Use when creating new apps in apps/, scaffolding CLI tools, setting up dependency injection, or when the user asks about app structure, entrypoints, or platform-agnostic design.
aposd-verifying-correctness
Verify code correctness before claiming done or committing. Run 6-dimension checklist: requirements coverage, concurrency safety, error handling, resource management, boundary conditions, and security. Output PASS/FAIL per dimension with final DONE/NOT DONE verdict. Use after implementation as pre-commit gate. Triggers on: is it done, ready to commit, verify correctness, did I miss anything, pre-commit check.
aposd-simplifying-complexity
Simplify complex code through the Error Reduction Hierarchy: Define out > Mask > Aggregate > Crash. Use when code is too complex, has scattered error handling, configuration explosion, or callers doing module work. Produce technique analysis table with gate checks before simplified code. Triggers on: too complex, simplify, scattered errors, configuration proliferation, verbose error handling. Complements cc-defensive-programming with design-level error elimination.
aposd-reviewing-module-design
Evaluate module design using APOSD principles with 40-item checklist. Detect complexity symptoms (change amplification, cognitive load, unknown unknowns), shallow modules, information leakage, pass-through methods, and structural anti-patterns. Produce categorized design review (Critical/Moderate/Observations/Positive). Use when reviewing code, assessing interfaces, during PR review, or evaluating 'is this too complex?' Triggers on: code review, design review, module complexity, interface assessment, PR review, structural analysis.
aposd-optimizing-critical-paths
Optimize performance through mandatory measure-first workflow with 3 stages: MEASURE (gate) -> FUNDAMENTAL FIX -> CRITICAL PATH REDESIGN. Use when code is too slow, laggy, hangs, doesn't scale, has timeouts, OOM errors, or high CPU/memory. Emphasize that simpler code usually runs faster. Triggers on: performance issues, optimization needed, takes forever, profiling. Produces profiling-backed optimization with verified improvement.
aposd-maintaining-design-quality
Enforce strategic programming discipline when modifying existing code. Guide through STOP-ASK-DECIDE-VERIFY workflow with urgency tier assessment (trivial/minor/standard/emergency). Include when NOT to refactor (Chesterton's Fence, performance-critical, no tests) and block tactical shortcuts via anti-rationalization tables. Use when fixing bugs, extending features, or tempted to make quick fixes. Triggers on: modify code, fix bug, extend feature, quick fix, tactical change.
aposd-improving-code-clarity
Enforce comments-first workflow for new code and improve naming/documentation for existing code. Use when writing new classes, methods, or functions; when code is 'confusing' or 'hard to understand'; when naming precision is poor; or when variable documentation lacks units, bounds, or ownership. Triggers on: new code, comments-first, naming review, documentation review, not obvious, hard to understand. Produces well-documented code with precise naming, or identifies design problems when comments/names are hard to write.
aposd-designing-deep-modules
Enforce Design-It-Twice workflow: generate 2-3 radically different approaches, compare them, then implement. Use when designing modules, APIs, or classes before implementation. Triggers on: design, create class, add module, implement feature, new service, API design, before implementing. Produces structured design document with approaches, comparison table, choice rationale, and depth check.