一键导入
playwright
Verify changes against the locally running apps — curl the API, drive the admin/frontend GUIs with Playwright
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify changes against the locally running apps — curl the API, drive the admin/frontend GUIs with Playwright
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
NestJS endpoint return-type and DTO rules — explicit DTO return types, @ApiOkResponse matching, wrapper DTOs, constructor patterns, and the post-edit `bun run gen-api` step. Read before editing any *.dto.ts or *.controller.ts in server/.
Query the local Postgres database — credentials via server/.env, psql one-liners, TypeORM table/column naming, dev vs test DB.
Generate and review TypeORM database migrations in server/ — migration:generate vs migration:create, and the column-rename DROP+ADD pitfall. Read before generating or writing any db migration.
基于 SOC 职业分类
| name | playwright |
| description | Verify changes against the locally running apps — curl the API, drive the admin/frontend GUIs with Playwright |
bun --watch src/main.ts in server/, on port 3005 (hot-reloads on edit, OpenAPI at /openapi.yaml).lsof -iTCP -sTCP:LISTEN -P | grep -E "node|bun" to confirm.
Auth is a JWT in the access_token cookie (or Authorization: Bearer), signed with JWT_SECRET from server/.env. Payload: { sub: <userId>, email, tokenType: "access" } (see server/src/auth/guards/jwtreq.ts). Find an admin user id via the local DB (.claude/skills/local-db/SKILL.md): SELECT id, email FROM "user" WHERE admin = true LIMIT 1;
Mint a token with a bun script using jsonwebtoken from the repo root node_modules — read JWT_SECRET from server/.env in the script; never print it.
curl -H "Authorization: Bearer $TOKEN" http://localhost:3005/...playwright in node_modules with its chromium already installed — import from the absolute path /…/alliance/node_modules/playwright/index.mjs when the script lives outside the repo). Set the cookie { name: "access_token", value: token, domain: "localhost", path: "/" } on the browser context, then goto http://localhost:5174/<route>. Cookies on localhost cross ports, so the admin app's calls to :3005 authenticate.bunx playwright outside the repo resolves the latest playwright whose browser build isn't installed — always use the repo's copy.apps/admin/src/routes.ts.