Hardening
Qué hace
Esta skill afina las pruebas de software comprobando la regla general que hay detrás de los ejemplos, con muchas entradas generadas. Es para desarrolladores que quieren encontrar errores que sus ejemplos no detectan.
Cuándo usarla
- ✓Cuando tus pruebas pasan, pero sospechas que no cubren los casos límite.
- ✓Cuando quieres comprobar la regla de una función con muchas entradas aleatorias.
- ✓Cuando un caso fallido debe reducirse al ejemplo más pequeño que todavía lo rompe.
Link de la skill
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Hardening/SKILL.mdCó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
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Nuestras pruebas de análisis de fechas pasan, pero creo que nos faltan casos límite. ¿Puedes reforzarlas con pruebas de propiedades?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill indica la afirmación general que hay tras tus pruebas de ejemplo y la ejecuta con muchas entradas generadas. Si algo falla, reduce el fallo a la entrada más pequeña que todavía lo rompe, y después se corrige el error o la propiedad.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Hardening Skill
Hardening sharpens tests that already exist without adding new functionality: it turns the universal claim behind a set of example tests into a fast-check property, runs it across generated inputs, and shrinks any failure to the minimal counterexample.
One intent ships. Mutation testing, complexity scoring, duplication scanning, and acceptance-test mutation were once listed here as planned; none is built, and this file no longer advertises them (external review of the v7.40.4 payload, 2026-09-03: a routing table that promises unbuilt intents is the "confidently documented, never existed" class).
Ideal State
- Every property written states the universal claim behind existing example tests, runs across generated inputs drawn from the function's real input domain, and keeps the examples it sharpens.
- Every failure ends shrunk to a minimal counterexample with its seed, and ends in either a fixed bug or a corrected property.
- What hardening lands is recorded where the system reads it: a
bun-propertyrow in the ISA's Test Strategy, and a C/R/L Learning entry when a counterexample taught something. - Functions that cannot carry a universal claim (impure, or no candidate shape) are left to example tests rather than forced into a property.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| PropertyTest | property test, property based testing, PBT, fast-check, universal quantified claim, shrink counterexample — pure functions, parsers, serializers, data transforms, invariants | Intents/PropertyTest.md |
Integration Points
- Testing Doctrine Rule #12 — names fast-check as the property-testing primitive (
LIFEOS/DOCUMENTATION/Testing/TestingDoctrine.md). - ISA format — the
bun-propertyISC type withproperty | generator | runscolumns (LIFEOS/DOCUMENTATION/ISA/ISAFormat.md§ ISC Type Vocabulary). Abun-propertyrow is a first-class assert: it counts toward every-ISC-an-assert coverage (H8) andbunker testruns it like any deterministic row. - Algorithm — hardening is elected during verification when a run's criteria warrant property depth; spend is discovered from the work.
- System prompt — Verification Is the Mechanism section at top (
LIFEOS/LIFEOS_SYSTEM_PROMPT.md).The Bunker CLI is maintainer-private and not in the public release; run code rows with
bun test ./<path>and suite rows withbun skills/Assay/Tools/EvalRunner.ts.
Gotchas
No skill-wide gotchas; the fast-check ones live in Intents/PropertyTest.md § Gotchas.
Examples
- "Property-test the slug parser" → PropertyTest → round-trip and idempotence properties in a
.property.test.tsfile at 1000 runs, abun-propertyrow in the ISA, and any failure shrunk with its seed pinned. - "What bugs are my example tests missing?" → PropertyTest → the pure functions (parsers, serializers, transforms) that have only example coverage, listed as property-test candidates.
Preguntas frecuentes
¿Sustituye mis pruebas de ejemplo?
No. Conserva los ejemplos que refuerza y añade pruebas de propiedades junto a ellos.
¿Qué funciones puede probar así?
Funciones con una regla general clara. Las funciones impuras o sin una forma de entrada clara se dejan para las pruebas de ejemplo.
¿Qué herramienta usa?
Usa fast-check, una biblioteca de pruebas basadas en propiedades.
Detalles
Descripción original del autor
Hardens LifeOS tests via property-based testing with fast-check. USE WHEN harden, hardening, property test, property based testing, PBT, fast-check, strengthen tests, find bugs example tests miss, universal quantified claim, shrink counterexample, what bugs am I missing, test the tests. NOT FOR new feature tests (bun test directly), grading agent output (Assay), UI verification (Interceptor), finding security vulnerabilities, or building new functionality.
repo: danielmiessler/LifeOS
Popularidad
- Estrellas en GitHub
- 20 mil
- Posición en el ranking
- #10430
- Licencia
- MIT
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
LifeOS
20 milAyuda a tu agente a configurar LifeOS, un sistema personal que relaciona tu situación actual con tu situación ideal mediante una entrevista y un panel.
AnnualReports
20 milAyuda a tu agente a buscar y comparar informes anuales de ciberseguridad de grandes proveedores, como las tendencias de brechas y ransomware, con una fuente para cada cifra.
ApertureOscillation
20 milEnseña a tu agente a probar una pregunta de diseño con un alcance estrecho y otro amplio, y después señalar dónde chocan las dos respuestas antes de construir.
Aphorisms
20 milPermite que tu agente busque, encuentre y registre citas atribuidas de una colección seleccionada, evitando las que se usaron hace poco en tu boletín.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.