Write efficient Firestore queries with compound filters, composite indexes, cursor-based pagination, aggregation queries, and real-time listeners. [EXPLICIT] Trigger: "firestore query", "firestore index", "firestore pagination", "firestore where"
From jm-adknpx claudepluginhub javimontano/jm-adk-alfaThis skill is limited to using the following tools:
agents/guardian.mdagents/lead.mdagents/specialist.mdagents/support.mdevals/evals.jsonknowledge/body-of-knowledge.mdknowledge/knowledge-graph.mdprompts/meta.mdprompts/primary.mdprompts/variations/deep.mdprompts/variations/quick.mdtemplates/output.docx.mdtemplates/output.html"The right index turns an impossible query into an instant one." — Unknown
Guides efficient Firestore query implementation — compound queries with multiple where clauses, composite index management, cursor-based pagination with startAfter/limit, aggregation queries (count, sum, average), and real-time listeners with proper cleanup. Use when building data-fetching logic against Firestore. [EXPLICIT]
firestore.indexes.json for defined composite indexesstartAfter vs offset)where(), orderBy(), limit() chainingfirestore.indexes.json or via Firebase console error linksstartAfter(lastDoc)getCountFromServer, getAggregateFromServer) for counts/sumsonSnapshot and proper unsubscribe() cleanupfirestore.indexes.json and deployedoffset() for pagination (reads and charges for all skipped documents)onSnapshot listeners (causes memory leaks and phantom reads)firestore-modeling — query efficiency depends on data model designfirestore-security-rules — rules must allow the queries being performedExample invocations:
| Scenario | Handling |
|---|---|
| Empty or minimal input | Request clarification before proceeding |
| Conflicting requirements | Flag conflicts explicitly, propose resolution |
| Out-of-scope request | Redirect to appropriate skill or escalate |
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.