test-setup
Skill0 starsChanged 6 months agoMITView on GitHub
Set up a frontend project's testing architecture from scratch: unit tests + end-to-end (e2e) tests + a shared mock layer with a single fixtures source, then produce a "how to run" report. Framework-agnostic recommended stack — Vue or React, Vitest, Playwright, MSW — with templates for both monorepo (pnpm/turbo, npm/yarn workspaces) and single-package layouts, and CI templates for GitHub Actions and GitLab CI. 为前端项目从零配置测试架构:单测 + e2e + 共享 mock 层(fixtures 单一数据源),并产出"怎么跑"的接入报告。推荐栈框架无关,支持 monorepo 与单包,附 GitHub Actions 与 GitLab CI 模板。 Use this skill whenever the user wants to: - "/test-setup", "配置测试 / 搭测试架构 / 接入测试 / 配 e2e / 配单测 / 初始化测试" - "set up testing", "add a test framework", "configure Playwright/Vitest for this project" - "give this app/project the same testing setup", "搬一套测试架构过来" - "tests won't run, help me configure it", "测试环境跑不起来" Trigger even when the user doesn't name a runner — any request to bootstrap/replicate a frontend testing foundation should use this skill.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- HunLuanZhiZhu/Game-Studios-Plugintheir own version, first seen Oct 5, 2026
- Donchitos/Claude-Code-Game-Studiostheir own version, first seen Sep 29, 2026
- gonimar/claude-web-studiotheir own version, first seen Sep 27, 2026
- dawn840705/codex-code-studiostheir own version, first seen Aug 28, 2026
- striderZA/OpenCodeGameStudiostheir own version, first seen Aug 10, 2026
- evgenii-studitskikh/Claude-Code-SaaS-Studiotheir own version, first seen Jun 10, 2026
Used with
Projects with it also use playtest-report, team-audio and 6 more.
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.
CoralGameSkillplaytest-report
Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.
Also in 4 projects that use this
CoralGameSkillteam-audio
Orchestrate audio team: audio-director + sound-designer + technical-artist + gameplay-programmer for full audio pipeline from direction to implementation.
Also in 4 projects that use this
MRCalderon3DSkillart-bible
Define a visual direction that artists, UI, technical art, and marketing can execute consistently.
Also in 4 projects that use this
striderZASkillreview-all-gdds
Holistic cross-GDD consistency and game design review. Reads all system GDDs simultaneously and checks for contradictions between them, stale references, ownership conflicts, formula incompatibilities, and game design theory violations (dominant strategies, economic imbalance, cognitive overload, pillar drift). Run after all MVP GDDs are written, before architecture begins.
Also in 3 projects that use this
- +4 more from CoralGame
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- striderZA/OpenCodeGameStudios★ 90same name
- cenconq25/claude-code-app-studio★ 41same name
- dawn840705/codex-code-studios★ 17same name
- gonimar/claude-web-studio★ 5same name
- evgenii-studitskikh/Claude-Code-SaaS-Studio★ 1same name
- HunLuanZhiZhu/Game-Studios-Plugin★ 1same 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 repositoryOne other file it gives its agents.
- test-genSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
If unsure, ask: where's the target, is it a monorepo, which package manager, which framework.
- Distinctive: line 56
Dependencies: add the runner + framework test utils + MSW + jsdom etc.
- Very specific: line 57
First specs: create the e2e dir + one smoke spec + helpers.*, and one minimal unit test, to prove the wiring works.
- Very specific: line 72
If red, see the "common pitfalls" table in references/blueprint.md (jsdom missing APIs, transform/deps inlining for workspace source …
- Distinctive: line 81
Always end with a "how to run" report (template below).
“Common” is measured: kept by at least 6 in 10 of the 6 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
Stand up a project's testing foundation (unit + e2e + shared mock kit + incremental CI) and hand the user a report they can follow to run it.
The recommended stack — Vitest + Playwright + MSW with a single fixtures source — is a battle-tested default, but this skill adapts to the project: detect what's already there, fit the framework (Vue/React) and layout (monorepo/single-package), and don't fight existing choices.
Decide the scenario first
| Scenario | Looks like | Strategy |
| A · New package/app in an existing monorepo that already has a shared test kit | Target is a workspace package alongside an existing shared test package | Reuse the existing kit; just write two config files + scripts + first specs. Lightest. |
| B · Project with no testing foundation | No shared kit; may be monorepo or single package | Build the foundation per the blueprint (shared kit for monorepo, in-project test/ for single package), then wire each app. Heaviest. |
If unsure, ask: where's the target, is it a monorepo, which package manager, which framework.
Workflow
This skill expects parallel execution across multiple contexts: reading references, writing several config files, wiring multiple apps, and smoke-running are independent — fan them out with subagents instead of serial waiting.
Step 0 · Detect the target (parallelizable)
Launch read-only subagents in parallel to confirm:
- Location & type: scenario A or B; monorepo? (
pnpm-workspace.yaml/turbo.json/workspacesfield); package manager (pnpm/npm/yarn). - Current test state: existing vitest/jest/playwright/cypress config, test dirs, deps — don't clobber what's there.
- Stack alignment: Vue 3 or React? Vite or other bundler? What does the build config look like (the e2e
baseURL/https and the unit runner's transform/deps inlining must align to it)? - Reference implementation (scenario A): read the existing shared kit + a sibling app's configs as the template.
Summarize into a setup plan; confirm gray areas with the user before writing.
Step 1 · Prepare the shared foundation
- Scenario A: shared kit exists — skip to Step 2.
- Scenario B: build it per
references/blueprint.md. Monorepo → a shared test package (packages/test-kitor similar). Single package → an in-projecttest/directory. Move in the mock layer, presets, and mount/render helpers. Templates:references/mock-kit.md,references/config-vitest.md,references/config-playwright.md.
Step 2 · Wire each target app (parallelizable)
Each app is an independent artifact — fan out with generalPurpose subagents. Per app:
- Unit config (
vitest.config.ts): merge the app's bundler config with the shared unit preset; add app-specific coverage excludes here. - e2e config (
playwright.config.ts): the shared e2e preset withbaseURL/httpsaligned to the app. package.jsonscripts:test/test:unit/test:coverage/test:e2efamily (list inreferences/config-*.md).- Dependencies: add the runner + framework test utils + MSW + jsdom etc. — versions per the target's lockfile / existing deps; never invent versions.
- First specs: create the e2e dir + one smoke spec +
helpers.*, and one minimal unit test, to prove the wiring works.
Full templates in references/config-vitest.md and references/config-playwright.md.
Step 3 · Install & smoke (serial)
Back in the main context:
<pm> install # install deps
<pm exec> playwright install <browser> --with-deps # first time
<pm> --filter <app> test # unit smoke
<pm> --filter <app> test:e2e # e2e smokeIf red, see the "common pitfalls" table in references/blueprint.md (jsdom missing APIs, transform/deps inlining for workspace source packages, https/baseURL mismatch, unmocked requests failing loudly).
Step 4 · Configure CI (as needed)
- Scenario A where CI auto-discovers (e.g. turbo
--affected): no change needed — say so in the report. - Otherwise: wire e2e + unit-coverage jobs per
references/ci.md(GitHub Actions or GitLab CI; incremental for monorepos; coverage report upload).
Step 5 · Produce the setup report (the deliverable)
Always end with a "how to run" report (template below). This is what the user keeps.
Setup report template
## Testing setup report
### Target
- Scenario: A / B; target: <app/repo>; monorepo: yes/no; package manager; framework
### Files added/changed
- shared foundation (scenario B)
- <app>/vitest.config.* / playwright.config.* / package.json (scripts+deps)
- <app>/e2e/ (helpers + smoke spec)
- CI
### Smoke result
- unit: X passed / e2e: X passed
### How to run (hand to the user)
Local:
- install browsers (first time): <cmd>
- unit: <cmd> # watch / coverage variants
- e2e: <cmd> # headed / UI-debug variants
CI:
- when it runs / incremental behavior
### Next steps
- Use /test-gen to generate real specs (split unit/e2e)
- Keep all mock data in the shared fixtures (single source)
### Reuse check
Checked <shared kit / sibling configs>; reused ...; did not reuse because ...Key constraints
- Never invent dependency versions — use the target's lockfile,
packageManagerfield, existing deps. - Single source of mock data: fixtures in the shared kit; no per-app copies.
- e2e intercepts at the network layer (
page.route/cy.intercept), not a Service Worker — SW is unstable under self-signed https + fetch-wrapping monitors. A learned trade-off. - No test backdoors in business code: reach special UI via the app's own dev/debug entry.
- Align to the bundler config: e2e
baseURL/httpsand unit transform/deps-inlining must match the app, or the server won't start / workspace source packages won't transpile.
Reference files
references/blueprint.md— Full blueprint: shared-kit structure, per-scenario checklists (mono/single, Vue/React), common pitfalls.references/config-vitest.md— Vitest config + preset + setup templates (Vue & React).references/config-playwright.md— Playwright config + preset +package.jsonscripts.references/mock-kit.md— Shared mock layer: fixtures, MSW handlers,installApiMocks(page.route), mount/render helpers.references/ci.md— GitHub Actions and GitLab CI job templates (incremental for monorepos).
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.

