powersync
PowerSync TypeScript Skill
Sync engine for local-first apps with real-time sync between client SQLite and backend databases.
When to Use
- Offline-first/local-first applications
- Real-time sync between client and server
- Instant UI responsiveness with background sync
Installation
| 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 |
Core Setup
API Quick Reference
| 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
React Hooks
| Hook | Purpose |
|---|---|
useQuery |
Query with loading/error states |
useSuspenseQuery |
Query with Suspense |
useStatus |
Connection status |
usePowerSync |
Database instance |
ORM Integration
| ORM | Docs | Example |
|---|---|---|
| Kysely | docs | source |
| Drizzle | docs | source |
| TanStack DB | docs | demo |
Documentation
Local References
references/sync-rules.md- Sync Rules configurationreferences/examples.md- All official example projects
GitHub Source
| 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) |
More from guillempuche/ai-standards
tamagui
Universal React + React Native UI library with optimizing compiler. Use when building cross-platform apps with shared styling, design tokens, themes, and accessible components.
6unikraft
Kraft CLI commands for building and deploying Unikraft unikernels. Use when working with Kraftfiles, deploying to Unikraft Cloud, or managing unikernel instances.
6release
Detect changes in skills/agents, ask about version bumps, update frontmatter versions, and deploy individual repos to GitHub.
4commit
Commit workflow for ai-standards repo. Formats all markdown files and previews changes before committing.
4effect-lookup
Quick lookup for Effect TypeScript library APIs, patterns, and source code. Use when you need to find Effect functions, understand Effect patterns, or look up implementation details.
4