test-helpers
O que ela faz
Esta skill cria código auxiliar de teste reutilizável para um projeto de jogo, adaptado à sua engine e aos seus sistemas. É para desenvolvedores que escrevem muitos testes e querem menos código de preparação repetido.
Quando usar
- ✓Quando a equipe concluiu a configuração de testes e quer funções auxiliares compartilhadas para escrever testes.
- ✓Quando desenvolvedores repetem a mesma preparação e as mesmas asserções em vários testes.
- ✓Quando uma nova pasta de testes da engine precisa de funções auxiliares iniciais.
Link da skill
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Crie funções auxiliares de teste para o meu projeto em Godot, para que nossos testes precisem de menos código de preparação repetido.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill verifica a engine e a linguagem do projeto e depois escreve arquivos auxiliares para preparação, asserções, fábricas e mocks, na pasta que o executor de testes da engine usa. Ela pede confirmação antes de certas mudanças.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Ela funciona com qualquer engine?
Ela é adaptada à engine do projeto, como Godot, Unity ou Unreal, e cada engine tem sua própria pasta de auxiliares.
Devo rodar a configuração de testes antes?
Sim. As funções auxiliares são construídas sobre o framework de testes, então é melhor configurá-lo antes.
Ela escreve os testes para mim?
Ela escreve código auxiliar para reduzir o trabalho repetitivo. Os testes em si são escritos pelos desenvolvedores.
Detalhes
Descrição original do autor
Generate engine-specific test helper libraries — assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.
Popularidade
- Estrelas no GitHub
- 33 mil
- Posição no ranking
- #8503
- Licença
- MIT
- Atualizada em
- 18/10/2026
Comentários
- …
Mais skills deste repositório
adopt
33 milVerifica se os documentos de um projeto de jogo existente seguem os formatos do template do estúdio e, em seguida, escreve um plano de migração numerado para corrigir as lacunas.
architecture-decision
33 milEscreve um registro de decisão de arquitetura para uma escolha técnica, cobrindo contexto, alternativas e consequências, com revisão pelos papéis técnicos adequados.
architecture-review
33 milVerifica se suas decisões técnicas cobrem todos os requisitos de design, não entram em conflito e se encaixam na versão da engine, com um veredito claro de aprovação ou de preocupação.
art-bible
33 milEscreve um art bible que define a identidade visual do seu jogo, para que a produção de recursos siga um único conjunto claro de regras de estilo.
Skills parecidas
test-driven-development
311 milEnsina seu agente a escrever primeiro um teste que falha, ver a falha e depois escrever o menor código que passa, antes de criar qualquer funcionalidade ou correção.
verification-before-completion
311 milEnsina seu agente a rodar verificações reais e ler a saída antes de afirmar que uma tarefa, correção ou build está concluído ou passando.
migrate-to-shoehorn
310 milSubstitui conversões de tipo arriscadas nos seus arquivos de teste pela biblioteca shoehorn, para que os testes usem dados parciais e ainda passem na checagem de tipos.