test-setup
Skill4 starsChanged 46 days agoMITView on GitHub
Sets up the test strategy and infrastructure for the chosen stack — unit/e2e runners, testcontainers or a compose test profile, contract tests from GraphQL/OpenAPI, axe/Lighthouse/k6 hooks, CI stages, coverage thresholds — into docs/architecture/test-strategy.md and, with `--apply`, config files. Run after /setup-stack before the first story, for 'set up testing', 'add e2e tests'.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- striderZA/OpenCodeGameStudiostheir own version, first seen Nov 4, 2026
- Donchitos/Claude-Code-Game-Studiostheir own version, first seen Oct 19, 2026
- venus2099/codex-game-studiostheir own version, first seen Oct 17, 2026
- HunLuanZhiZhu/Game-Studios-Plugintheir own version, first seen Oct 5, 2026
- dawn840705/claude-code-studiostheir own version, first seen Aug 28, 2026
- dawn840705/codex-code-studiostheir own version, first seen Aug 28, 2026
Used with
Projects with it also use vertical-slice.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hongyuancSkillvertical-slice
Build and evaluate a production-quality vertical slice before advancing from Pre-Production to Production.
Also in 4 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- striderZA/OpenCodeGameStudios★ 118same name
- cenconq25/claude-code-app-studio★ 40same name
- dawn840705/codex-code-studios★ 17same name
- lilangMax/ClaudeCodeGameStudios★ 8same name
- hongyuanc/codex-game-studios★ 5same name
- dawn840705/claude-code-studios★ 1same name
- evgenii-studitskikh/Claude-Code-SaaS-Studio★ 1same name
- HunLuanZhiZhu/Game-Studios-Plugin★ 1same name
- venus2099/codex-game-studios★ 1same name
1 more not listed
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 repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- testing/CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- adoptSkill
- api-contractSkill
- architecture-decisionSkill
- architecture-reviewSkill
- backlogSkill
- brainstormSkill
- changelogSkill
- code-reviewSkill
- collaboration-protocolSkill
- create-storiesSkill
- data-modelSkill
- dependency-auditSkill
- deploySkill
- design-systemSkill
- dev-storySkill
- docsSkill
- feature-specSkill
- game-conceptSkill
- hardenSkill
- helpSkill
- hotfixSkill
- impactSkill
- incidentSkill
- initSkill
- migrateSkill
- pentestSkill
- perf-auditSkill
- product-specSkill
- qa-planSkill
- refactorSkill
- release-checklistSkill
- retrospectiveSkill
- security-auditSkill
- setup-stackSkill
- skill-improveSkill
- skill-testSkill
- sprint-planSkill
- sprint-statusSkill
- stack-updateSkill
- startSkill
- story-doneSkill
- team-featureSkill
- team-gameSkill
- team-releaseSkill
- team-securitySkill
- tech-debtSkill
- threat-modelSkill
- updateSkill
- ux-specSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Docker: Run docker --version. Without docker, say that the compose test profile and testcontainers cannot run here.
- Very specific: line 35
After the "write" answer: touch .claude/.write-consent (rule 7 — the consent-guard hook checks the marker).
- Very specific: line 61
Self-check: before finishing: docker compose --profile test config when docker is available, and every service named in test-strategy.md …
- Very specific: line 66
When HEAD is a story branch, name it and ask one AskUserQuestion: switch to the default branch and commit there (Recommended — a …
“Common” is measured: kept by at least 6 in 10 of the 10 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
Test Setup
Reply in the project conversation language (CLAUDE.md → Language); code, identifiers, paths and commit messages stay in English.
Template templates/test-strategy.md; reference stack-reference/testing.md; rules rules/tests.md.
In the steps below, <templates> is .claude/docs/templates/ in copy mode and ${CLAUDE_PLUGIN_ROOT}/docs/templates/ in plugin mode; a studio agent is web-studio:<name> in plugin mode and <name> in copy mode; <hooks> is .claude/hooks/ in copy mode and ${CLAUDE_PLUGIN_ROOT}/hooks/ in plugin mode.
Phase 1: Stack and current state
- Read
.claude/docs/technical-preferences.md. When it is missing or its**Type**:is still[TO BE CONFIGURED], stop withBLOCKED (stack not configured — run /setup-stack first)and write nothing. - Inventory what exists (
vitest.config,playwright.config,phpunit.xml,_test.go, workflows) and list the gaps. - Docker. Run
docker --version. Without docker, say that the compose test profile and testcontainers cannot run here; the strategy is still drafted, the Phase 4 compose self-check is named as skipped, and the verdict isPARTIAL (missing tool: docker).
Phase 2: Strategy (draft)
- Levels: a table of tools per level and language.
- The
testenvironment: compose profile or testcontainers. - Contract tests per API style: GraphQL — codegen check + N+1 test; REST — schema validation.
- Stages and rules: security/a11y/perf stages; thresholds; flaky rules (no fixed waits, errors by identity).
- PHP under
php_architecture: layered: the tests-by-layer table fromphp.md— domain with data providers and no doubles, application with mocked ports, infrastructure intests/Integration/with containers — and the coverage gate with the thresholds from technical-preferences (default Domain 90 % / Application 80 %). - Go under
go_architecture: layered: the tests-by-layer table fromgo.md— domain without doubles, use cases with fakes/moq, infrastructure with containers — and the coverage gate with the thresholds from technical-preferences (default domain 90 % / usecase 80 %). - CI stages within the budget rules of
stack-reference/tooling-devops.md§ CI: one job per toolchain,paths:filters, e2e and security on pull requests to the default branch,concurrency: cancel-in-progress,runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}. Estimate the minutes per run and per month at the project's current merge rate. On a private repository the free tier is 2 000 minutes a month and every job is rounded up to the minute, so a seven-job pipeline of forty-second jobs costs seven minutes per push. - Config list: the files Phase 4 will create or change (per the Go and PHP lists there, the CI workflow, any compose fragment).
Phase 3: Write gate
- Show the strategy rendered as tables, and the config list.
- Ask "May I write
docs/architecture/test-strategy.mdand the configs [list]?" as oneAskUserQuestion: write (Recommended) · show the draft/diff first · not now. Configs are generated only with--applyor with consent in this answer; either way nothing is written before it. - After the "write" answer:
touch .claude/.write-consent(rule 7 — the consent-guard hook checks the marker). - Write
docs/architecture/test-strategy.md.
Phase 4: Configs (--apply or with consent)
test-engineer via Task writes the configs and a first smoke test per level; devops-engineer writes the CI stages. The brief lists exactly the files the Phase 3 answer covered. A subagent cannot ask the user: anything beyond its brief comes back to the parent, which asks.
Go module — templates from <templates>go/, copied with cp, never retyped:
.golangci.ymlfromgolangci.yml:MODULE_PATHreplaced fromgo.mod; thedepguardblock kept underlayered, removed undermodular;go_domain_allowentries added to thedomainallow-list.scripts/coverage-gate.shfromcoverage-gate.sh, thenchmod +x(a file created with Write has no exec bit).- The
fmt/lint/test/coverage-gate/layout-check/arch-check/ci/ci-fulltargets fromMakefile.snippet, merged into the Makefile withGO_COVERAGE_DOMAIN/GO_COVERAGE_USECASEset from technical-preferences;layout-checkis dropped fromciundergo_composition_root: main. moqas atooldirective when a port has more than three methods.make ciruns once and its output is in the result. A gate that has never failed on purpose is not known to work, so the run also showsmake coverage-gate GO_COVERAGE_DOMAIN=100failing on the current numbers.
PHP project — templates from <templates>php/, copied with cp:
deptrac.yaml:FRAMEWORK_NAMESPACESreplaced by the value the framework file names (yii3.md,symfony.md,laravel.md,php.mdfor slim/none); kept underlayered, removed underframework;php_domain_allownamespaces added to theVendorlayer.- The analyser config for
php_static_analysis(phpstan.neon/psalm.xml) and the coding-standard config forphp_cs_tool(ecs.php/.php-cs-fixer.dist.php). phpunit.xml, withtests/Unit/andtests/Integration/created and a.gitkeepin the empty one.scripts/coverage-gate.php.- The
scriptsblock fromcomposer-scripts.jsonmerged intocomposer.json, with the lines of the chosen tools, and the thresholds from technical-preferences written into thecoverage-gateline. require-dev:deptrac/deptrac, the analyser, the standard tool (withslevomat/coding-standardwhen it isecs— the template's comment sniffs need it) andphpunit/phpunit:^13; pcov in the CI image.composer ciruns once and its output is in the result; the run also showscomposer coverage-gate -- Domain=100failing on the current numbers.
CI stages follow the Phase 2 budget rules. Every command run in this phase has its output in the result.
Everything the generated CI references must exist after this run. A compose profile or service named in a workflow (docker compose --profile test …) is created in the same run as a minimal compose.yaml fragment (profile + services with healthchecks). Otherwise stop with BLOCKED (compose profile 'test' missing — story S-NNN adds it), naming the story — never a CI that cannot pass.
Self-check before finishing: docker compose --profile test config when docker is available, and every service named in test-strategy.md exists in compose.
Phase 5: Commit (documents lane)
Right after the write, one commit gate (rule 7, .claude/docs/git-workflow.md § Documents): docs: test strategy, staging exactly the written pipeline documents. Record the gate before asking — <hooks>session-state.sh set Gate "/test-setup Phase 5: commit?" — and clear it after the answer (<hooks>session-state.sh set Gate "—").
- On the default branch when no story work is in progress.
- When HEAD is a story branch, name it and ask one
AskUserQuestion: switch to the default branch and commit there (Recommended — a pipeline-wide document) · commit here (the document belongs to this story) · leave uncommitted. - Configs, CI workflows and scripts are toolchain work, not documents: they do not ride the
docs:commit. Name them in the result and offer the chore lane for them (git-workflow.md § Chore / infra).
Nothing is committed without the answer.
Verdict: COMPLETE | PARTIAL (missing tool: …) | BLOCKED (compose profile missing — …) | BLOCKED (stack not configured — …). The report states the estimated CI minutes per run and per month. Next step — one AskUserQuestion: /create-stories (Recommended) · /qa-plan · revise the strategy.
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.

