.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/agent-skills/firebase-data-connect-basics
home/skills/firebase/agent-skills/firebase-data-connect-basics
firebase avatar

firebase-data-connect-basics

byfirebase· 35 skills

Installs

111k

Stars

389

Forks

76

Category

Databases

View on GitHub

TL;DR

Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational database with Firebase, or when the user mentions SQL Connect or Data Connect.

How to install firebase-data-connect-basics?

firebase/agent-skills/firebase-data-connect-basics
$npx -y skills add firebase/agent-skills --skill firebase-data-connect-basics

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/firebase/agent-skills" --skill "firebase/agent-skills/firebase-data-connect-basics"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/firebase/agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/firebase/agent-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Firebase SQL Connect
2 
3Firebase SQL Connect is a relational database service using Cloud SQL for
4PostgreSQL with GraphQL schema, auto-generated queries/mutations, and type-safe
5SDKs.
6 
7> [!NOTE] **Product Rename**: Firebase Data Connect was renamed to **Firebase
8> SQL Connect**. All instructions, references, and examples in this skill
9> repository referring to "Data Connect" or "Firebase Data Connect" apply to
10> "SQL Connect" and "Firebase SQL Connect" as well.
11 
12## Project Structure
13 
14```text
15dataconnect/
16├── dataconnect.yaml # Service configuration
17├── seed_data.gql # LOCAL ONLY — prototype/test data
18├── schema/
19│ └── schema.gql # Data model (types with @table)
20└── connector/
21 ├── connector.yaml # Connector config + SDK generation
22 ├── queries.gql # Queries
23 └── mutations.gql # Mutations
24```
25 
26## Key Tools for Validation
27 
28Rely on these two mechanisms to ensure project correctness:
29 
301. **Review GraphQL Schema**: Both user-defined and generated extensions (in
31 `.dataconnect/schema/main/`).
321. **Validate Operations**: Run
33 `npx -y firebase-tools@latest dataconnect:compile` against the schema.
34 
35## Operation Strategies: GraphQL vs. Native SQL
36 
37Always default to **Native GraphQL**. **Native SQL lacks type safety** and
38bypasses schema-enforced structures. Only use **Native SQL** when the user
39explicitly requests it or when the task requires advanced database features.
40 
41| Strategy | When to use | Implementation |
42| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
43| **Native GraphQL** (Default) | Almost all use cases. Standard CRUD, basic filtering/sorting, simple relational joins. Requires full type safety. | Auto-generated fields (`movie_insert`, `movies`). Strong typing and schema enforcement. |
44| **Native SQL** (Advanced) | PostgreSQL extensions (e.g., PostGIS), window functions (`RANK()`), complex aggregations, or highly tuned sub-queries. | Raw SQL string literals via `_select`, `_execute`, etc. Requires strict positional parameters (`$1`). No type safety. |
45 
46## Development Workflow
47 
48Follow this strict workflow to build your application. You **must** read the
49linked reference files for each step to understand the syntax and available
50features.
51 
52### 1. Define Data Model (`schema/schema.gql`)
53 
54Define your GraphQL types, tables, and relationships (which map to a Postgres
55schema).
56 
57> **Read [reference/schema.md](reference/schema.md)** for:
58>
59> - `@table`, `@col`, `@default`
60> - Relationships (`@ref`, one-to-many, many-to-many)
61> - Data types (UUID, Vector, JSON, etc.)
62 
63### 2. Define Authorized Operations (`connector/queries.gql`, `connector/mutations.gql`)
64 
65Write the queries and mutations your client will use, including authorization
66logic. SQL Connect is secure by default.
67 
68> **Read [reference/operations.md](reference/operations.md)** for:
69>
70> - **Queries**: Filtering (`where`), Ordering (`orderBy`), Pagination
71> (`limit`/`offset`).
72> - **Mutations**: Create (`_insert`), Update (`_update`), Delete (`_delete`).
73> - **Upserts**: Use `_upsert` to "insert or update" records (CRITICAL for user
74> profiles).
75> - **Transactions**: Use `@transaction` for multi-step atomic operations. Use
76> `_expr: "response.<prevStep>"` to pass data between steps.
77>
78> **Read [reference/security.md](reference/security.md)** for authorization:
79>
80> - `@auth(level: ...)` for PUBLIC, USER, or NO_ACCESS.
81> - `@check` and `@redact` for row-level security and validation.
82>
83> **Read [reference/realtime.md](reference/realtime.md)** for real-time
84> subscriptions:
85>
86> - `@refresh` directive for time-based polling and event-driven updates.
87> - CEL conditions to scope refresh triggers precisely.
88>
89> **Read [reference/native_sql.md](reference/native_sql.md)** for Native SQL
90> operations:
91>
92> - Embedding raw SQL with `_select`, `_selectFirst`, `_execute`
93> - Strict rules for positional parameters (`$1`, `$2`), quoting, and CTEs
94> - Advanced PostgreSQL features (PostGIS, Window Functions)
95 
96### 3. Use type-safe SDK in your apps
97 
98Generate type-safe code for your client platform.
99 
100Configure SDK generation in `connector.yaml`:
101 
102```yaml
103connectorId: my-connector
104generate:
105 javascriptSdk:
106 outputDir: "../web-app/src/lib/dataconnect"
107 package: "@movie-app/dataconnect"
108 kotlinSdk:
109 outputDir: "../android-app/app/src/main/kotlin/com/example/dataconnect"
110 package: "com.example.dataconnect"
111 swiftSdk:
112 outputDir: "../ios-app/DataConnect"
113```
114 
115Generate SDKs:
116 
117```bash
118npx -y firebase-tools@latest dataconnect:sdk:generate
119```
120 
121For platform-specific instructions on how to use the generated SDKs, read:
122 
123- **Web (TypeScript)**: [reference/sdk_web.md](reference/sdk_web.md)
124- **Android (Kotlin)**: [reference/sdk_android.md](reference/sdk_android.md)
125- **iOS (Swift)**: [reference/sdk_ios.md](reference/sdk_ios.md)
126- **Admin (Node.js)**:
127 [reference/sdk_admin_node.md](reference/sdk_admin_node.md)
128- **Flutter (Dart)**: [reference/sdk_flutter.md](reference/sdk_flutter.md)
129 
130______________________________________________________________________
131 
132## Feature Capability Map
133 
134If you need to implement a specific feature, consult the mapped reference file:
135 
136| Feature | Reference File | Key Concepts |
137| :------------------------------ | :----------------------------------------------------------- | :------------------------------------------------- |
138| **Data Modeling** | [reference/schema.md](reference/schema.md) | `@table`, `@unique`, `@index`, Relations |
139| **Vector Search** | [reference/search.md](reference/search.md) | `Vector`, `@col(dataType: "vector")`, embeddings |
140| **Full-Text Search** | [reference/search.md](reference/search.md) | `@searchable`, `movies_search` |
141| **Upserting Data** | [reference/operations.md](reference/operations.md) | `_upsert` mutations |
142| **Complex Filters** | [reference/operations.md](reference/operations.md) | `_or`, `_and`, `_not`, `eq`, `contains` |
143| **Transactions** | [reference/operations.md](reference/operations.md) | `@transaction`, `response` binding |
144| **Environment Config** | [reference/config.md](reference/config.md) | `dataconnect.yaml`, `connector.yaml` |
145| **Realtime Subscriptions** | [reference/realtime.md](reference/realtime.md) | `@refresh`, `subscribe()`, auto-refresh |
146| **Cloud Functions Integration** | [reference/cloud_functions.md](reference/cloud_functions.md) | `onMutationExecuted`, triggering events |
147| **Data Seeding & Migrations** | [reference/data_seeding.md](reference/data_seeding.md) | `seed_data.gql`, `_insertMany`, Admin SDK bulk |
148| **Starter Templates** | [templates.md](templates.md) | CRUD, user-owned resources, many-to-many, SDK init |
149 
150______________________________________________________________________
151 
152## Deployment & CLI
153 
154> **Read [reference/config.md](reference/config.md)** for deep dive on
155> configuration.
156 
157Follow these patterns based on your current task:
158 
159### How to initialize SQL Connect in a Firebase project
160 
1611. Understand the app idea. Ask clarification questions if unclear.
1621. Run `npx -y firebase-tools@latest init dataconnect`.
1631. Validate that the app template and generated SDK are setup.
164 
165### How to build apps using SQL Connect locally
166 
1671. Start the emulator:
168 `npx -y firebase-tools@latest emulators:start --only dataconnect`.
1691. Write schema and operations.
1701. Seed local test data into `seed_data.gql`. Read
171 [reference/data_seeding.md](reference/data_seeding.md#local-prototyping-data-seeding).
1721. Run `npx -y firebase-tools@latest dataconnect:compile` or
173 `npx -y firebase-tools@latest dataconnect:sdk:generate` to validate them.
1741. Use the operations in your app and build it.
175 
176### How to deploy SQL Connect to Cloud SQL
177 
1781. Run `npx -y firebase-tools@latest deploy --only dataconnect`.
179 
180## Examples
181 
182For complete, working code examples of schemas and operations, see
183**[examples.md](examples.md)**.
184 
185For ready-to-use starter templates (CRUD, user-owned resources, many-to-many,
186YAML configs, SDK init), see **[templates.md](templates.md)**.

Preview

firebase/agent-skillsfirebase/agent-skills

$ npx -y skills add firebase/agent-skills --skill firebase-data-connect-basics

▸ installing to .claude/skills…

✓ firebase-data-connect-basics ready

Repofirebase/agent-skills
TypeSkills
CategoryDatabases
ForDeveloperArchitect
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. supabase avatarsupabase-postgres-best-practicesPostgres performance optimization and best practices from Supabase.SkillsJul 2026313k2.4k
  2. firebase avatarfirebase-firestoreSets up, manages, queries, and configures Cloud Firestore databases (Standard/Enterprise edition), including data modeling, security rules, indexes, and SDK…SkillsJul 202677k389
  3. prisma avatarprisma-database-setupGuides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.).SkillsJul 202674k47
  4. prisma avatarprisma-client-apiPrisma Client API reference covering model queries, filters, operators, and client methods.SkillsJul 202673k47
  5. prisma avatarprisma-cliPrisma ORM CLI commands reference covering init, generate, migrate, db, dev, studio, validate, format, debug, and mcp.SkillsJul 202671k47
  6. prisma avatarprisma-postgresPrisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK.SkillsJul 202668k47