Saltar al contenido
Skillpedia
Pruebas48 mil · #5934

tdd-workflows-tdd-cycle

Qué hace

Esta herramienta te ayuda a crear y mejorar código de programación siguiendo un proceso estricto llamado Desarrollo Guiado por Pruebas (TDD). Asegura que las pruebas se escriban antes que el código y que el código se revise y mejore constantemente.

Cuándo usarla

  • ✓Cuando empiezas un proyecto de software nuevo.
  • ✓Cuando añades funciones nuevas a un software existente.
  • ✓Cuando corriges errores en un software.

Link de la skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-cycle/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tdd-workflows-tdd-cycle/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Quiero desarrollar un módulo de inicio de sesión nuevo usando TDD. ¿Cuáles son los pasos?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta te guía por las fases: primero escribes pruebas que fallan (RED), después escribes el código mínimo para que pasen (GREEN) y, por último, mejoras el código y las pruebas (REFACTOR). También comprueba la calidad y la cobertura de las pruebas.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.
  • If detailed examples are required, open resources/implementation-playbook.md.

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.]

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

  • Use Task tool with subagent_type="comprehensive-review::architect-review"
  • Prompt: "Analyze requirements for: $ARGUMENTS. 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

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Design test architecture for: $ARGUMENTS 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)

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Write FAILING unit tests for: $ARGUMENTS. 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

  • Use Task tool with subagent_type="tdd-workflows::code-reviewer"
  • Prompt: "Verify that all tests for: $ARGUMENTS 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

  • Use Task tool with subagent_type="backend-development::backend-architect"
  • Prompt: "Implement MINIMAL code to make tests pass for: $ARGUMENTS. 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

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Run all tests for: $ARGUMENTS 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

  • Use Task tool with subagent_type="tdd-workflows::code-reviewer"
  • Prompt: "Refactor implementation for: $ARGUMENTS 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

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Refactor tests for: $ARGUMENTS. 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

…

Preguntas frecuentes

¿Qué es TDD?

TDD significa Desarrollo Guiado por Pruebas (Test-Driven Development). Es una práctica en la que escribes las pruebas antes de escribir el código real.

¿Por qué escribir primero las pruebas?

Escribir las pruebas primero te ayuda a pensar con claridad en lo que debe hacer el código, asegura que funcione como se espera y facilita las modificaciones futuras.

¿Qué son las fases RED, GREEN y REFACTOR?

Son los pasos principales de TDD: RED (escribir una prueba que falla), GREEN (escribir el código mínimo para que la prueba pase) y REFACTOR (mejorar el código y las pruebas sin romper nada).

Detalles

Descripción original del autor

Use when working with tdd workflows tdd cycle

repo: sickn33/agentic-awesome-skills

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#5934
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas