Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

tdd-workflows-tdd-cycle

БесплатноБез исполняемых скриптовНе проверен

Coordinate the test-driven development cycle from requirements and failing tests through implementation, refactoring, and validation. Use when building a…

rmyndharisот rmyndharis★ 2 165 звёзд на GitHub

Об этом скилле

Use this skill when

  • Working on tdd workflows tdd cycle tasks or workflows
  • Needing guidance, best practices, or checklists for tdd workflows tdd cycle

Do not use this skill when

  • The task is unrelated to tdd workflows tdd cycle
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:

[Extended thinking: This workflow enforces test-first development through coordinated agent orchestration. Each phase of the TDD cycle is strictly enforced with fail-first verification, incremental implementation, and continuous refactoring. The workflow supports both single test and test suite approaches with configurable coverage thresholds.]

Steps marked Role name a specialist perspective: apply the matching skill when it is installed, otherwise perform the step directly.

Configuration

Coverage Thresholds

  • Minimum line coverage: 80%
  • Minimum branch coverage: 75%
  • Critical path coverage: 100%

Refactoring Triggers

  • Cyclomatic complexity > 10
  • Method length > 20 lines
  • Class length > 200 lines
  • Duplicate code blocks > 3 lines

Phase 1: Test Specification and Design

1. Requirements Analysis

  • Role: architect-review
  • Prompt: "Analyze requirements for: [user request]. Define acceptance criteria, identify edge cases, and create test scenarios. Output a comprehensive test specification."
  • Output: Test specification, acceptance criteria, edge case matrix
  • Validation: Ensure all requirements have corresponding test scenarios

2. Test Architecture Design

  • Role: test-automator
  • Prompt: "Design test architecture for: [user request] based on test specification. Define test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability."
  • Output: Test architecture, fixture design, mock strategy
  • Validation: Architecture supports isolated, fast, reliable tests

Phase 2: RED - Write Failing Tests

3. Write Unit Tests (Failing)

  • Role: test-automator
  • Prompt: "Write FAILING unit tests for: [user request]. Tests must fail initially. Include edge cases, error scenarios, and happy paths. DO NOT implement production code."
  • Output: Failing unit tests, test documentation
  • CRITICAL: Verify all tests fail with expected error messages

4. Verify Test Failure

  • Role: code-reviewer
  • Prompt: "Verify that all tests for: [user request] are failing correctly. Ensure failures are for the right reasons (missing implementation, not test errors). Confirm no false positives."
  • Output: Test failure verification report
  • GATE: Do not proceed until all tests fail appropriately

Phase 3: GREEN - Make Tests Pass

5. Minimal Implementation

  • Role: backend-architect
  • Prompt: "Implement MINIMAL code to make tests pass for: [user request]. Focus only on making tests green. Do not add extra features or optimizations. Keep it simple."
  • Output: Minimal working implementation
  • Constraint: No code beyond what's needed to pass tests

6. Verify Test Success

  • Role: test-automator
  • Prompt: "Run all tests for: [user request] and verify they pass. Check test coverage metrics. Ensure no tests were accidentally broken."
  • Output: Test execution report, coverage metrics
  • GATE: All tests must pass before proceeding

Phase 4: REFACTOR - Improve Code Quality

7. Code Refactoring

  • Role: code-reviewer
  • Prompt: "Refactor implementation for: [user request] while keeping tests green. Apply SOLID principles, remove duplication, improve naming, and optimize performance. Run tests after each refactoring."
  • Output: Refactored code, refactoring report
  • Constraint: Tests must remain green throughout

8. Test Refactoring

  • Role: test-automator
  • Prompt: "Refactor tests for: [user request]. Remove test duplication, improve test names, extract common fixtures, and enhance test readability. Ensure tests still provide same coverage."
  • Output: Refactored tests, improved test structure
  • Validation: Coverage metrics unchanged or improved

Phase 5: Integration and System Tests

9. Write Integration Tests (Failing First)

  • Role: test-automator
  • Prompt: "Write FAILING integration tests for: [user request]. Test component interactions, API contracts, and data flow. Tests must fail initially."
  • Output: Failing integration tests
  • Validation: Tests fail due to missing integration logic

10. Implement Integration

  • Role: backend-architect
  • Prompt: "Implement integration code for: [user request] to make integration tests pass. Focus on component interaction and data flow."
  • Output: Integration implementation
  • Validation: All integration tests pass

Phase 6: Continuous Improvement Cycle

11. Performance and Edge Case Tests

  • Role: test-automator
  • Promp
Полный SKILL.md на GitHub

Установить tdd-workflows-tdd-cycle в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл tdd-workflows-tdd-cycle?

Coordinate the test-driven development cycle from requirements and failing tests through implementation, refactoring, and validation. Use when building a feature with a structured TDD workflow.

Как установить скилл tdd-workflows-tdd-cycle?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tdd-workflows-tdd-cycle запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить tdd-workflows-tdd-cycle с