test-strategy
Skill0 starsChanged 2 months agoMITView on GitHub
Decide what and how to test: \"no hay tests\", \"qué pruebo\", \"write tests\", flaky or slow suites, useless coverage, legacy characterization tests, mutation testing.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- l-gevity/l-gevity-skillstheir own version, first seen Oct 1, 2026
- nurettincoban/ai-prd-workflowtheir own version, first seen Oct 1, 2026
- cilinmengye/personal-agent-skillstheir own version, first seen Sep 24, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- OneDro1d/onedroid-docstheir own version, first seen Sep 18, 2026
- caiaffa/claude-code-ultimate-engineering-systemtheir own version, first seen Sep 14, 2026
Used with
Projects with it also use test-data-management, incident-response and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
petrkindlmannSkilltest-data-management
Create and manage test data with factory patterns, fixture strategies, data anonymization, and synthetic data generation. Covers Fishery (TypeScript), FactoryBot (Ruby), Factory Boy (Python), database seeding, cleanup strategies, and GDPR-compliant data handling. Use when: "test data," "fixtures," "factories," "seed data," "synthetic data," "test database," "data anonymization." Not for: migration/integrity testing of the DB itself — use database-testing; environment provisioning and database branching strategy — use test-environments. Related: test-environments, database-testing, api-testing, unit-testing.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 5 projects that use this
LLl0k0laDSkillsecurity-and-hardening
Use when handling user input, authentication, data storage, or external integrations. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services.
Also in 3 projects that use this
mrgoonieSkillcontext-engineering
Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.
Also in 4 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 3 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- nurettincoban/ai-prd-workflow★ 297same name
- petrkindlmann/qa-skills★ 160same name
- avelikiy/great_cto★ 103same name
- thiientv/godmode★ 96same name
- nahid-sparktales/agent-dispatcher★ 59same name
- l-gevity/l-gevity-skills★ 44same name
- fishzjp/qa-skills★ 35same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- aethrox/doctrine★ 18same name
- caiaffa/claude-code-ultimate-engineering-system★ 17same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- skills/constitution/templates/AGENTS.mdAGENTS.md
- agent-debugSkill
- agentic-codingSkill
- ai-securitySkill
- api-backendSkill
- app-securitySkill
- architectureSkill
- automationSkill
- batchSkill
- bot-devSkill
- changelog-generatorSkill
- code-standardSkill
- constitutionSkill
- consultaSkill
- data-layerSkill
- deploySkill
- desktop-appSkill
- dev-routerSkill
- diff-reviewSkill
- env-doctorSkill
- featureSkill
- fixerSkill
- intakeSkill
- mobile-appSkill
- observabilitySkill
- performanceSkill
- project-memorySkill
- quality-gateSkill
- readme-generatorSkill
- rebuildSkill
- refactorSkill
- tech-debtSkill
- triageSkill
- ui-bugSkill
- ui-designSkill
- valida-ideaSkill
- web-appSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 22 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 70
Test que se rompe cada vez que se mueve código sin cambiar comportamiento = test mal escrito.
“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test-Strategy — la red que permite no leer cada línea
Overview
Si el humano deja de auditar el código que escribe la IA, la suite de pruebas es lo único que queda entre el cambio y el usuario. Eso cambia el criterio de diseño: no se prueba para subir un número, se prueba para poder aceptar código que nadie leyó.
Cobertura alta con tests que no afirman nada es peor que no tener tests: da permiso para confiar. El puntaje de mutación existe justo para medir eso — cuántos fallos inyectados detecta tu suite de verdad.
Cuándo usar
- Proyecto sin tests, o con tests que no atrapan nada.
- Convertir criterios de aceptación del spec en pruebas ejecutables.
- Antes de refactorizar (tests de caracterización).
- Suite lenta, frágil o intermitente.
- Cobertura alta y aun así se escapan bugs.
Cuándo NO usar
| Situación | Ruta |
| Correr y evaluar métricas | quality-gate |
| Fijar umbrales por perfil | constitution |
| Bug concreto con stack trace | fixer (prueba de regresión incluida) |
| Prototipo P1 desechable | 1 smoke test del camino feliz y seguir |
Regla de hierro: el test se escribe viendo fallar
UN TEST QUE NUNCA SE VIO EN ROJO NO PRUEBA NADA.Procedimiento: escribe el test → córrelo y observa el fallo → implementa → míralo pasar. Si pasó a la primera, rompe a propósito el código (cambia un > por >=, devuelve null) y confirma que el test se cae. Un test que pasa con el código roto es peor que ningún test.
Cómo repartir el esfuerzo
| Nivel | Qué prueba | Proporción sugerida | Regla |
| Unitario | Lógica de dominio pura: cálculos, reglas, validaciones, máquinas de estado | ~70% | Sin red, sin disco, sin reloj. Milisegundos. Es donde vive la mutación. |
| Integración | Los bordes: base de datos real, cola, sistema de archivos, cliente HTTP contra doble local | ~20% | Un mock del borde no prueba el borde. Al menos uno real por integración. |
| E2E / aceptación | Los 3-5 caminos por los que la gente paga | ~10% | Lento y frágil por naturaleza: pocos, estables, sobre los flujos del spec. |
| Contrato | Lo que prometes a otros sistemas | según integraciones | Si terceros dependen de tu formato, un cambio silencioso rompe a otros. |
Regla práctica: cada criterio de aceptación (AC-n) del spec se mapea a un test con su identificador en el nombre. Así la trazabilidad spec ↔ suite es mecánica:
test('AC-3: cliente sin saldo no puede confirmar pedido', ...)Qué probar primero (orden de valor)
- Lo que cuesta dinero o datos si falla: cobros, permisos, borrados, envíos a terceros.
- Lo que ya falló antes: todo bug arreglado nace con su prueba de regresión. Sin esa prueba, el bug vuelve.
- Reglas de negocio con ramas: descuentos, estados, límites, fechas, impuestos.
- Bordes y valores límite: 0, negativo, vacío, nulo, duplicado, gigante, unicode, zona horaria.
- Concurrencia e idempotencia: doble clic, reintento del webhook, dos procesos a la vez.
Qué NO probar (YAGNI aplicado a tests)
- Frameworks y librerías de terceros: ya tienen sus tests.
- Getters, setters y DTOs sin lógica.
- Detalles de implementación privados: se rompen con cada refactor y no prueban comportamiento.
- Maquetación pixel a pixel (para eso, pruebas visuales aparte y con criterio).
- El camino feliz repetido diez veces con distintos nombres.
Test que se rompe cada vez que se mueve código sin cambiar comportamiento = test mal escrito. Prueba comportamiento observable, no estructura interna.
Legado sin tests: caracterización
- Elige la frontera más estrecha que rodee lo que vas a tocar.
- Escribe tests que capturen lo que el sistema hace hoy, no lo que debería hacer (aunque sea feo — el objetivo es detectar cambios, no juzgar).
- Con la red puesta, recién ahí
refactor. - Cuando descubras que un comportamiento actual está mal, no lo corrijas en el mismo paso: anótalo y decídelo con quien manda.
Mutación: la prueba de las pruebas
- Mide qué porcentaje de fallos inyectados detecta la suite. Referencia práctica: 75-85% es sólido; por debajo de 60% hay huecos serios; 100% es inalcanzable por mutantes equivalentes.
- Córrela sobre el núcleo de dominio, no sobre todo el repo (es cara).
- Incremental sobre archivos cambiados en el día a día; completa de noche o semanal.
- Un mutante sobreviviente es una pregunta honesta: "si cambio esto y nadie se queja, ¿para qué está esta línea?" — a veces la respuesta es borrar código, no agregar un test.
Suites frágiles: causas y arreglo
| Síntoma | Causa típica | Arreglo |
| Falla 1 de cada 10 corridas | Esperas por tiempo (sleep), orden de tests, estado compartido | Esperar por condición, aislar estado, resetear BD por test |
| Falla solo en CI | Zona horaria, locale, rutas, recursos | Fijar TZ y locale en el entorno de test; rutas relativas al proyecto |
| Falla al cambiar el orden | Tests que dependen unos de otros | Cada test crea su propio dato; nada de fixtures globales mutables |
| Lenta (>5 min) | E2E de más, BD sin transacciones | Bajar de nivel: mover reglas a tests unitarios; transacción por test |
| Fechas rompen en enero | new Date() real dentro del dominio | Reloj inyectable; nunca tiempo real en lógica |
Un test intermitente que se ignora entrena al equipo a ignorar el rojo. O se arregla, o se borra: mantenerlo es peor que las dos.
Anti-racionalización
| Excusa | Realidad |
| "Escribo los tests después" | Después el código ya tiene la forma de lo intestable (dependencias duras, efectos en el constructor). El test escrito antes es también un diseño. |
| "Es muy difícil de testear" | Eso no es un problema del test: es el diseño avisando. Extrae la lógica pura del efecto. |
| "Tengo 90% de cobertura" | ¿Y de mutación? La cobertura dice qué se ejecutó; la mutación dice qué se verificó. |
| "Mockeo todo, es más rápido" | Y no prueba nada real. Los mocks de tus propios bordes se desincronizan con la realidad en silencio. |
| "El E2E cubre todo, no necesito unitarios" | Un E2E rojo dice "algo se rompió". Un unitario rojo dice qué, dónde y por qué. |
| "Ese bug no vuelve a pasar" | Vuelve. Siempre vuelve. Por eso el fix trae su test. |
Formato de salida
- Plan de pruebas: qué se prueba en cada nivel y por qué, con el mapeo AC-n → test.
- Lista de lo que explícitamente NO se prueba, con motivo.
- Tests escritos (vistos en rojo antes de verlos en verde).
- Puntaje de mutación del núcleo si aplica, con los mutantes sobrevivientes relevantes.
- Deuda de pruebas pendiente, priorizada por riesgo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

