diff --git a/.cursor/skills/amplitude-typescript-repo/SKILL.md b/.cursor/skills/amplitude-typescript-repo/SKILL.md new file mode 100644 index 000000000..542276290 --- /dev/null +++ b/.cursor/skills/amplitude-typescript-repo/SKILL.md @@ -0,0 +1,72 @@ +--- +name: amplitude-typescript-repo +description: Contributes to the Amplitude TypeScript analytics SDK monorepo (pnpm workspaces, Lerna, Nx). Covers PR prep, local test-server workflow, and customer-site manual tests via e2e/manual-test.js. Use when changing packages under packages/, running repo scripts, preparing PRs, testing a live site against a local bundle, or when the user mentions Amplitude-TypeScript, browser/node SDKs, manual-test, or customer-site validation. +--- + +# Amplitude TypeScript monorepo + +## Layout + +- **Package manager**: `pnpm` with workspaces (`packages/*`). +- **Build orchestration**: Lerna (`pnpm build`, `pnpm test`, `pnpm lint` stream across packages); Nx available for affected/graph targets (`package.json` scripts with `nx` prefix). +- **Source**: SDK and plugin code lives under `packages/` (for example `analytics-browser`, `analytics-core`, `analytics-node`). + +## Before opening a PR (match CI) + +Run in order after substantive changes: + +1. `pnpm install` +2. `pnpm build` +3. `pnpm docs:check` +4. `pnpm test` and `pnpm test:examples` +5. `pnpm lint` + +Full contributor notes: [AGENTS.md](../../../AGENTS.md) at repo root. + +## Environment + +- CI uses Node.js **18.17.x**, **20.x**, and **22.x** — avoid APIs or syntax that break that range. + +## PR titles + +Use [Conventional Commits](https://www.conventionalcommits.org/) and include the affected module when it helps, for example `feat(browser): …`, `fix(plugin): …`. + +## Scoped commands + +- Prefer root scripts above for consistency. +- To target one package: `pnpm --filter