inehemiasm/AiAssistant / .agents/skills/firebase-firestore
firebase-firestore
VerifiedSets up, manages, and executes queries against Cloud Firestore database instances. You MUST unconditionally activate this skill if you plan to use Firestore in any way. Use when listing or creating Firestore databases, configuring security rules, designing data models, writing client SDK queries, or checking indexes.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.4 KB |
| references/enterprise/android_sdk_usage.md | markdown | 3.6 KB |
| references/enterprise/data_model.md | markdown | 2.8 KB |
| references/enterprise/flutter_setup.md | markdown | 4.5 KB |
| references/enterprise/indexes.md | markdown | 4.5 KB |
| references/enterprise/ios_setup.md | markdown | 5.8 KB |
| references/enterprise/provisioning.md | markdown | 3.2 KB |
| references/enterprise/python_sdk_usage.md | markdown | 2.9 KB |
| references/enterprise/security_rules.md | markdown | 26.5 KB |
| references/enterprise/web_sdk_usage.md | markdown | 4.2 KB |
| references/standard/android_sdk_usage.md | markdown | 4.7 KB |
| references/standard/flutter_setup.md | markdown | 4.3 KB |
| references/standard/indexes.md | markdown | 4.0 KB |
| references/standard/ios_setup.md | markdown | 5.2 KB |
| references/standard/provisioning.md | markdown | 2.8 KB |
| references/standard/security_rules.md | markdown | 26.5 KB |
| references/standard/web_sdk_usage.md | markdown | 4.4 KB |
references/enterprise/data_model.md
View on GitHub# Firestore Data Model Reference
Firestore is a NoSQL, document-oriented database. Unlike a SQL database, there
are no tables or rows. Instead, you store data in **documents**, which are
organized into **collections**.
## Document Data Model
Data in Firestore is organized into documents, collections, and subcollections.
### Documents
A **document** is a lightweight record that contains fields, which map to
values. Each document is identified by a name. A document can contain complex
nested objects in addition to basic data types like strings, numbers, and
booleans. Documents are limited to a maximum size of 1 MiB.
Example document (e.g., in a `users` collection): `json { "first": "Ada",
"last": "Lovelace", "born": 1815 }`
### Collections
Documents live in **collections**, which are containers for your documents. For
example, you could have a `users` collection to contain your various users, each
represented by a document. * Collections can only contain documents. They cannot
directly contain raw fields with values, and they cannot contain other
collections. * Documents within a collection can contain different fields. * You
don't need to "create" or "delete" collections explicitly. After you create the
first document in a collection, the collection exists. If you delete all of the
documents in a collection, the collection no longer exists.
### Subcollections
Documents can contain subcollections natively. A subcollection is a collection
associated with a specific document. For example, a user document in the `users`
collection could have a `messages` subcollection containing message documents
exclusively for that user. This creates a powerful hierarchical data structure.
Data path example: `users/user1/messages/message1`
## Collection Group Support
A **collection group** consists of all collections with the same ID. By default,
queries retrieve results from a single collection in your database. Use a
collection group query to retrieve documents from a collection group instead of
from a single collection.
### Use Cases
Collection group queries are useful when you want to query across multiple
subcollections that share the same organizational structure.
For example, imagine an app with a `landmarks` collection where each landmark
has a `reviews` subcollection. If you want to find all 5-star reviews across
*all* landmarks, it would involve checking many separate `reviews`
subcollections. With a collection group, you can perform a single query against
the `reviews` collection group.
### Examples
**Standard Query** (Single Collection): Find all 5-star reviews for a specific
landmark. `javascript
db.collection('landmarks/golden_gate_bridge/reviews').where('rating', '==', 5)`
**Collection Group Query**: Find all 5-star reviews across *all* landmarks.
`javascript db.collectionGroup('reviews').where('rating', '==', 5)`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |