Provides best practices for building and maintaining PowerSync applications: cloud/self-hosted setup, sync configuration, client SDKs, backend integration, schema changes, reactive queries, attachments, upload queue, and debugging.
Ships in powersync-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to onboard a project onto PowerSync and to keep it healthy afterwards, without trial-and-error. Treat this as a guided workflow first and a reference library second.
Agents: Read 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.
disconnectAndClear()).If a sentence is ambiguous, default to the operator interpretation. Full legend in AGENTS.md.
references/powersync-cli.md..env, never hardcoded. Record URLs and keys in .env as they become available; config (!env) and app code read from there.service.yaml or cli.yaml unless the operator explicitly authorized service/infra changes in this conversation.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.AGENTS.md § "Continuous Use & Guardrails".This copy ships reference files for every PowerSync platform. On your first use of this skill in a repo, check for .trim-state.json next to this file. If it exists, the operator already decided; skip this section.
Otherwise run node scripts/trim.mjs from this skill's directory. The default run is a read-only report: it detects which PowerSync platforms this repo uses and lists the reference files this copy does not need. It works on this installed copy only, makes no network requests, and is reversible by reinstalling the skill. If it refuses (shared or source install) or detects no PowerSync usage yet, skip this section silently. Otherwise show the report to the operator and ask whether to trim this installed copy. Never trim without explicit operator approval.
node scripts/trim.mjs --apply (add --keep <platforms> for platforms the operator wants to keep anyway).node scripts/trim.mjs --decline so the operator is not asked again.Reinstalling or npx skills update restores the full copy and clears the recorded decision; offering again after an update is expected.
| Task | Start with | Load on demand |
|---|---|---|
| Supabase + PowerSync | references/onboarding-supabase.md | references/supabase-auth.md, references/sync-config.md, SDK files |
| Custom backend (non-Supabase) | references/onboarding-custom.md | references/custom-backend.md, references/sync-config.md, SDK files |
| New project setup | references/powersync-cli.md + references/powersync-service.md | references/sync-config.md, SDK files |
| Migrating from Electric Cloud | references/migration-from-electric.md | references/sync-config.md, SDK files |
| Self-hosting / service config | references/powersync-service.md + references/powersync-cli.md | references/sync-config.md |
| Terraform / IaC provisioning | references/terraform.md | references/sync-config.md, references/supabase-auth.md (if Supabase source) |
| Writing sync config | references/sync-config.md | — |
| Debugging sync issues | references/powersync-debug.md | — |
| Raw Tables (advanced) | references/raw-tables.md | — |
| Attachments | references/attachments.md | — |
| Architecture overview | references/powersync-overview.md | — |
| SQLite extensions (vector search, FTS5, custom tokenizers) | references/sqlite-extensions.md | — |
Always load references/sdks/powersync-js.md for any JS/TS project, then load the applicable framework file.
| Framework | File | Load early if… |
|---|---|---|
| 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 |
| React Native / Expo | references/sdks/powersync-js-react-native.md | |
| Vue / Nuxt | references/sdks/powersync-js-vue.md | |
| Node.js / Electron | references/sdks/powersync-js-node.md | |
| TanStack | references/sdks/powersync-js-tanstack.md | |
| Drizzle / Kysely ORM | references/sdks/powersync-js-orm.md | Project uses Drizzle or Kysely |
| Platform | File |
|----------|
| Dart / Flutter | references/sdks/powersync-dart.md |
| .NET | references/sdks/powersync-dotnet.md |
| Kotlin | references/sdks/powersync-kotlin.md |
| Swift | references/sdks/powersync-swift.md |
| Rust | references/sdks/powersync-rust.md |
Some PowerSync SDKs offer ways for agents to connect to a running app, which can be used to inspect sync state or run queries against the actual app database.
For the Dart SDK, load references/sdks/powersync-dart-debugging.md for instructions.
id column in a PowerSync table schema; it is created automatically.column.integer for booleans and column.text for ISO date strings.connect() is fire-and-forget. Use waitForFirstSync() if you need readiness.Authenticator and mutation uploader implementations with an explicit PowerSync endpoint on supported SDKs; load the platform SDK reference and backend reference before implementing them. .NET currently requires its combined connector.connect() call for full sync. Calls replace the previous connection configuration; separate download-only and upload-only calls do not combine. Let the SDK handle reconnects and token refreshes rather than reconnecting on focus or network changes.transaction.complete() is mandatory or the upload queue stalls permanently.disconnect() so the next session resumes without re-downloading. If visible rows must be hidden but PowerSync's internal copy may stay, use disconnectAndClear(soft: true), which deletes synced rows but keeps the internal copy, so reconnecting as the same user skips a full re-download in most cases. If no synced data may remain, use the default disconnectAndClear(). Never retain one user's data for a different user.uploadData blocks the upload queue permanently; return 2xx for validation errors.AGENTS.md (opens in a new tab)CLAUDE.md (opens in a new tab)references/attachments.md (opens in a new tab)references/custom-backend.md (opens in a new tab)references/migration-from-electric.md (opens in a new tab)references/onboarding-custom.md (opens in a new tab)references/onboarding-supabase.md (opens in a new tab)references/powersync-cli.md (opens in a new tab)references/powersync-debug.md (opens in a new tab)references/powersync-overview.md (opens in a new tab)references/powersync-service.md (opens in a new tab)references/raw-tables.md (opens in a new tab)references/sdks/powersync-dart-debugging.md (opens in a new tab)references/sdks/powersync-dart.md (opens in a new tab)references/sdks/powersync-dotnet.md (opens in a new tab)references/sdks/powersync-js-node.md (opens in a new tab)references/sdks/powersync-js-orm.md (opens in a new tab)references/sdks/powersync-js-react-native.md (opens in a new tab)references/sdks/powersync-js-react.md (opens in a new tab)references/sdks/powersync-js-tanstack.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Load before any data, schema, sync, or auth change in a project that already uses PowerSync, even if the request never mentions sync. Examples: adding tables or columns, watch or useQuery results not updating, rows missing on a device, uploads stuck in the queue, a spinner stuck on Syncing, editing sync-config.yaml or service.yaml, running powersync CLI commands, migrating legacy sync configuration to Sync Streams, or implementing logout and account switching with disconnectAndClear.
Three short reads, in order
React Native, Flutter, Supabase, PostgreSQL, MongoDB, MySQL, SQLite, Rust
powersync, offline-first, local-first, sync-streams, sqlite, replication, react-native, flutter
/powersync-skills:powersyncfrom powersync-skills
npx claudepluginhub powersync-ja/agent-skills --plugin powersync-skillsOther plugins' skills for the same job