test-helpers
Qué hace
Esta skill crea código auxiliar reutilizable para pruebas de un proyecto de juego, adaptado a su motor y sus sistemas. Sirve para desarrolladores que escriben muchas pruebas y quieren menos código de preparación repetido.
Cuándo usarla
- ✓Cuando un equipo ha terminado la configuración de pruebas y quiere utilidades compartidas para escribirlas.
- ✓Cuando los desarrolladores repiten la misma preparación y las mismas aserciones en varias pruebas.
- ✓Cuando una carpeta de pruebas nueva del motor necesita funciones auxiliares de inicio.
Link de la skill
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/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
“Crea utilidades de prueba para mi proyecto de Godot para que nuestras pruebas necesiten menos código de preparación repetido.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill comprueba el motor y el lenguaje del proyecto y escribe archivos auxiliares de preparación, aserciones, fábricas y simulaciones en la carpeta que usa el ejecutor de pruebas del motor. Pide confirmación antes de hacer ciertos cambios.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation
Automation mode: Resolve modes.automation (project.local.yaml →
project.yaml → default collaborative). Every AskUserQuestion call and
every file write follows .claude/docs/automation-modes.md
(collaborative asks always · guided major-only · autonomous logs and proceeds;
automation_always_ask categories always prompt).
Test Helpers
Writing test cases is faster and more consistent when common setup, teardown,
and assertion patterns are abstracted into helpers. This skill generates a
tests/helpers/ library tailored to the project's actual engine, language,
and systems — so every developer writes less boilerplate and more assertions.
Output: engine-specific helper files in the engine's helper root —
the only place its test runner compiles them (.claude/docs/directory-structure.md):
| Engine | Helper root |
|---|---|
| Godot | tests/helpers/ |
| Unity | Assets/Tests/EditMode/Helpers/ — inside the EditModeTests assembly /test-setup creates. If PlayMode tests need the same helpers, ask before creating Assets/Tests/Helpers/TestHelpers.asmdef and referencing it from both test assemblies. |
| Unreal | Source/<Module>/Private/Tests/Helpers/ |
tests/helpers/ below means the helper root for the project's engine.
When to run:
- After
/test-setupscaffolds the framework (first time) - When multiple test files repeat the same setup boilerplate
- When starting to write tests for a new system
Assertions: use the project's test framework, never bare assert()
Generated helpers must assert through the configured test framework's assertion
API, resolved from testing.framework — not through GDScript's built-in
assert().
Two things go wrong with a bare assert() in a helper, and both are silent:
- It aborts the run instead of failing the test. A framework assertion
records a failure and continues, so one broken expectation yields one red test.
A bare
assert()halts execution, so the first failure hides every result after it. - It is stripped in release builds. A helper library built on
assert()stops asserting entirely in exactly the build you most want checked, and does so without any error — the tests still "pass".
Look up the assertion form for the configured framework before generating
code. Do not copy the forms in this file or in other skills' examples as
authoritative — they are illustrative and have drifted (assert_eq,
assert_true and assert_that all appear across the repo). If you cannot
confirm the correct API for the project's framework, say so and generate no
helper rather than guessing.
Helpers must not extend the framework's test-suite base class. A file in
tests/helpers/ that extends the suite type is discovered by the runner as a
test suite containing zero tests. Helpers are plain classes; only real test files
extend the suite.
1. Parse Arguments
Modes:
/test-helpers [system-name]— generate helpers for a specific system (e.g.,/test-helpers combat)/test-helpers all— generate helpers for all systems with test files/test-helpers scaffold— generate only the base helper library (no system-specific helpers); use this on first run- No argument — run
scaffoldif no helpers exist, elseall
2. Detect Engine and Language
Read from project.yaml first, falling back to .claude/docs/technical-preferences.md for any key that is absent or empty:
engine.name(else theEngine:value)engine.language(else theLanguage:value)testing.framework(elseFramework:from the Testing section)
If the engine is not configured in either source: "Engine not configured. Run /setup-engine first."
3. Load Existing Test Patterns
Scan the engine's test root for patterns already in use (Godot tests/, Unity
Assets/Tests/, Unreal Source/<Module>/Private/Tests/):
Glob pattern="tests/**/*_test.*" (Godot)
Glob pattern="Assets/Tests/**/*Tests.cs" (Unity)
Glob pattern="Source/*/Private/Tests/**/*.cpp" (Unreal)
For a representative sample (up to 5 files), read the test files and extract:
- Setup patterns (how
before_each/setUp/ fixtures are written) - Common assertion patterns (what is being asserted most often)
- Object creation patterns (how game objects or scenes are instantiated in tests)
- Mock/stub patterns (h
Preguntas frecuentes
¿Funciona con cualquier motor?
Está adaptada al motor del proyecto, como Godot, Unity o Unreal, y cada motor tiene su propia carpeta de utilidades.
¿Debo ejecutar antes la configuración de pruebas?
Sí. Las utilidades se construyen sobre el framework de pruebas, así que conviene ejecutar antes la configuración.
¿Escribe pruebas por mí?
Escribe código auxiliar para reducir el código repetitivo, mientras que las pruebas las escriben los desarrolladores.
Detalles
Descripción original del autor
Generate engine-specific test helper libraries — assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.
Popularidad
- Estrellas en GitHub
- 33 mil
- Posición en el ranking
- #8503
- Licencia
- MIT
- Actualizada
- 18/10/2026
Comentarios
- …
Más skills de este repositorio
adopt
33 milComprueba si los documentos de un juego existente siguen los formatos de la plantilla del estudio y escribe un plan de migración numerado para corregir las lagunas.
architecture-decision
33 milRedacta un registro de decisión de arquitectura para una elección técnica, con contexto, alternativas y consecuencias, revisado por los roles técnicos adecuados.
architecture-review
33 milComprueba que tus decisiones técnicas cubren todos los requisitos de diseño, no entran en conflicto y encajan con el motor, con un veredicto claro.
art-bible
33 milRedacta una biblia de arte que define la identidad visual de tu juego, para que la producción de recursos siga un único conjunto claro de reglas de estilo.
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.