agentleFS
evgenii-studitskikhevgenii-studitskikh/Claude-Code-SaaS-Studio/.claude/skills/test-setup/SKILL.md

test-setup

Skill1 starsChanged 5 months agoMITView on GitHub

Scaffold the test stack for the SaaS app: install and configure Vitest + Testing Library, Playwright, and a CI test step. Run after qa-plan is approved. Produces a runnable test harness.

11 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • hongyuancSkill

    vertical-slice

    Build and evaluate a production-quality vertical slice before advancing from Pre-Production to Production.

    Also in 4 projects that use this

The file

Files
SKILL.md

Scaffold the project's test infrastructure from the approved QA plan before any feature tests are written. Non-autonomous: present the full plan, get approval, then execute. Never install packages or write config files without sign-off.

Phases

  1. Load context — read docs/specs/qa-plan.md to understand the chosen pyramid and tooling decisions. If the file is missing, stop and direct to /qa-plan. Also read package.json and any existing test config files to avoid duplicating setup.
  2. Present the plan — show the user the EXACT commands and files that will be created, including: install commands for Vitest, @testing-library/react, @testing-library/jest-dom, @playwright/test, and any supporting packages (jsdom, @vitejs/plugin-react — or @vitejs/plugin-react-swc for Next.js projects that use the SWC compiler; both require jsdom as the Vitest test environment, etc.); a Playwright browser-binary install step (npx playwright install --with-deps) that runs after @playwright/test is installed, so that npm run test:e2e does not fail with a missing-browser error; config files to be written (vitest.config.ts, vitest.setup.ts, playwright.config.ts); package.json scripts to be added (test, test:watch, test:e2e); and the CI test step (e.g. a GitHub Actions job snippet). Under full, confirm each category; under lean, one confirmation for the whole plan; under solo, proceed directly. Get explicit approval before running anything.
  3. Apply — on approval, run the install commands (including npx playwright install --with-deps), write the config files, and add the package.json scripts. Then add one trivial smoke test — place it under __tests__/ colocated with the app (e.g. src/__tests__/smoke.test.ts, or at the project root __tests__/smoke.test.ts if there is no src/ directory) — rendering a minimal component, and one Playwright homepage test (e2e/smoke.spec.ts visiting /) to verify the harness end-to-end.
  4. Verify — run npm test (or equivalent) and npm run test:e2e against the smoke tests; show the output. If anything fails, diagnose and fix before proceeding. Under full, confirm each suite result; under lean or solo, summarize the combined result.
  5. Next step — on a green run, point to /write-tests.

Output

A runnable test scaffold: Vitest + Testing Library config, Playwright config, two smoke tests, updated package.json scripts, and a CI test step snippet. No application code is modified.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.