Skip to content
Back to skills

Firebase Firestore

ASecurity

Comprehensive Firestore skill covering provisioning, security rules, SDK usage, query mechanics, aggregation, and indexing. Use when writing Firestore queries, security rules, or setting up Firestore.

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
ai-agentssecurity

Works with

  • cursor
  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add meanllbrl/dreamcontext --skill firebase-firestore --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Firebase Firestore?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Firebase Firestore
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/meanllbrl-firebase-firestore/badge)](https://www.skillsdirectory.com/skills/meanllbrl-firebase-firestore)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: firebase-firestore-basics
description: Comprehensive Firestore skill covering provisioning, security rules, SDK usage, query mechanics, aggregation, and indexing. Use when writing Firestore queries, security rules, or setting up Firestore.
compatibility: Best used with Firebase CLI (`npm install -g firebase-tools`). Supports Standard and Enterprise editions.
---

# Firestore Basics

Complete guide for Cloud Firestore — provisioning, securing, querying, and optimizing.

## Edition Awareness (Check First)

Before writing ANY Firestore code, determine the edition:
- **Standard**: Classic rules + limits. Most projects use this.
- **Enterprise (Pipeline)**: 100+ features — groupBy, min/max, countDistinct, optional indexes, `query.explain()`. Available since Jan 2026.

Agent MUST NOT suggest Pipeline syntax for Standard projects — it will error.

## Provisioning

Set up Cloud Firestore in your Firebase project and local environment: [provisioning.md](references/provisioning.md)

## Security Rules

Write and deploy Firestore Security Rules to protect your data: [security_rules.md](references/security_rules.md)

## SDK Usage

CRUD operations, real-time listeners, queries, aggregation, pagination: [web_sdk_usage.md](references/web_sdk_usage.md)

## Query Mechanics (Deep Dive)

**How Firestore processes queries internally** — execution model, index selection, cost model, aggregation mechanics, and the agent pre-query checklist: [query_mechanics.md](references/query_mechanics.md)

## Indexes

Index types, composite index ordering rules, Enterprise differences, and management: [indexes.md](references/indexes.md)

## Agent Pre-Query Checklist

Before generating ANY Firestore query:

1. **Edition?** → Standard or Enterprise? Determines available syntax.
2. **Aggregation?** → `getAggregateFromServer` (Standard) or `db.pipeline().aggregate()` (Enterprise). **NEVER** client-side reduce/sum/count.
3. **Compound query?** → Composite index needed? Field order: equality → inequality → orderBy.
4. **OR / in?** → Disjunction count ≤ 30.
5. **Index exists?** → Standard: error + create link. Enterprise: warn about scan cost.
6. **Pagination?** → Cursor-based only (`startAfter`). No offset.
7. **Real-time?** → Cannot use Pipeline syntax. Use Core query.
8. **Explain?** → Use `query.explain()` on Enterprise to verify planner decisions.

Files in this skill

  • SKILL.md2.3 KB
  • references/indexes.md4 KB
  • references/provisioning.md2.5 KB
  • references/query_mechanics.md6.6 KB
  • references/security_rules.md8.7 KB
  • references/web_sdk_usage.md7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…