From ai-standards
Build local-first, offline-capable TypeScript apps with PowerSync. Use when implementing real-time sync between SQLite and backend databases (Postgres, MongoDB, MySQL, SQL Server). Covers schema definition, database setup, CRUD operations, React/Vue hooks, watch queries, and Kysely/Drizzle ORM integration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-standards:powersyncThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sync engine for local-first apps with real-time sync between client SQLite and backend databases.
Sync engine for local-first apps with real-time sync between client SQLite and backend databases.
| Platform | Package |
|---|---|
| Web | @powersync/web + @journeyapps/wa-sqlite |
| React Native | @powersync/react-native + @powersync/op-sqlite |
| React hooks | @powersync/react |
| Vue composables | @powersync/vue |
| Node.js | @powersync/node |
| Kysely ORM | @powersync/kysely-driver |
| Drizzle ORM | @powersync/drizzle-driver |
| Operation | Method |
|---|---|
| Get one | db.get(sql, params) / db.getOptional(sql, params) |
| Get all | db.getAll(sql, params) |
| Execute | db.execute(sql, params) |
| Transaction | db.writeTransaction(async (tx) => { ... }) |
| Watch | db.query({sql, parameters}).watch() |
| Diff watch | db.query({sql, parameters}).differentialWatch() |
Full CRUD: docs
| Hook | Purpose |
|---|---|
useQuery | Query with loading/error states |
useSuspenseQuery | Query with Suspense |
useStatus | Connection status |
usePowerSync | Database instance |
| ORM | Docs | Example |
|---|---|---|
| Kysely | docs | source |
| Drizzle | docs | source |
| TanStack DB | docs | demo |
references/sync-rules.md - Sync Rules configurationreferences/examples.md - All official example projects| Package | Description |
|---|---|
| common | Shared core (schema, sync, types) |
| web | Web SDK |
| react-native | React Native SDK |
| node | Node.js SDK |
| capacitor | Capacitor SDK |
| react | React hooks |
| vue | Vue composables |
| tanstack-react-query | TanStack Query integration |
| kysely-driver | Kysely ORM driver |
| drizzle-driver | Drizzle ORM driver |
| attachments | File attachments helper |
| powersync-op-sqlite | OP-SQLite adapter |
| adapter-sql-js | SQL.js adapter (Expo Go) |
npx claudepluginhub guillempuche/ai-standards --plugin ai-standardsSQLite database implementation using LibSQL client and Drizzle ORM. This skill covers local development, Turso cloud, and Cloudflare D1 deployments.
Provides type-safe SQL with Drizzle ORM for defining schemas, writing queries, setting relations, and running migrations across PostgreSQL, MySQL, SQLite, Cloudflare D1, and Durable Objects.
Guides offline-first mobile architecture: local DB sync (WatermelonDB, Realm, Hive, SQLite), conflict resolution (LWW, CRDT), optimistic UI, background sync (WorkManager, BGTaskScheduler), connectivity detection. Use for reliable offline apps.