$npx -y skills add powersync-ja/agent-skills --skill powersyncGuided onboarding and best practices for building applications with PowerSync — Cloud and self-hosted setup, sync configuration, client SDK usage, backend integration (Supabase, custom Postgres, MongoDB, MySQL, MSSQL), and debugging. Use this skill whenever the user mentions Powe
| 1 | # PowerSync Skills |
| 2 | |
| 3 | Use this skill to onboard a project onto PowerSync without trial-and-error. Treat this as a guided workflow first and a reference library second. |
| 4 | |
| 5 | **Agents: Read [AGENTS.md](AGENTS.md) before proceeding.** It contains the mandatory compliance rules and onboarding playbook. The Quick Rules below are a reminder, not a substitute. **`powersync login`** is **PowerSync Cloud only** (PAT); self-hosted does not use it. |
| 6 | |
| 7 | ## Terminology |
| 8 | |
| 9 | - **Operator** — the human directing this agent (whose request you are fulfilling). |
| 10 | - **User** — an end-user of the operator's PowerSync app (JWT subjects, the row a sync stream filters by, the person calling `disconnectAndClear()`). |
| 11 | |
| 12 | If a sentence is ambiguous, default to the operator interpretation. Full legend in `AGENTS.md`. |
| 13 | |
| 14 | ## Quick Rules |
| 15 | |
| 16 | - **CLI-first.** Use the [PowerSync CLI](https://docs.powersync.com/tools/cli.md) for all operations. Do not hand-write config files. See `references/powersync-cli.md`. |
| 17 | - **Ask, don't assume.** Ask the operator: Cloud vs self-hosted, and which backend (Supabase, Postgres, MongoDB, MySQL, MSSQL). Do not default to Supabase. |
| 18 | - **Backend before frontend.** Deploy sync config and verify the service before writing app code. |
| 19 | - **Sync Streams for new projects.** Sync Rules are legacy. |
| 20 | - **Persist credentials immediately.** Write all URLs and keys to `.env` as soon as they are available. |
| 21 | - **Default scope on existing projects: sync-config only.** Do not edit `service.yaml` or `cli.yaml` unless the operator explicitly authorized service/infra changes in this conversation. |
| 22 | - **Confirm the target instance before any mutating command** (`deploy`, `destroy`, `stop`, `link --create`, `pull instance`). Never deploy to an instance not authorized by the operator. Treat production as off-limits unless explicitly approved. |
| 23 | - **Use project memory.** If your harness supports it, persist the CLI invocation, sync-config path, authorized instance ids + environment (dev/staging/prod), and allowed scope of changes. Verify saved values still match reality before acting on them. See `AGENTS.md` § "Continuous Use & Guardrails". |
| 24 | |
| 25 | ## What to Load for Your Task |
| 26 | |
| 27 | | Task | Start with | Load on demand | |
| 28 | |------|-----------|----------------| |
| 29 | | Supabase + PowerSync | `references/onboarding-supabase.md` | `references/supabase-auth.md`, `references/sync-config.md`, SDK files | |
| 30 | | Custom backend (non-Supabase) | `references/onboarding-custom.md` | `references/custom-backend.md`, `references/sync-config.md`, SDK files | |
| 31 | | New project setup | `references/powersync-cli.md` + `references/powersync-service.md` | `references/sync-config.md`, SDK files | |
| 32 | | Self-hosting / service config | `references/powersync-service.md` + `references/powersync-cli.md` | `references/sync-config.md` | |
| 33 | | Terraform / IaC provisioning | `references/terraform.md` | `references/sync-config.md`, `references/supabase-auth.md` (if Supabase source) | |
| 34 | | Writing sync config | `references/sync-config.md` | — | |
| 35 | | Debugging sync issues | `references/powersync-debug.md` | — | |
| 36 | | Raw Tables (advanced) | `references/raw-tables.md` | — | |
| 37 | | Attachments | `references/attachments.md` | — | |
| 38 | | Architecture overview | `references/powersync-overview.md` | — | |
| 39 | | SQLite extensions (vector search, FTS5, custom tokenizers) | `references/sqlite-extensions.md` | — | |
| 40 | |
| 41 | ## SDK Reference Files |
| 42 | |
| 43 | ### JavaScript / TypeScript |
| 44 | |
| 45 | Always load `references/sdks/powersync-js.md` for any JS/TS project, then load the applicable framework file. |
| 46 | |
| 47 | | Framework | File | Load early if… | |
| 48 | |-----------|------|----------------| |
| 49 | | React / Next.js | `references/sdks/powersync-js-react.md` | Vite + React project — contains the required `vite.config.ts` setup (`optimizeDeps.exclude`, `worker.format: 'es'`) needed before installing packages | |
| 50 | | React Native / Expo | `references/sdks/powersync-js-react-native.md` | | |
| 51 | | Vue / Nuxt | `references/sdks/powersync-js-vue.md` | | |
| 52 | | Node.js / Electron | `references/sdks/powersync-js-node.md` | | |
| 53 | | TanStack | `references/sdks/powersync-js-tanstack |