From 8f4385e7e0754222286cd4cdf40100e6e0ab6ff3 Mon Sep 17 00:00:00 2001 From: bean1352 Date: Mon, 7 Sep 2026 11:11:01 +0200 Subject: [PATCH 1/2] Add AI Quickstart prompts --- client-sdks/reference/capacitor.mdx | 11 ++++++ client-sdks/reference/dotnet.mdx | 11 ++++++ client-sdks/reference/flutter.mdx | 11 ++++++ client-sdks/reference/javascript-web.mdx | 11 ++++++ client-sdks/reference/kotlin.mdx | 11 ++++++ client-sdks/reference/node.mdx | 11 ++++++ .../reference/react-native-and-expo.mdx | 11 ++++++ client-sdks/reference/rust.mdx | 11 ++++++ client-sdks/reference/swift.mdx | 11 ++++++ client-sdks/reference/tauri.mdx | 12 +++++- intro/powersync-overview.mdx | 38 ++++++++++++++++++- snippets/ai-quickstart.mdx | 29 ++++++++++++++ tools/ai-tools.mdx | 4 ++ 13 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 snippets/ai-quickstart.mdx diff --git a/client-sdks/reference/capacitor.mdx b/client-sdks/reference/capacitor.mdx index a018efdd..b0daba40 100644 --- a/client-sdks/reference/capacitor.mdx +++ b/client-sdks/reference/capacitor.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Capacitor apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import CapacitorInstallation from '/snippets/capacitor/installation.mdx'; import JavaScriptAsyncWatch from '/snippets/basic-watch-query-javascript-async.mdx'; @@ -51,6 +52,16 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Capacitor SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/dotnet.mdx b/client-sdks/reference/dotnet.mdx index 7d66c7ce..84174b84 100644 --- a/client-sdks/reference/dotnet.mdx +++ b/client-sdks/reference/dotnet.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in .NET apps (beta)." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import DotNetInstallation from '/snippets/dotnet/installation.mdx'; import DotNetWatch from '/snippets/dotnet/basic-watch-query.mdx'; @@ -56,6 +57,16 @@ For more details, please refer to the package [README](https://github.com/powers +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the .NET SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Quickstart diff --git a/client-sdks/reference/flutter.mdx b/client-sdks/reference/flutter.mdx index 89d8e2fa..def55335 100644 --- a/client-sdks/reference/flutter.mdx +++ b/client-sdks/reference/flutter.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Dart and Flutter apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import FlutterInstallation from '/snippets/flutter/installation.mdx'; import FlutterWatch from '/snippets/flutter/basic-watch-query.mdx'; @@ -43,6 +44,16 @@ Get started quickly by using the self-hosted **Flutter** + **Supabase** template Web support is currently in a beta release. Refer to [Flutter Web Support](/client-sdks/frameworks/flutter-web-support) for more details. +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Dart/Flutter SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/javascript-web.mdx b/client-sdks/reference/javascript-web.mdx index c816ba77..430440a8 100644 --- a/client-sdks/reference/javascript-web.mdx +++ b/client-sdks/reference/javascript-web.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in JavaScript Web apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import JavaScriptWebInstallation from '/snippets/javascript-web/installation.mdx'; import JavaScriptAsyncWatch from '/snippets/basic-watch-query-javascript-async.mdx'; @@ -80,6 +81,16 @@ The PowerSync [JavaScript Web SDK](../javascript-web) is compatible with popular +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the JavaScript Web SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/kotlin.mdx b/client-sdks/reference/kotlin.mdx index a89a8d71..841a5f2a 100644 --- a/client-sdks/reference/kotlin.mdx +++ b/client-sdks/reference/kotlin.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Kotlin Multiplatform apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import KotlinInstallation from '/snippets/kotlin/installation.mdx'; import KotlinWatch from '/snippets/kotlin/basic-watch-query.mdx'; @@ -32,6 +33,16 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Kotlin Multiplatform SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/node.mdx b/client-sdks/reference/node.mdx index 05c2051d..d4c6583f 100644 --- a/client-sdks/reference/node.mdx +++ b/client-sdks/reference/node.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Node.js apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import NodeInstallation from '/snippets/node/installation.mdx'; import JavaScriptAsyncWatch from '/snippets/basic-watch-query-javascript-async.mdx'; @@ -44,6 +45,16 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Node.js client SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Quickstart diff --git a/client-sdks/reference/react-native-and-expo.mdx b/client-sdks/reference/react-native-and-expo.mdx index fa30a46c..761fc920 100644 --- a/client-sdks/reference/react-native-and-expo.mdx +++ b/client-sdks/reference/react-native-and-expo.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in React Native (& Expo) apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import ReactNativeInstallation from '/snippets/react-native/installation.mdx'; import JavaScriptAsyncWatch from '/snippets/basic-watch-query-javascript-async.mdx'; @@ -45,6 +46,16 @@ A separate `powersync-react` package is available containing React hooks for Pow /> +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the React Native & Expo SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/rust.mdx b/client-sdks/reference/rust.mdx index ae43c229..cebf8fb8 100644 --- a/client-sdks/reference/rust.mdx +++ b/client-sdks/reference/rust.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Rust apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import RustInstallation from '/snippets/rust/installation.mdx'; import RustWatchQuery from '/snippets/rust/basic-watch-query.mdx'; @@ -36,6 +37,16 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Rust SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/swift.mdx b/client-sdks/reference/swift.mdx index 4460f845..0b42e320 100644 --- a/client-sdks/reference/swift.mdx +++ b/client-sdks/reference/swift.mdx @@ -4,6 +4,7 @@ description: "Use PowerSync in Swift apps." sidebarTitle: "SDK Reference" --- +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import SwiftInstallation from '/snippets/swift/installation.mdx'; import SwiftWatch from '/snippets/swift/basic-watch-query.mdx'; @@ -34,6 +35,16 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; ### SDK Features +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Swift SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/client-sdks/reference/tauri.mdx b/client-sdks/reference/tauri.mdx index bfe17681..675d290c 100644 --- a/client-sdks/reference/tauri.mdx +++ b/client-sdks/reference/tauri.mdx @@ -4,7 +4,7 @@ description: "Use PowerSync in Tauri apps." sidebarTitle: "SDK Reference" --- - +import AiQuickstart from '/snippets/ai-quickstart.mdx'; import SdkFeatures from '/snippets/sdk-features.mdx'; import TauriInstallation from '/snippets/tauri/installation.mdx'; import JavaScriptAsyncWatch from '/snippets/basic-watch-query-javascript-async.mdx'; @@ -43,6 +43,16 @@ import MutationConfirmationWithReturning from '/snippets/javascript-mutation-con +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Tauri SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. + + + ## Installation diff --git a/intro/powersync-overview.mdx b/intro/powersync-overview.mdx index 1a5426f5..a148ba41 100644 --- a/intro/powersync-overview.mdx +++ b/intro/powersync-overview.mdx @@ -22,10 +22,46 @@ PowerSync is made up of the PowerSync Service and a set of client SDKs. The Powe The architecture and the philosophy behind PowerSync. - Official PowerSync skills for Claude Code, Convex, and other AI-powered coding tools. + Official PowerSync skills for Claude Code, Codex, and other AI-powered coding tools. +## AI Quickstart + +Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to add PowerSync to an existing project. The agent inspects your project, confirms the right SDK with you, and gathers the details it needs before writing code. Each [client SDK reference](/client-sdks/overview) also has a version of this prompt tailored to that SDK. + +```text +Add PowerSync to this project so the app reads and writes a local SQLite +database that syncs with my backend database. + +Install the PowerSync Agent Skills in this project and follow them: + + npx skills add powersync-ja/agent-skills + +Inspect the project to identify my language and framework, then confirm the +matching PowerSync client SDK with me. PowerSync has SDKs for Flutter, +React Native & Expo, JavaScript Web, Capacitor, Node.js, Tauri, Kotlin +Multiplatform, Swift, .NET, and Rust. Use +https://docs.powersync.com/client-sdks/overview.md to find the SDK +reference, and check the PowerSync docs when something is unclear rather +than guessing. Do not invent APIs. + +Ask me these questions and wait for my answers before writing code: + +1. Which backend database am I syncing from: Postgres, MongoDB, MySQL, or + SQL Server? Am I on a hosted platform such as Supabase? +2. Do I have a PowerSync Service instance (PowerSync Cloud or self-hosted)? + If not, help me set one up first. +3. Which tables does my app need locally, and which rows should each user + receive? +4. How do users authenticate? + +Then work step by step: define the client-side schema, write Sync Stream +definitions for the data I described and show me how to apply them on the +PowerSync Service, instantiate the PowerSync database, implement a backend +connector, and connect. Verify the app builds and syncs before you finish. +``` + ## Supported Backend Source Databases PowerSync is designed to be backend database agnostic, and supports these source databases: diff --git a/snippets/ai-quickstart.mdx b/snippets/ai-quickstart.mdx new file mode 100644 index 00000000..e0e6c395 --- /dev/null +++ b/snippets/ai-quickstart.mdx @@ -0,0 +1,29 @@ +export const AiQuickstart = ({ sdk, slug, question }) => <>; + +```text +Set up PowerSync in this project using the PowerSync {sdk} SDK. + +Install the PowerSync Agent Skills in this project and follow them: + + npx skills add powersync-ja/agent-skills + +Use https://docs.powersync.com/{slug}.md as the SDK reference. When +something is unclear, check the PowerSync docs or ask me. Do not invent +APIs. + +Ask me these questions and wait for my answers before writing code: + +1. Which backend database am I syncing from: Postgres, MongoDB, MySQL, or + SQL Server? Am I on a hosted platform such as Supabase? +2. Do I have a PowerSync Service instance (PowerSync Cloud or self-hosted)? + If not, help me set one up first. +3. Which tables does my app need locally, and which rows should each user + receive? +4. How do users authenticate? +5. {question} + +Then work step by step: define the client-side schema, write Sync Stream +definitions for the data I described and show me how to apply them on the +PowerSync Service, instantiate the PowerSync database, implement a backend +connector, and connect. Verify the app builds and syncs before you finish. +``` diff --git a/tools/ai-tools.mdx b/tools/ai-tools.mdx index 15bb9407..ea61923f 100644 --- a/tools/ai-tools.mdx +++ b/tools/ai-tools.mdx @@ -21,6 +21,10 @@ Learn more: PowerSync Agent Skills repository +## Copyable Prompts + +Each [client SDK reference](/client-sdks/overview) includes an AI Quickstart section with a prompt you can paste into your coding agent. The prompts install the Agent Skills in your project and have the agent ask about your backend database, PowerSync Service instance, data scoping, and authentication before it writes code. The [documentation home page](/intro/powersync-overview#ai-quickstart) has a version for projects where you haven't picked an SDK yet. + ## AI-Accessible Documentation ### Markdown Documentation From 92b251f210b93d8c5361efa3bf508185f76842e4 Mon Sep 17 00:00:00 2001 From: bean1352 Date: Mon, 7 Sep 2026 11:39:20 +0200 Subject: [PATCH 2/2] use Prompt component --- client-sdks/reference/capacitor.mdx | 2 -- client-sdks/reference/dotnet.mdx | 2 -- client-sdks/reference/flutter.mdx | 2 -- client-sdks/reference/javascript-web.mdx | 2 -- client-sdks/reference/kotlin.mdx | 2 -- client-sdks/reference/node.mdx | 2 -- client-sdks/reference/react-native-and-expo.mdx | 2 -- client-sdks/reference/rust.mdx | 2 -- client-sdks/reference/swift.mdx | 2 -- client-sdks/reference/tauri.mdx | 2 -- intro/powersync-overview.mdx | 4 ++-- snippets/ai-quickstart.mdx | 4 ++-- tools/ai-tools.mdx | 2 +- 13 files changed, 5 insertions(+), 25 deletions(-) diff --git a/client-sdks/reference/capacitor.mdx b/client-sdks/reference/capacitor.mdx index b0daba40..66b4a756 100644 --- a/client-sdks/reference/capacitor.mdx +++ b/client-sdks/reference/capacitor.mdx @@ -54,8 +54,6 @@ import LocalOnly from '/snippets/local-only-escape.mdx'; ## AI Quickstart -Copy this prompt into an AI coding agent (Claude Code, Cursor, Codex, or similar) to set up PowerSync with the Capacitor SDK. It instructs the agent to install the [PowerSync Agent Skills](/tools/ai-tools#powersync-agent-skills) in your project and to ask about your setup before writing code. - ```text Add PowerSync to this project so the app reads and writes a local SQLite database that syncs with my backend database. @@ -61,6 +60,7 @@ definitions for the data I described and show me how to apply them on the PowerSync Service, instantiate the PowerSync database, implement a backend connector, and connect. Verify the app builds and syncs before you finish. ``` + ## Supported Backend Source Databases diff --git a/snippets/ai-quickstart.mdx b/snippets/ai-quickstart.mdx index e0e6c395..c648341a 100644 --- a/snippets/ai-quickstart.mdx +++ b/snippets/ai-quickstart.mdx @@ -1,6 +1,6 @@ export const AiQuickstart = ({ sdk, slug, question }) => <>; -```text + Set up PowerSync in this project using the PowerSync {sdk} SDK. Install the PowerSync Agent Skills in this project and follow them: @@ -26,4 +26,4 @@ Then work step by step: define the client-side schema, write Sync Stream definitions for the data I described and show me how to apply them on the PowerSync Service, instantiate the PowerSync database, implement a backend connector, and connect. Verify the app builds and syncs before you finish. -``` + diff --git a/tools/ai-tools.mdx b/tools/ai-tools.mdx index ea61923f..63d67e4a 100644 --- a/tools/ai-tools.mdx +++ b/tools/ai-tools.mdx @@ -23,7 +23,7 @@ Learn more: ## Copyable Prompts -Each [client SDK reference](/client-sdks/overview) includes an AI Quickstart section with a prompt you can paste into your coding agent. The prompts install the Agent Skills in your project and have the agent ask about your backend database, PowerSync Service instance, data scoping, and authentication before it writes code. The [documentation home page](/intro/powersync-overview#ai-quickstart) has a version for projects where you haven't picked an SDK yet. +Each [client SDK reference](/client-sdks/overview) includes an AI Quickstart section with a prompt you can copy straight into your coding agent, or open in Cursor. The prompts install the Agent Skills in your project and have the agent ask about your backend database, PowerSync Service instance, data scoping, and authentication before it writes code. The [documentation home page](/intro/powersync-overview#ai-quickstart) has a version for projects where you haven't picked an SDK yet. ## AI-Accessible Documentation