test-generation-skill
About
This Claude Skill automatically generates and validates unit, integration, and E2E tests to achieve comprehensive code coverage. It analyzes modified source files, creates appropriate tests using Jest and Playwright, and enforces a minimum 85% coverage with no failing tests. Use it when adding new features, when tests fail, or to improve coverage in your project.
Quick Install
Claude Code
Recommended/plugin add https://github.com/Eibon7/roastr-aigit clone https://github.com/Eibon7/roastr-ai.git ~/.claude/skills/test-generation-skillCopy and paste this command in Claude Code to install this skill
Documentation
name: test-generation-skill description: Genera y valida tests unitarios, de integración y E2E con cobertura completa. triggers:
- "sin tests"
- "test fail"
- "añadir tests"
- "coverage" used_by:
- front-end-dev
- back-end-dev
- test-engineer steps:
- paso1: "Analizar archivos modificados en src/ para identificar componentes/servicios nuevos o modificados"
- paso2: "Generar tests unitarios usando Jest con mocks apropiados (sin datos reales)"
- paso3: "Generar tests de integración para flujos clave (auth, API, workers)"
- paso4: "Generar tests E2E con Playwright para UI cuando aplique"
- paso5: "Ejecutar npm test -- --coverage para validar cobertura"
- paso6: "Verificar que Coverage Source es 'auto' en nodos GDD afectados"
- paso7: "Asegurar cobertura >= 85% y 0 tests fallando"
- paso8: "Generar reporte en docs/test-evidence/issue-{id}/summary.md con resultados" output: |
- Tests generados en tests/unit/, tests/integration/, tests/e2e/
- Reporte de cobertura: coverage/coverage-summary.json
- Evidencias visuales: docs/test-evidence/issue-{id}/screenshots/
- Resumen: docs/test-evidence/issue-{id}/summary.md examples:
- contexto: "Se añadió un nuevo endpoint POST /api/roastr/persona" accion: "Generar tests para validar creación, actualización y borrado de persona" output_esperado: "tests/unit/routes/roastr-persona.test.js + tests/integration/persona-flow.test.js"
- contexto: "Se creó nuevo componente UserProfile.jsx" accion: "Generar tests unitarios + E2E visual con Playwright" output_esperado: "tests/unit/components/UserProfile.test.jsx + tests/e2e/profile-page.test.js + screenshots" rules:
- NUNCA usar datos reales (siempre mock data)
- Seguir patrones de tests existentes en tests/
- Cada archivo de producción debe tener su contraparte de test
- Tests deben ser aislados, reproducibles y auto-contenidos
- Usar nomenclatura descriptiva (test describe el comportamiento esperado) references:
- "docs/TESTING.md - Guía completa de testing"
- "docs/GDD-PHASE-15.1.md - Coverage authenticity"
- "CLAUDE.md - Commit sin tests prohibido"
GitHub Repository
Related Skills
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
evaluating-llms-harness
TestingThis Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.
webapp-testing
TestingThis Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.
finishing-a-development-branch
TestingThis skill helps developers complete finished work by verifying tests pass and then presenting structured integration options. It guides the workflow for merging, creating PRs, or cleaning up branches after implementation is done. Use it when your code is ready and tested to systematically finalize the development process.
