test-helpers
What it does
This skill creates reusable test helper code for a game project, matched to its engine and systems. It is for developers who write many tests and want less repeated setup code.
When to use it
- βWhen a team has finished test setup and wants shared helpers for writing tests.
- βWhen developers keep repeating the same setup and assertions across tests.
- βWhen a new engine test folder needs starter helper functions.
Skill link
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate test helpers for my Godot project so our tests need less repeated setup code.β
5 new skills a week. 1 minute to read.
How it works
The skill checks the project's engine and language, then writes helper files for setup, assertions, factories and mocks in the folder the engine's test runner uses. It asks before making certain changes.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Does it work with any engine?
It is tailored to the project's engine, such as Godot, Unity or Unreal, and each engine has its own helper folder.
Should I run test setup first?
Yes. The helpers are built on the test framework, so it is best to run test setup first.
Does it write tests for me?
It writes helper code to reduce boilerplate, while the tests themselves are written by developers.
Details
Original description by the author
Generate engine-specific test helper libraries β assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8503
- License
- MIT
- Updated
- 10/18/2026
Comments
- β¦
More skills from this repository
adopt
33kChecks whether an existing game project's documents follow the studio template's formats, then writes a numbered migration plan to fix any gaps.
architecture-decision
33kWrites an architecture decision record for a technical choice, covering context, alternatives, and consequences, with review by the right technical roles.
architecture-review
33kChecks that your technical decisions cover every design requirement, do not conflict, and fit the engine version, with a clear pass or concern verdict.
art-bible
33kWrites an art bible that defines your game's visual identity, so asset production follows one clear set of style rules.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.