Agent skill
tdd-workflow
Esta skill debe usarse cuando el usuario pide "aplicar TDD", "desarrollo guiado por tests", "test-driven development", "red green refactor", "ciclo RGR", "escribir tests primero", "nueva feature con TDD", "mejorar testabilidad", "filosofia TDD", o menciona Iron Laws, TDD philosophy, o quiere entender el proceso TDD. NO usar cuando el usuario pide agregar tests a un proyecto existente o setup de testing — eso es testing:add-testing.
Install this agent skill to your Project
npx add-skill https://github.com/DieGopherLT/dotclaudefiles/tree/main/plugins/testing/skills/tdd-workflow
SKILL.md
TDD Workflow — Navigation Index
Read metadata.json in this directory to load the system abstract and resource map.
Delegation
Before proceeding, evaluate the user's intent:
- Adding tests to an existing project (setup, coverage, pipeline): delegate to
testing:add-testing - New feature development with strict TDD (write tests first, then implement): delegate to
testing:tdd-feature - TDD philosophy, Iron Laws, cycle mechanics, anti-patterns: continue here and use the reference map below
Iron Laws (Quick Reference)
Three non-negotiable rules that define TDD:
- Never write production code without a failing test first. All code is born from a red test.
- Never write more test than necessary to produce a failure. One minimal test, one behavior.
- Never write more production code than necessary to pass the test. The simplest solution that makes the test pass.
Violating any law invalidates the entire process. See ../../references/anti-patterns.md for detailed consequences and examples.
Red-Green-Refactor Cycle (Quick Reference)
Each iteration produces a minimal increment of verified functionality:
- RED: Write a failing test. Run it. Confirm it fails for the right reason.
- GREEN: Write the minimum code to pass the test. Run the full suite. Confirm zero regressions.
- REFACTOR: Improve code and tests without changing behavior. Run the suite after each change.
Each cycle: 1-10 minutes. If a cycle exceeds 15 minutes, the increment is too large — split it.
See ../../references/rg-refactor.md for detailed examples in Go, TypeScript, and C#.
Reference Map
| Concept | Impact | File |
|---|---|---|
| Anti-patterns and Iron Laws | Avoid the 5 critical TDD failures | ../../references/anti-patterns.md |
| Red-Green-Refactor mechanics | Step-by-step cycle with multi-language examples | ../../references/rg-refactor.md |
| Coverage strategies | Tools per language, report interpretation, 80%+ strategies | ../../references/coverage.md |
| Project rules template | Template for generating .claude/rules/testing.md in target project |
../../references/project-rules-template.md |
Available Agents
| Agent | Function | When to invoke |
|---|---|---|
testability-auditor |
Analyzes code testability, score 0-100 | Before writing tests for existing code |
code-adapter |
Refactors for testability without changing behavior | When testability score is below 80 |
testing-deps-investigator |
Investigates and recommends testing dependencies | When project has no test infrastructure |
test-implementer |
Implements tests with strict TDD | To write tests following Red-Green-Refactor |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
plan-feature
smart-interview
Esta skill debe usarse cuando el usuario pregunta "¿Preguntas?", "¿Tienes dudas?", "¿Tienes preguntas?", "¿Quieres aclarar algo?", "¿Necesitas aclarar algo?", "aclara lo que necesites", o cuando quiere aterrizar requerimientos antes de planear. Tambien la invoca plan-feature en Phase 3. Ejecuta entrevista estructurada para obtener requerimientos cuantificables, reglas de negocio traducibles a codigo, y flujos del sistema; luego anota los resultados en el plan.
post-implementation
Esta skill debe usarse cuando el usuario pide "haz review de los cambios", "review the changes", "aplica el post-implementacion", "apply post-implementation", "run post-implementation", o cuando el plan aprobado instruye "invoke /smart-plan:post-implementation". Ejecuta workflow post-implementacion despues de que el codigo este completo con quality review (3 reviewers paralelos), auto-fix de issues (confianza >= 80%), documentacion del feature, y commit opcional. Puede usarse despues de cualquier implementacion, no solo smart-plan.
smart-delegation
Esta skill debe usarse cuando Claude detecta que una implementacion es lo suficientemente grande como para dividirla en sub-agentes (5+ archivos, dependencias entre cambios, nuevas abstracciones que otros archivos consumen), cuando el usuario pide "delega la implementacion", "orquesta los implementadores", "usa sub-agentes", "delegate to sub-agents", "orchestrate implementers", o cuando plan-feature invoca la delegacion tras aprobar un plan.
add-testing
Esta skill debe usarse cuando el usuario pide "agregar tests a proyecto existente", "add testing to existing project", "setup de testing", "configurar infraestructura de tests", "pipeline completo de testing", "quiero tests para este modulo", "agregar cobertura de tests", "add test coverage", "integrar testing al proyecto". Ejecuta pipeline completo de 7 pasos: auditoria de testabilidad, adaptacion condicional de codigo, investigacion de dependencias, implementacion de tests, auditoria de calidad de inputs, reporte de cobertura y generacion de reglas del proyecto.
team-setup
Esta skill debe usarse cuando el usuario pide 'configura un team', 'prepara equipo de agentes', 'crea un team de agentes', 'setup del team', 'team de agentes para', 'orquesta agentes', 'team-setup', 'arma un equipo', 'necesito un team para', o cuando quiere coordinar multiples agentes trabajando en repos/directorios distintos. Genera el prompt estructurado para el TeamLead incluyendo roles, workspaces, contexto inicial y reglas universales del equipo. Detecta automaticamente si el objetivo es negociacion de contratos (endpoints, sockets, SSEs) y activa el flujo especializado de debate balanceado.
Didn't find tool you were looking for?