test-setup
它能做什么
这个技能为游戏项目搭建自动化测试基础,包括文件夹、引擎的测试运行器和 CI 工作流。适合开始技术设置、希望从一开始就有测试的团队。
适用场景
- ✓当游戏项目进入技术设置阶段,并且在开始编码之前需要测试框架的时候。
- ✓当团队希望每次代码推送都自动运行测试的时候。
- ✓当项目还没有测试文件夹或 CI 工作流的时候。
技能链接
https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-setup/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我们第一个冲刺开始前,为我的 Unity 游戏设置测试框架和 CI。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会检测引擎,先给出计划,然后创建标准的测试文件夹、运行器配置以及 GitHub Actions 工作流。它只需在实施开始前运行一次。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation,workflow,qa.level
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 Setup
This skill scaffolds the automated testing infrastructure for the project. It detects the configured engine, generates the appropriate test runner configuration, creates the standard directory layout, and wires up CI/CD so tests run on every push.
Run this once during the Technical Setup phase, before any implementation begins. A test framework installed at sprint start costs 30 minutes. A test framework installed at sprint four costs 3 sprints.
Output: tests/ directory structure + .github/workflows/tests.yml
Phase 1: Detect Engine and Existing State
Read references/1-detect.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Phase 2: Present Plan
Read references/2-plan.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Phase 3: Create Directory Structure
Read references/3-directories.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Phase 4: Create CI/CD Workflow
Read references/4-ci.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Phase 5: Create Smoke Test Seed
Read references/5-smoke-seed.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Phase 6: Post-Setup Summary
Read references/6-summary.md now and follow it — this phase's steps are in that file, not here. Read it again if the conversation was compacted or resumed during this phase.
Collaborative Protocol
- Never overwrite existing test files — only create files that are missing. If a test runner file exists, leave it as-is.
- Always ask before creating files — Phase 2 requires explicit approval.
- Engine detection is non-negotiable — if the engine is not configured,
stop and redirect to
/setup-engine. Do not guess. forceflag skips the "already exists" early-exit but never overwrites. It means "create any missing files even if the directory already exists."- For Unity CI, note that the
UNITY_LICENSEsecret must be configured manually. Do not attempt to automate license management.
常见问题
我应该什么时候运行它?
在技术设置期间、实施开始之前运行一次,因为之后再设置会花费更多时间。
它会创建什么?
它会创建测试文件夹结构和一个 GitHub Actions 工作流文件。
写入前会询问我吗?
会。它会先给出计划,文件写入遵循项目的自动化设置。
详情
作者的原始描述
Scaffold the test framework and CI — tests/ directory, engine test runner, GitHub Actions workflow. Once, before the first sprint.
热度
- GitHub 星标
- 33k
- 排名
- #8504
- 许可证
- MIT
- 更新时间
- 2026/10/18
评论
- …