test-helpers
하는 일
이 스킬은 게임 프로젝트의 엔진과 시스템에 맞춘 재사용 가능한 테스트 헬퍼 코드를 만듭니다. 테스트를 많이 쓰면서 반복되는 설정 코드를 줄이고 싶은 개발자를 위한 스킬입니다.
사용하는 경우
- ✓팀이 테스트 설정을 마쳤고 테스트 작성을 위한 공통 헬퍼가 필요할 때.
- ✓개발자가 여러 테스트에서 같은 설정과 단언을 반복하고 있을 때.
- ✓새 엔진의 테스트 폴더에 시작용 헬퍼 함수가 필요할 때.
스킬 링크
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Godot 프로젝트에 테스트 헬퍼를 만들어 주세요. 팀의 테스트가 반복되는 설정 코드를 덜 쓰도록요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 프로젝트의 엔진과 언어를 확인한 뒤, 엔진의 테스트 러너가 사용하는 폴더에 설정, 단언, 팩토리, 모의 객체용 헬퍼 파일을 씁니다. 일부 변경은 확인을 요청합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
모든 엔진에서 작동하나요?
프로젝트의 엔진, 예를 들어 Godot, Unity, Unreal에 맞춰 조정되며, 엔진마다 헬퍼 폴더가 다릅니다.
테스트 설정을 먼저 해야 하나요?
네. 헬퍼는 테스트 프레임워크 위에 만들어지므로 먼저 테스트 설정을 하는 것이 좋습니다.
테스트도 대신 써 주나요?
반복 코드를 줄이는 헬퍼 코드를 쓰며, 테스트 자체는 개발자가 작성합니다.
상세 정보
작성자의 원본 설명
Generate engine-specific test helper libraries — assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.
인기도
- GitHub 스타
- 33k
- 순위
- #8503
- 라이선스
- MIT
- 업데이트
- 2026. 10. 18.
댓글
- …
이 저장소의 다른 스킬
adopt
33k기존 게임 프로젝트의 문서가 스튜디오 템플릿 형식을 따르는지 확인하고, 빠진 부분을 고치기 위한 번호 매긴 이전 계획을 씁니다.
architecture-decision
33k기술적 선택에 대한 아키텍처 결정 기록을 쓰고, 맥락, 대안, 결과를 담으며, 적절한 기술 역할의 검토를 거치도록 돕습니다.
architecture-review
33k기술 결정이 모든 설계 요구 사항을 다루고, 서로 충돌하지 않으며, 엔진 버전에 맞는지 점검해 통과 또는 우려 판정을 명확히 줍니다.
art-bible
33k게임의 시각적 정체성을 정의하는 아트 바이블을 써서, 자산 제작이 하나의 명확한 스타일 규칙을 따르게 합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.