Scaffold the base project structure for a Playwright API testing suite. Use once when starting a new project.
Scaffold the full base structure for a Playwright + TypeScript API testing project. Run this once before creating any spec files.
Ask the user:
BASE_URL for the API?npm init -y
npm install --save-dev @playwright/test typescript @types/node allure-playwright allure-commandline
npm install dotenv
Note:
allure-commandlinerequires Java to generate HTML reports. Install Java before runningnpm run report:
- macOS:
brew install --cask temurin- Linux:
sudo apt install default-jdk- Windows: download from https://adoptium.net
Single provider:
mkdir -p src/api/api-clients src/api/types src/api/factories src/api/fixtures src/tests utils
Multiple providers — create one subdirectory per provider inside src/api/ and src/tests/:
mkdir -p src/api/{provider}/api-clients src/api/{provider}/types src/api/{provider}/factories
mkdir -p src/api/fixtures src/tests/{provider} utils
src/api/fixtures/, src/api/base-api-client.ts, and src/api/api-statuses.ts always stay at the src/api/ root.
Create each file using the exact templates in templates/base-files.md:
tsconfig.json.env.exampleutils/env.tsplaywright.config.tssrc/api/api-statuses.tssrc/api/base-api-client.tssrc/api/fixtures/api.fixture.ts.gitignoreFollow the setup in templates/tooling.md to install and configure ESLint and Prettier, then add the lint/format scripts to package.json.
package.json{
"scripts": {
"test": "playwright test",
"report": "allure generate allure-results --clean -o allure-report && allure open allure-report",
"typecheck": "tsc --noEmit",
"lint": "eslint src/ utils/",
"lint:fix": "eslint src/ utils/ --fix",
"format": "prettier --write src/ utils/",
"format:check": "prettier --check src/ utils/"
}
}
npx tsc --noEmit
npm run lint
npm run format:check
npm test
All four must pass before moving on.
For each API resource, use the /add-test skill to create:
src/api/types/{resource}.d.tssrc/api/factories/{resource}.factory.tssrc/api/api-clients/{resource}-api-client.tssrc/tests/{resource}.api.spec.tsSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer