test-helpers
Skill26k starsChanged 2 months agoMITView on GitHub
Generate engine-specific test helper libraries — assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.
4 other projects use a version of this, 3 of them edited; 3 of 3 edited versions we compared changed its rules.
How people change it
3 of 3 edited versions changed its rules, and some changes recur.
Of the 3 edited versions we compared: 3 made changes of their own.
Rules people drop
- Read from
project.yamlfirst, falling back to.claude/docs/technical-preferences.mdfor any key that is absent or empty:dropped by 3 of 3 - Read only the GDD sections this needs —
Grep pattern="^## ([0-9]+\. )?(Formulas|Edge Cases|Detailed Rules|Detailed Design)" path="design/gdd/[system].md" output_mode="content" -A 30(the optional number matches a reverse-documented GDD's …dropped by 3 of 3
Rules people add
- Read
docs/framework/technical-preferences.mdand extract:added by 3 of 3 - Read the system's GDD to extract:added by 3 of 3
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- HunLuanZhiZhu/Game-Studios-Pluginedited, first seen Oct 5, 2026
- dawn840705/codex-code-studiosedited, first seen Aug 28, 2026
- striderZA/OpenCodeGameStudiosedited, first seen Aug 10, 2026
- cenconq25/claude-code-app-studiotheir own version, first seen May 3, 2026
Who's talking about Donchitos/Claude-Code-Game-Studios
- @woody-ai-tools.bsky.social“【GitHubトレンド調査】 Claude Codeをゲーム開発スタジオに変貌させる「Claude-Code-Game-Studios」が登場。…”Bluesky · Apr 19, 2026 · 10 likes
- @github-trending.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 9,860 (+523) 🗒 Shell Turn …”Bluesky · Apr 15, 2026 · 4 likes
- @impossible.bsky.social“This is the project in question. github.com/Donchitos/Cl... Most of these projects feel like toys or …”Bluesky · May 19, 2026 · 3 likes
- @github-trending.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 13,024 (+828) 🗒 Shell Turn …”Bluesky · Apr 19, 2026 · 3 likes
- @thestackradar.bsky.social“Claude-Code-Game-Studios — Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, …”Bluesky · Nov 1, 2026 · 2 likes
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub and Bluesky (53 times).
On GitHub · 41
- Nov 19, 2026GF-ARCH-12: Studio Intelligence inspirado em Graphify, Game Studios e DeepSeek Harness — jogoiarexx-blip/gameforge-ia0 reactions
- Nov 19, 2026chore(architecture): share game-dev agents and skills — OliverRomhagen/vrigstad-joyride0 reactions · 9 comments
- Nov 15, 2026Sync upstream v1.3.0 — spirit986/Claude-Code-Game-Studios0 reactions
- Nov 13, 2026add links — rumca-js/rumca-js.github.io0 reactions
- Nov 12, 2026[추적] GDD 문서 책임과 생성 에이전트 역할 분리 — arch-spatula/isekai-generator0 reactions
36 more on GitHub
- Nov 10, 2026research: GitHub 오픈소스 10종 심층 비교 및 JARVIS 개발 세션 인계 (2026-11-10) — coddddin/jarvis-mcp0 reactions
- Nov 9, 2026feat(chaos-engine): game-studio follow-up from the 2026-11-09 study — ShaftHQ/SHAFT_ENGINE0 reactions · 2 comments
- Nov 9, 2026agent-skills.github.donchitos.claude-code-game-studios: 1.2.0 → 1.3.0 — sudosubin/agents.nix0 reactions
- Nov 9, 2026Research: inventory external Unity game-dev skills for project-local adoption — AlvaGonz/A-B-Revival0 reactions · 1 comment
- Nov 9, 2026PROJECT MASTER DIRECTIVE — Dr-sOuL7/PlayGround0 reactions · 3 comments
- Nov 8, 2026[Future Isles] Reuse and validate upstream GameDev Skills (Phaser, game systems, Blender) — alston-personal/agentmanager0 reactions · 5 comments
- Nov 6, 2026[P1] Save the text of the golden pages to evals/golden/ — minhtran3124/mnemo0 reactions · 1 comment
- Nov 3, 2026[edition] 2026-11-03 18:00 — leoneoo/ai-lianmeng0 reactions · 1 comment
- Nov 3, 2026🔥 GitHub Trending AI 早报 · 2026-11-03 · Top 5 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Nov 3, 2026Github trending [Donchitos/Claude-Code-Game-Studios] 49个agent+74技能按真实工作室层级把Claude Code变游戏团队 — web1992/github-trending0 reactions
- Nov 2, 2026🔥 GitHub Trending AI 早报 · 2026-11-03 · Top 5 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Nov 2, 2026🔥 GitHub Trending AI 早报 · 2026-11-02 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Nov 2, 2026day-035: Claude Code Game Studios — CLAUDE.md auto-discoveryを発見 — Matsushima-A-830/ai-100days0 reactions
- Nov 2, 2026Github trending [Donchitos/Claude-Code-Game-Studios] 49个agent+74技能按真实工作室层级把Claude Code变游戏团队 — web1992/github-trending0 reactions
- Nov 1, 2026today: Day 035にClaude Code Game Studiosを設定 — Matsushima-A-830/ai-100days0 reactions
- Nov 1, 2026research: 2026-11-01分のネタ候補5件をbacklog.mdに追記 — Matsushima-A-830/ai-100days0 reactions
- Nov 1, 2026🔥 GitHub Trending AI 早报 · 2026-11-02 · Top 6 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Nov 1, 2026🔥 GitHub Trending AI 早报 · 2026-11-01 · Top 7 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Nov 1, 2026Github trending [Donchitos/Claude-Code-Game-Studios] 49子代理打造完整游戏工作室 — web1992/github-trending0 reactions
- Oct 31, 2026🔥 GitHub Trending AI 早报 · 2026-11-01 · Top 7 项目 — happydog-intj/ai-xiaohongshu-daily0 reactions
- Oct 30, 2026Donchitos 'Claude-Code-Game-Studios' — 49개 에이전트·74개 스킬로 Claude Code를 게임 개발 스튜디오로, 일간 트렌딩 진입 (10/29, GitHub) — roomedia/ax-trend0 reactions
- Oct 25, 2026Import Claude Code Game Studios into .claude — RoxorLoops1337/Games0 reactions · 1 comment
- Oct 21, 2026Skill mới cho agent: soát cân bằng, chống gian lận, soak/perf, bot chập chờn, phân loại chơi thử — nguyenbinhanltv/soul-land-mmo0 reactions
- Oct 19, 2026agent-skills.github.donchitos.claude-code-game-studios: 1.1.3 → 1.2.0 — sudosubin/agents.nix0 reactions
- Oct 15, 2026研究作者列出的 16 個遊戲引擎與 AI 專案;新增 economy-balance skill — a91453/railway-game-ios0 reactions
- Oct 13, 2026agent-skills.github.donchitos.claude-code-game-studios: 1.1.2 → 1.1.3 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.donchitos.claude-code-game-studios: 1.1.0 → 1.1.2 — sudosubin/agents.nix0 reactions
- Sep 26, 2026agent-skills.github.donchitos.claude-code-game-studios: init at 1.1.0 — sudosubin/agents.nix0 reactions
- Sep 25, 2026Add Game Studios, rohitg00, BaseGold, and MineSwap — CryptoSuess/FoutainOfYouth0 reactions
- Aug 6, 2026技能侦察 2026-08-06 01:00Z:+8 精选(220) — NyphSan/CursorSkill0 reactions
- Aug 5, 2026技能侦察 DIGEST 2026-08-05 21:00Z:+8 一致性/体素/动画与 AngelScript·Art Bible — NyphSan/CursorSkill0 reactions
- Apr 30, 2026docs: add shields.io badges to README.md / README.ja.md — kirin0198/aphelion-agents0 reactions
- Apr 18, 2026📱 SNS 콘텐츠 - 2026-04-18 16:10 KST — leaf468/autothreads0 reactions
- Apr 18, 2026🤖 AI 트렌드 리포트 - 2026-04-18 16:10 KST — leaf468/autothreads0 reactions
- Apr 6, 2026Audit candidate: Donchitos/Claude-Code-Game-Studios — xiaolai/nlpm0 reactions · 2 comments
- Mar 22, 2026Add game studio agent support to agent-tools (adapted from Claude-Code-Game-Studios) — Unwrenchable/agent-tools0 reactions
On Bluesky · 12
- Apr 19, 2026【GitHubトレンド調査】 Claude Codeをゲーム開発スタジオに変貌させる「Claude-Code-Game-Studios」が登場。… — @woody-ai-tools.bsky.social10 likes and reposts
- Apr 15, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 9,860 (+523) 🗒 Shell Turn Claude Code into a full game dev… — @github-trending.bsky.social4 likes and reposts · 1 reply
- May 19, 2026This is the project in question. github.com/Donchitos/Cl... Most of these projects feel like toys or performance art masquerading as useful… — @impossible.bsky.social3 likes and reposts · 2 replies
- Apr 19, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 13,024 (+828) 🗒 Shell Turn Claude Code into a full game dev… — @github-trending.bsky.social3 likes and reposts · 1 reply
- Nov 1, 2026Claude-Code-Game-Studios — Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination… — @thestackradar.bsky.social2 likes and reposts
7 more on Bluesky
- Nov 1, 2026An entire game dev studio in one Claude session? 🎮 Claude-Code-Game-Studios turns Claude Code into an AI production studio: 49 agents, 72… — @thestackradar.bsky.social1 likes and repost
- Oct 31, 2026今日のGitHubトレンド Donchitos/Claude-Code-Game-Studios Claude Codeのセッションを擬似的なゲーム開発スタジオとして運用するためのツールです。… — @dailygithubtrends.bsky.social1 likes and repost
- May 19, 2026It was this one: github.com/Donchitos/Cl... — @dphrygian.com1 likes and repost · 1 reply
- Apr 21, 2026https://github.com/Donchitos/Claude-Code-Game-Studios — @tom-doerr.bsky.social1 likes and repost
- Apr 1, 2026Un studio de 48 agents IA spécialisés dans Claude Code : hiérarchie complète (directors, leads, specialists), workflows automatisés et… — @camilleroux.com1 likes and repost
- Nov 2, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 33,084 (+1,380) 🗒 Shell Turn Claude Code into a full game… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Oct 29, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 Donchitos / Claude-Code-Game-Studios ⭐ 28,645 (+538) 🗒 Shell Turn Claude Code into a full game dev… — @github-trending.bsky.social0 likes and reposts · 1 reply
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- striderZA/OpenCodeGameStudios★ 9085% same
- dawn840705/codex-code-studios★ 1785% same
- HunLuanZhiZhu/Game-Studios-Plugin★ 185% same
Wrote their own version · 1
- cenconq25/claude-code-app-studio★ 41same name
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 repository78 other files it gives its agents.
- CCGS Skill Testing Framework/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- design/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- adoptSkill
- architecture-decisionSkill
- architecture-reviewSkill
- art-bibleSkill
- asset-auditSkill
- asset-specSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- code-reviewSkill
- consistency-checkSkill
- content-auditSkill
- create-architectureSkill
- create-control-manifestSkill
- create-epicsSkill
- create-storiesSkill
- day-one-patchSkill
- design-reviewSkill
- design-systemSkill
- dev-storySkill
- estimateSkill
- gate-checkSkill
- helpSkill
- hotfixSkill
- launch-checklistSkill
- localizeSkill
- map-systemsSkill
- milestone-reviewSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- playtest-reportSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- qa-planSkill
- quick-designSkill
- regression-suiteSkill
- release-checklistSkill
- retrospectiveSkill
- reverse-documentSkill
- review-all-gddsSkill
- scope-checkSkill
- security-auditSkill
- settingsSkill
- setup-engineSkill
- skill-improveSkill
- skill-testSkill
- smoke-checkSkill
- soak-testSkill
- sprint-planSkill
- sprint-statusSkill
- startSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 3 are common, 0 are distinctive, and 10 are very specific to this project.
3
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
After /test-setup scaffolds the framework (first time)
- Common: line 38
When multiple test files repeat the same setup boilerplate
- Common: line 39
When starting to write tests for a new system
- Very specific: line 81
No argument — run scaffold if no helpers exist, else all
- Very specific: line 87
Read from project.yaml first, falling back to .claude/docs/technical-preferences.md for any key that is absent or empty:
- Very specific: line 92
If the engine is not configured in either source: "Engine not configured.
- Very specific: line 382
Read only the GDD sections this needs — Grep pattern="^## ([0-9]+\.
- Very specific: line 441
Ask: "May I write these helper files to [helper root]?"
- Very specific: line 443
Never overwrite existing files: If a file already exists, report: "Skipping [path] — already exists.
- Common: line 447
After writing: Verdict: COMPLETE — helper files created.
- Very specific: line 469
Run /test-setup if the test framework has not been scaffolded yet.
- Very specific: line 470
Use /dev-story to implement stories — helpers reduce boilerplate in new test files.
- Very specific: line 471
Run /skill-test to validate other skills that may need helper coverage.
“Common” is measured: kept by at least 6 in 10 of the 4 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
!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 (how dependencies are replaced)
This ensures generated helpers match the project's existing style, not a generic template.
Also read:
design/gdd/systems-index.md— to know which systems exist- In-scope GDD(s) — to understand what data types and values need testing
docs/architecture/tr-registry.yaml— to map requirements to tested systems
4. Generate Engine-Specific Helpers
Godot 4 (GDUnit4 / GDScript)
FAIL_IF(...)in the example below is a PLACEHOLDER, not an API. It marks the one line you must resolve from the project's actual test framework before emitting any of this, per the rule in §2. Substitute the framework's real failure call — the form that registers a failure with the runner and lets the suite continue — and delete the marker comment.It is deliberately not spelled
assert_that,assert_eqorassert_true. All three appear somewhere in this repo, they disagree, and GdUnit4's API is not covered bydocs/engine-reference/— so writing any of them here would be asserting an API this repo cannot source, in the file whose whole job is to stop people doing that. If you cannot confirm the correct call for the configured framework, §2 already tells you the answer: generate no helper. An unresolvedFAIL_IFreaching disk is a bug; a missing helper is a task.Worked examples must obey §2 too — a bare
assert()here would be the exact form §2 forbids, sixty lines below §2 forbidding it. A rule stated in prose does not reach its own worked example unless someone makes it.
Base helper (tests/helpers/game_assertions.gd):
## Game-specific assertion utilities for [Project Name] tests.
## Domain-specific helpers built on the project's test framework.
##
## Usage (static — no instance needed):
## GameAssertions.assert_in_range(entity.health, 0, entity.max_health, "health")
class_name GameAssertions
extends RefCounted
## Assert a value is within the inclusive range [min_val, max_val].
## Use for any formula output that has defined bounds in a GDD.
static func assert_in_range(
value: float,
min_val: float,
max_val: float,
label: String = "value"
) -> void:
# FRAMEWORK ASSERT — resolve per the rule above; do not emit `assert()`.
FAIL_IF(
not (value >= min_val and value <= max_val),
"%s %.2f is outside expected range [%.2f, %.2f]" % [label, value, min_val, max_val]
)
## Assert a signal was emitted during a callable block.
## Usage: assert_signal_emitted(entity, "health_changed", func(): entity.take_damage(10))
static func assert_signal_emitted(
obj: Object,
signal_name: String,
action: Callable
) -> void:
# A lambda captures a local by value: `emitted = true` inside it would set
# the lambda's own copy. Mutate a Dictionary it shares instead. `...args`
# (4.5+) accepts a signal with any number of arguments.
var state := {"emitted": false}
obj.connect(signal_name, func(...args): state.emitted = true)
action.call()
# FRAMEWORK ASSERT — resolve per the rule above; do not emit `assert()`.
FAIL_IF(not state.emitted, "Expected signal '%s' to be emitted, but it was not." % signal_name)
## Assert that a callable does NOT emit a signal.
static func assert_signal_not_emitted(
obj: Object,
signal_name: String,
action: Callable
) -> void:
var state := {"emitted": false} # a Dictionary, as above
obj.connect(signal_name, func(...args): state.emitted = true)
action.call()
# FRAMEWORK ASSERT — resolve per the rule above; do not emit `assert()`.
FAIL_IF(state.emitted, "Expected signal '%s' NOT to be emitted, but it was." % signal_name)
## Assert a node exists at path within a parent.
static func assert_node_exists(parent: Node, path: NodePath) -> void:
# FRAMEWORK ASSERT — resolve per the rule above; do not emit `assert()`.
FAIL_IF(
not parent.has_node(path),
"Expected node at path '%s' to exist." % str(path)
)Factory helper (tests/helpers/game_factory.gd):
## Factory functions for creating test game objects.
## Returns minimal objects configured for unit testing (no scene tree required).
##
## Usage: var player = GameFactory.make_player(health: 100)
class_name GameFactory
extends RefCounted
## Create a minimal player-like object for testing.
## Override fields as needed.
static func make_player(health: int = 100) -> Node:
var player = Node.new()
player.set_meta("health", health)
player.set_meta("max_health", health)
return playerScene helper (tests/helpers/scene_runner_helper.gd):
## Utilities for scene-based integration tests. For input simulation and frame
## stepping, use gdUnit4's own `scene_runner()` from inside the suite.
class_name SceneRunnerHelper
extends RefCounted
## Load a scene under `host` — the calling test suite, which passes `self` —
## and wait one frame for _ready() to complete. A plain class, so the runner
## never discovers this file as a suite with zero tests.
static func load_scene_and_wait(host: Node, scene_path: String) -> Node:
var scene: Node = load(scene_path).instantiate()
host.add_child(scene)
await host.get_tree().process_frame
return sceneUnity (NUnit / C#)
Base helper (Assets/Tests/EditMode/Helpers/GameAssertions.cs):
using NUnit.Framework;
using UnityEngine;
/// <summary>
/// Game-specific assertion utilities for [Project Name] tests.
/// Extends NUnit's Assert with domain-specific helpers.
/// </summary>
public static class GameAssertions
{
/// <summary>
/// Assert a value is within an inclusive range [min, max].
/// Use for any formula output defined in GDD Formulas sections.
/// </summary>
public static void AssertInRange(float value, float min, float max, string label = "value")
{
Assert.That(value, Is.InRange(min, max),
$"{label} ({value:F2}) is outside expected range [{min:F2}, {max:F2}]");
}
/// <summary>Assert a UnityEvent or C# event was raised during an action.</summary>
public static void AssertEventRaised(ref bool wasCalled, System.Action action, string eventName)
{
wasCalled = false;
action();
Assert.IsTrue(wasCalled, $"Expected event '{eventName}' to be raised, but it was not.");
}
/// <summary>Assert a component exists on a GameObject.</summary>
public static void AssertHasComponent<T>(GameObject obj) where T : Component
{
var component = obj.GetComponent<T>();
Assert.IsNotNull(component,
$"Expected GameObject '{obj.name}' to have component {typeof(T).Name}.");
}
}Factory helper (Assets/Tests/EditMode/Helpers/GameFactory.cs):
using UnityEngine;
/// <summary>
/// Factory methods for creating minimal test objects without loading scenes.
/// </summary>
public static class GameFactory
{
/// <summary>Create a minimal GameObject with a named component for testing.</summary>
public static GameObject MakeGameObject(string name = "TestObject")
{
var go = new GameObject(name);
return go;
}
/// <summary>
/// Create a ScriptableObject of type T for data-driven tests.
/// Dispose with Object.DestroyImmediate after test.
/// </summary>
public static T MakeScriptableObject<T>() where T : ScriptableObject
{
return ScriptableObject.CreateInstance<T>();
}
}Unreal Engine (C++)
Base helper (Source/<Module>/Private/Tests/Helpers/GameTestHelpers.h):
#pragma once
#include "CoreMinimal.h"
#include "Misc/AutomationTest.h"
/**
* Game-specific assertion macros and helpers for [Project Name] automation tests.
* Include in any test file that needs domain-specific assertions.
*
* Usage:
* GAME_TEST_ASSERT_IN_RANGE(TestName, DamageValue, 10.0f, 50.0f, TEXT("Damage"));
*/
// Assert a float value is within inclusive range [Min, Max]
#define GAME_TEST_ASSERT_IN_RANGE(TestName, Value, Min, Max, Label) \
TestTrue( \
FString::Printf(TEXT("%s (%.2f) in range [%.2f, %.2f]"), Label, Value, Min, Max), \
(Value) >= (Min) && (Value) <= (Max) \
)
// Assert a UObject pointer is valid (not null, not garbage collected)
#define GAME_TEST_ASSERT_VALID(TestName, Ptr, Label) \
TestTrue( \
FString::Printf(TEXT("%s is valid"), Label), \
IsValid(Ptr) \
)
// Assert an Actor is in the world (spawned successfully)
#define GAME_TEST_ASSERT_SPAWNED(TestName, ActorPtr, ClassName) \
TestNotNull( \
FString::Printf(TEXT("Spawned actor of class %s"), TEXT(#ClassName)), \
ActorPtr \
)
/**
* Helper to create a minimal test world.
* Remember to call World->DestroyWorld(false) in teardown.
*/
namespace GameTestHelpers
{
inline UWorld* CreateTestWorld(const FString& WorldName = TEXT("TestWorld"))
{
UWorld* World = UWorld::CreateWorld(EWorldType::Game, false);
FWorldContext& WorldContext = GEngine->CreateNewWorldContext(EWorldType::Game);
WorldContext.SetCurrentWorld(World);
return World;
}
}5. Generate System-Specific Helpers
For [system-name] or all modes, generate a helper per system:
Read only the GDD sections this needs — Grep pattern="^## ([0-9]+\. )?(Formulas|Edge Cases|Detailed Rules|Detailed Design)" path="design/gdd/[system].md" output_mode="content" -A 30 (the optional number matches a reverse-documented GDD's ## 4. Formulas) — rather than a full read (every peer skill section-greps GDDs; in all mode a full read multiplies across each system's 400+-line GDD). Extract:
- Data types (entity types, component names)
- Formula variables and their bounds
- Common test scenarios mentioned in Edge Cases
Generate tests/helpers/[system]_factory.[ext] with factory functions
specific to that system's objects.
Example pattern for a combat system (Godot/GDScript):
## Factory and assertion helpers for Combat system tests.
## Generated by /test-helpers combat on [date].
## Based on: design/gdd/combat.md
class_name CombatTestFactory
extends RefCounted
const DAMAGE_MIN := 0
const DAMAGE_MAX := 999 # From GDD: damage formula upper bound
## Create a minimal attacker object for damage formula tests.
static func make_attacker(attack: float = 10.0, crit_chance: float = 0.0) -> Node:
var attacker = Node.new()
attacker.set_meta("attack", attack)
attacker.set_meta("crit_chance", crit_chance)
return attacker
## Create a minimal target object for damage receive tests.
static func make_target(defense: float = 0.0, health: float = 100.0) -> Node:
var target = Node.new()
target.set_meta("defense", defense)
target.set_meta("health", health)
target.set_meta("max_health", health)
return target
## Assert damage output is within GDD-specified bounds.
static func assert_damage_in_bounds(damage: float) -> void:
GameAssertions.assert_in_range(damage, DAMAGE_MIN, DAMAGE_MAX, "damage")6. Write Output
Present a summary of what will be created:
## Test Helpers to Create
Base helpers (engine: [engine], helper root: [helper root]):
- [helper root]/game_assertions.[ext]
- [helper root]/game_factory.[ext]
[engine-specific extras]
System helpers ([mode]):
- [helper root]/[system]_factory.[ext] ← from [system] GDDAsk: "May I write these helper files to [helper root]?"
Never overwrite existing files. If a file already exists, report:
"Skipping [path] — already exists. Remove the file manually if you want it
regenerated."
After writing: Verdict: COMPLETE — helper files created.
"Helper files created. To use them in a test:
- Godot:
class_nameis auto-imported — no explicit import needed - Unity: Add
usingdirective or reference the test assembly - Unreal:
#include \"Tests/Helpers/GameTestHelpers.h\"(from inside the module)"
Collaborative Protocol
- Never overwrite existing helpers — they may contain hand-written customisations. Only generate new files that don't exist yet
- Generated code is a starting point — the generated factory functions use metadata patterns for simplicity; adapt to the actual class structure once the code exists
- Helpers should reflect the GDD — bounds and constants in helpers should trace to GDD Formulas sections, not invented values
- Ask before writing — always confirm before creating files in
tests/
Next Steps
- Run
/test-setupif the test framework has not been scaffolded yet. - Use
/dev-storyto implement stories — helpers reduce boilerplate in new test files. - Run
/skill-testto validate other skills that may need helper coverage.
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.

