PowerSync Agent Skills
The PowerSync skill: the agent sets up offline app sync through the CLI, writes Sync Streams and debugs a stuck Syncing status
- 22 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill steers the agent to run the `powersync` CLI, which deploys configuration to the PowerSync cloud service
- The cloud needs a personal token and database connection strings are written to `.env`
Install
- Works in
Manual install
npx skills add powersync-ja/agent-skillsThe installer detects the agent; name a specific one with `--agent`, for example `--agent cursor`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill steers the agent to run the `powersync` CLI, which deploys configuration to the PowerSync cloud service
- The cloud needs a personal token and database connection strings are written to `.env`
This is third-party code. Review the repository files before installing.
What it does
The repository holds a single `powersync` skill with rules for working on PowerSync apps. It leads a project from connecting the service to debugging: choosing Cloud or self-hosting, connecting a database (Supabase, plain Postgres, MongoDB, Azure DocumentDB, MySQL, MSSQL), setting up Sync Streams, client SDKs, the upload queue, attachments and user sign-out through `disconnectAndClear`. The skill follows an order: the PowerSync CLI first and hand-written configuration files only after that. The agent asks the project owner whether it is Cloud or a self-hosted server and which database sits behind it, rather than defaulting to Supabase. The backend is deployed and verified first, then the app code is written. Credentials go to `.env`, not into code. Reference files cover JS/TS, Flutter, Kotlin, Swift and .NET, and an installed copy can be slimmed with the `scripts/trim.mjs` script: it detects the project platforms and, with your approval, removes unused references to keep the agent context small.
Who it is for. Mobile and web developers adding offline sync with PowerSync to apps in Claude Code, Cursor or Codex who want to avoid guessing at settings.
Good fit when
- A Supabase app gains an offline mode: the agent deploys the PowerSync service and writes the sync schema
- Data does not appear on the device and `useQuery` does not update: the skill walks through checking Sync Streams and the upload queue
- A screen is stuck on Syncing and the cause may be authorization, JWT or `fetchCredentials`
- The project adds sign-out and user switching where the local database must be cleared through `disconnectAndClear`
- Old Sync Rules or Electric Shapes are migrated to Sync Streams
Not a fit when
- The project has no PowerSync and no plans for it: the skill does not suit general offline storage tasks
- You work in an SDK that the skill references do not cover: it covers the listed platforms
- The backend is deployed by hand and cannot change: the skill drives setup through the PowerSync CLI
Example request
Add offline sync through PowerSync with a Supabase database to the React Native app and show the sync status on screenLimitations
- The skill does not update itself: a new version is installed with `npx skills update` or the plugin update commands.
- The cloud service needs a `powersync login` sign-in with a personal token; a self-hosted server does not use it.
- The references cover JS/TS, Flutter, Kotlin, Swift and .NET, and the CLI from the `@powersync/cli` package is installed separately.
- `scripts/trim.mjs` deletes files in an installed copy only. Shared installs, such as the Claude Code plugin cache, are left alone.
How to disable. Delete the `powersync` skill folder from the agent skills directory or disable the plugin in Claude Code with `/plugin`. If you ran `scripts/trim.mjs --apply`, reinstalling restores the full copy.
FAQ
How do I install PowerSync Agent Skills in Claude Code?
Plugin route: `/plugin marketplace add powersync-ja/agent-skills`, then `/plugin install powersync-skills@powersync`. The general installer `npx skills add powersync-ja/agent-skills --agent claude-code` works too.
Which databases and platforms does the skill cover?
Databases: Supabase, plain Postgres, MongoDB, Azure DocumentDB, MySQL and MSSQL. Client references exist for JS/TS, Flutter, Kotlin, Swift and .NET.
What is the trim.mjs script for?
The skill contains references for every platform and they take up agent context. The script detects your repository platforms and, with your approval, removes the other files in the installed copy. The decision is saved to `.trim-state.json`, so the offer is not repeated.
How do I update the skill?
The skill does not update itself. For a skills.sh install run `npx skills update`, for the Claude Code plugin `/plugin marketplace update powersync` and then `/plugin update powersync-skills@powersync`. For Gemini CLI uninstall and reinstall the skill.
What is index.json in the releases for?
Every GitHub release includes `index.json` listing the skills with an archive URL and a SHA-256 digest, plus the `powersync.tar.gz` archive. They serve skill discovery under the Agent Skills Discovery specification.
Discussion
No questions or reviews yet.
Related
Skillsbuilder-skills: agent skills for Convex apps
builder-skills
17 skills that teach an agent to build Convex apps by the docs and run a project through a PRD, task.md and a changelog
Official skills and agents from the .NET team: performance, MSBuild, NuGet, upgrades, testing, ASP.NET Core, Blazor and MAUI
Official Firebase plugin for agents: 14 skills on Firestore, Auth, Hosting, Crashlytics, Remote Config and security rules
Convex skills for agents: project setup, authentication, components, migrations and performance investigation
Thirty-two Tencent CloudBase skills: serverless functions, auth, AI models, storage and backend deployment in the cloud.
The official Payload CMS skill shipped inside the package: collections, fields, hooks, access control, queries and database adapters
README in short
The page lists the single skill and explains how releases publish `index.json` and an archive for discovery. It then gives install commands for skills.sh, Claude Code and Gemini CLI, the update order and a description of the script that trims references to the project platforms.
README badge
Original SKILL.md
--- name: powersync description: "Best practices for building and maintaining applications with PowerSync: Cloud and self-hosted setup, sync configuration, client SDK usage, backend integration (Supabase, custom Postgres, MongoDB, Azure DocumentDB, MySQL, MSSQL), schema changes, watch and reactive queries (useQuery), attachments, the upload queue, and debugging. Use this skill whenever the user mentions PowerSync, a @powersync/* package (@powersync/web, @powersync/react-native, @powersync/node), the powersync Flutter/Dart package, the powersync Rust crate, wa-sqlite, offline-first sync, local-first architecture, sync rules, sync streams, uploadData, fetchCredentials, disconnectAndClear, logout or user switching in a synced app, real-time data replication, Electric Cloud migration, Electric Shapes, an app stuck on Syncing, data not syncing, or wants to add offline-capable sync to a mobile or web app, even if they do not explicitly name PowerSync." when_to_use: "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." license: MIT compatibility: Works with any skills-compatible agent. Some references include CLI commands requiring the @powersync/cli package. metadata: author: powersync version: "1.6.4" # x-release-please-version organization: PowerSync tags: powersync, offline-first, local-first, sync-streams, sqlite, replication, uploadData, fetchCredentials, service-config, sync-config, cloud, cli, debugging, supabase, postgres, mongodb, mysql, electric, electric-migration, watch-queries, useQuery, attachments, upload-queue, disconnectAndClear, schema, react-native, flutter, node, web, wa-sqlite, rust, cargo, powersync-rust --- # PowerSync Skills 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](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. ## Terminology - **Operator** — the human directing this agent (whose request you are fulfilling). - **User** — an end-user of the operator's PowerSync app (JWT subjects, the row a sync stream filters by, the person calling `disconnectAndClear()`). If a sentence is ambiguous, default to the operator interpretation. Full legend in `AGENTS.md`. ## Quick Rules - **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`. - **Ask, don't assume.** Ask the operator: Cloud vs self-hosted, and which backend (Supabase, Postgres, MongoDB, Azure DocumentDB, MySQL, MSSQL). Do not default to Supabase. - **Backend before frontend.** Deploy sync config and verify the service before writing app code. - **Sync Streams for new projects.** Sync Rules are legacy. - **Keep credentials in `.env`, never hardcoded.** Record URLs and keys in `.env` as they become available; config (`!env`) and app code read from there. - **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. - **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. - **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". ## First Use in a Repo: Offer to Trim (agents) 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.